What it does is copy the full path and name of the file currently open to a new file and split it apart at the backslash. It retains the period before the extension which makes it easier to find -- well, as long as you don't have periods embedded in the file name, that is. But it is a pretty good quick-n-dirty hack:
- Code: Select all
InsertMode ; standard macro settings
ColumnModeOff ;
HexOff ;
UnixReOff ; --
Clipboard 1 ; change to another clipboard
CopyFilePath ; copy file path and name
NewFile ; open a new file
Paste ; insert copied file name
Top ; go to beginning of page
Loop ; --
Find "\" ; split the line at each backslash
IfFound ;
" ;
" ;
Else ;
ExitLoop ;
EndIf ;
EndLoop ; --
StartSelect ; delete up to the dot
Find "." ;
IfFound ;
Key LEFT ARROW ;
EndSelect ;
Delete ;
EndIf ; --
ClearClipboard ; empty user clipboard 1
Clipboard 0 ; restore previous (Windows) clipboard
If the project name is also part of the path, you can easily find it by position. Of course, this entails following some kind of convention (as I do) for directory structures in your project.
The default properties for the macro should be:
UNCHECKED - Show Cancel Dialog for this macro
CHECKED - Continue if a Find with Replace not found
Hope you may find this as useful as I did!

