by Mofi » Fri Mar 03, 2006 8:24 am
If you use %sel% for your tool instead of c:\temp\%n.log_%dt and run the tool with this macro, you will get what you want.
The macro copies the full name of the current file, pastes it into a new file, reformats the file name to c:\temp\%n.log_ and adds the current date/time. You can modify the format of the date/time string also with the macro. Then it selects the whole string and runs the tool. After the tool has finished, the new file is discarded.
At the configuration of your tool, do not enable save current file or save all files because of the unsaved new file created by the macro. If you want to save the current file or all files, use the Save or SaveAll macro commands for example after command HexOff.
If you want to see which string the macro produce, remove the last 2 commands.
IfNameIs ""
ExitMacro
EndIf
InsertMode
ColumnModeOff
HexOff
Clipboard 9
CopyFilePath
IfExtIs ""
NewFile
Paste
Else
NewFile
Paste
StartSelect
Find Up Select "."
Delete
EndSelect
EndIf
ClearClipboard
Clipboard 0
Find Up "\"
SelectToTop
Delete
""C:\Temp\"
Key END
".log_"
TimeDate
"""
SelectToTop
RunTool "case-sensitive name of your tool"
CloseFile NoSave