trying to create a comman line batch process that will allow me to play several macros, but the macros need to play to the end of the file. the file will neve have the same number of lines in it. So utilizing the number of lines on the command line does not work. You can run a macro to the end of the file in interactive mode, so is there a command to allow it to be done in command line.
Loop
:
:
IfEof
ExitLoop
EndIf
EndLoop
OR
Loop
:
:
IfNotFound
ExitLoop
EndIf
EndLoop
:
:
IfEof
ExitLoop
EndIf
EndLoop
OR
Loop
:
:
IfNotFound
ExitLoop
EndIf
EndLoop
Best regards from an UC/UE/UES for Windows user from Austria
I have a script that trims the leading spaces in a grouping of text. It works fine until the last line. The Key Down Arrow command doesn't move to a new line and the macro runs continuously within the last line and deletes everything. I can't seem to coordinate the IfEof command to reference the fail of the Key DOWN ARROW to execute at the end of the file. Your thoughts would be appreciated.
Thank you
Code: Select all
InsertMode
ColumnModeOff
HexOff
UnixReOff
TrimTrailingSpaces
Top
Loop
Find RegExp "[0-9a-zA-Z]"
Key LEFT ARROW
StartSelect
Key HOME
EndSelect
Key DEL
Key DOWN ARROW
IfEof
ExitLoop
EndIf
EndLoop
Once again the problem with a file which does not really have a last line because the characters at the end of the file are not terminated with a line termination (CR+LF for DOS files). Solution: add line termination at end of the file if not already present. Insert one of the following codes before command Top in your macro:
Bottom
IfColNum 1
Else
"
"
EndIf
or
Bottom
IfColNumGt 1
"
"
EndIf
Bottom
IfColNum 1
Else
"
"
EndIf
or
Bottom
IfColNumGt 1
"
"
EndIf
Best regards from an UC/UE/UES for Windows user from Austria