home *** CD-ROM | disk | FTP | other *** search
- ; This routine adds a full path spec to the Notepad title, if possible,
- ; to make it available to macros
-
- if isdefined(param1)==@false then goto plain
- run("notepad.exe",param1)
-
- if strindex(param1,":",1,@fwdscan)==@true then goto NothingNeeded
- cwdir=dirget()
- i=strindex(param1,"\",strlen(param1),@backscan)
- if i!=@false then goto StripDirectory
- WinTitle("Notepad","Notepad - %cwdir%\%param1%")
- exit
-
- :StripDirectory
- file=strsub(param1,i+1,strlen(param1)-i)
- WinTitle("Notepad","Notepad - %cwdir%\%file%")
-
- :NothingNeeded
- WinTitle("Notepad","Notepad - %param1%")
- exit
-
- :plain
- run("notepad.exe","")
-