From: "James C. Sewell"
>So now, in my personal tse.ui, I have
>an item on the file menu called "Change Dir...", which calls the following
>simple macro:
This is similar to a macro I have which I will share in case it is helpful.
Often I will be editing a file and want to shell to that directory to do
something but my default directory has been changed by loading other files
or using macros. I put this macro on a menu I use often and it is the
default option of that menu (mainly because this one is harmless.
"elete current file from disk" wouldn't make a good default )
Anyway, 2 keypresses later I'm in the right directory so when I shell I can
do what I want.
It's nothing elegant, but for what it's worth:
proc mSetPathToCurrent()
string path[25]
string drive[25]
path=SplitPath(CurrFilename(),_PATH_)
drive = SplitPath(CurrFilename(),_DRIVE_)
LogDrive(drive)
ChDir(path)
message("Path now set to "+drive+path)
end
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|