user input in a FindInFiles macro
I am trying to create a macro using FIndInFiles, but can't see how to specify the search string without editing the macro.
Searching a set of folders with Shift JIS files on English XP means setting the encoding each time, which I would like to avoid.
Record Macro doesn't seem to work, as when a new window opens there is no SaveAs option, it seems.
The Help says MsgBox is not allowed, and there is nothing about InputBox or an equivalent.
FindInFiles doesn't seem to work with 'document.selection.'
Is it possible to select text in an EMEditor window, assign that to a variable, then use that variable as the search string in FindInFiles method, all in one macro?
Or is there some other solution?
Thanks!
Searching a set of folders with Shift JIS files on English XP means setting the encoding each time, which I would like to avoid.
Record Macro doesn't seem to work, as when a new window opens there is no SaveAs option, it seems.
The Help says MsgBox is not allowed, and there is nothing about InputBox or an equivalent.
FindInFiles doesn't seem to work with 'document.selection.'
Is it possible to select text in an EMEditor window, assign that to a variable, then use that variable as the search string in FindInFiles method, all in one macro?
Or is there some other solution?
Thanks!
wreck wrote:
I am trying to create a macro using FIndInFiles, but can't see how to specify the search string without editing the macro.
Searching a set of folders with Shift JIS files on English XP means setting the encoding each time, which I would like to avoid.
Record Macro doesn't seem to work, as when a new window opens there is no SaveAs option, it seems.
The Help says MsgBox is not allowed, and there is nothing about InputBox or an equivalent.
FindInFiles doesn't seem to work with 'document.selection.'
Is it possible to select text in an EMEditor window, assign that to a variable, then use that variable as the search string in FindInFiles method, all in one macro?
Or is there some other solution?
Thanks!
MsgBox is not available, but there are equivalent methods like alert() and comfirm(). prompt() is similiar to InputBox(). FindInFiles can use parameters and document.selection.Text can be used as a parameter.
VBScript "InputBox()" is missing
but there is no EmEditor help entry
pointing to the alternative "Prompt()" command
like there is one for the missing "MsgBox()" function to alert().
May i ask to add such an cross reference to make it
more easy to find the InputBox alternative Prompt() ?
2.)
also i want to suggest an third prompt() parameter.
As addition to
strMessage
strDefault
i want to ask for
strTitle
like the VBS inputbox() have:
strAnswer = prompt( strMessage, strTitle, strDefault )
Thank you.
but there is no EmEditor help entry
pointing to the alternative "Prompt()" command
like there is one for the missing "MsgBox()" function to alert().
May i ask to add such an cross reference to make it
more easy to find the InputBox alternative Prompt() ?
2.)
also i want to suggest an third prompt() parameter.
As addition to
strMessage
strDefault
i want to ask for
strTitle
like the VBS inputbox() have:
strAnswer = prompt( strMessage, strTitle, strDefault )
Thank you.
Hi,
It might be convenience to include all these functions in EmEditor. However, you should be able to find an external object that includes those functions, and use the object using CreateObject function. Please see details at:
http://emeditor.wpengine.com/help/macro/tutorial/tutorial_createobject.htm
Thank you!
It might be convenience to include all these functions in EmEditor. However, you should be able to find an external object that includes those functions, and use the object using CreateObject function. Please see details at:
http://emeditor.wpengine.com/help/macro/tutorial/tutorial_createobject.htm
Thank you!
4 posts in this topic