i'm trying to do something difficult - so i'll try to be as descriptive as possible.
i have the perl interpreter on my system and frequently use a perl script i authored called grep.pl. as you might guess the script will search through the files on my hard drive looking for text then outputs a list of files that matched including the lines that matched. i've added an option to my script that causes the script to open the matching files in my favorite text editer - UE. to accomplish this the script just basically passes the shell something like this: uedit32 "c:\machingfile.txt". i've had this working for a while.
next i thought, how cool would it be if i could automatically cause the matching lines to get bookmarked. sooo i've added some functionality in the script that edits a macro template file i've created (a text file) that contains this code...:
...and replaces "<SEARCHEXP>" with whatever my script was searching for - perhaps all uses of the function "LoadFromFile". then the script saves the file with the changes with a new name, perhaps "newmac.mac" and passes this to the shell: uedit32 "c:\machingfile.txt" "/M:c:\newmac.mac". but lo and behold that doesn't work. after researching & playing around a bit - apparently the macro has to be saved from within the UE environment so it can get converted to the binary format i've discovered UE uses for macros.
is there any way to do this? can i somehow invoke UE with a cmd line instructing it to load a text file as a macro then save it....then re-invoke it with the cmd line above? any ideas would be helpful - thanks in advance.
of course, any questions about this that might shed some light on something i've left out - don't hesitate to ask, i'll check back often and further describe whatever it is.
--neb
i have the perl interpreter on my system and frequently use a perl script i authored called grep.pl. as you might guess the script will search through the files on my hard drive looking for text then outputs a list of files that matched including the lines that matched. i've added an option to my script that causes the script to open the matching files in my favorite text editer - UE. to accomplish this the script just basically passes the shell something like this: uedit32 "c:\machingfile.txt". i've had this working for a while.
next i thought, how cool would it be if i could automatically cause the matching lines to get bookmarked. sooo i've added some functionality in the script that edits a macro template file i've created (a text file) that contains this code...:
Code: Select all
InsertMode
ColumnModeOff
HexOff
UnixReOn
Loop
Find MatchCase RegExp <SEARCHEXP>
IfFound
ToggleBookmark
EndIf
IfNotFound
ExitLoop
EndIf
EndLoop
GotoLine 1
is there any way to do this? can i somehow invoke UE with a cmd line instructing it to load a text file as a macro then save it....then re-invoke it with the cmd line above? any ideas would be helpful - thanks in advance.
of course, any questions about this that might shed some light on something i've left out - don't hesitate to ask, i'll check back often and further describe whatever it is.
--neb