Include>code.scp works for when running the script, editing the script after opening it from a folder, but NOT when editing the script after opening it in the Macro Scheduler window.
My guess is the Script_Dir is saved as a special variable for the Include function, but this variable isn't being set correctly when opening a file to edit from the Macro Scheduler window. Just a guess.
I am running 11.1.03 (latest release) but didn't notice any patch notes about the Include getting any changes/fixes. Running Windows 7 64-bit beta.
Include> not working the same between opened files
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Include> not working the same between opened files
Not sure if you wrote that down correctly here, but you have missed out the path. Without a path Macro Scheduler would have to look in the current working directory (CWD) which could be anywhere. CWD may change depending on what you are doing.mafiamoe wrote:Include>code.scp works for when running the script, editing the script after opening it from a folder, but NOT when editing the script after opening it in the Macro Scheduler window.
Always specify a full path. Alternatively use %SCRIPT_DIR% if you are referring to a file in the same folder as the current script. However, bear in mind that if you haven't yet saved the script SCRIPT_DIR is nothing! So save the script first.
When compiling, if you want the include to be sucked into the compiled EXE then you either need full paths or SCRIPT_DIR. While any other variable will work when RUNNING the script it is meaningless at compile time so cannot be used to compile the includes statically.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
It works for me.
But it should be SCRIPT_DIR - upper case:
Include>%SCRIPT_DIR%\script.scp
But it should be SCRIPT_DIR - upper case:
Include>%SCRIPT_DIR%\script.scp
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Ah, Include is case sensitive. Thank You.
After trying to manipulate CWD to work, I found that when opening a script through the Macro Scheduler window it tends to reset the CWD variable when stepping every time it encounters some code, however it doesn't do this when stepping after opening the script through the folder.
This waste of time may turn out to be not such a waste of time after all, but you could prove me wrong... again...
After trying to manipulate CWD to work, I found that when opening a script through the Macro Scheduler window it tends to reset the CWD variable when stepping every time it encounters some code, however it doesn't do this when stepping after opening the script through the folder.
This waste of time may turn out to be not such a waste of time after all, but you could prove me wrong... again...