General Macro Scheduler discussion
Moderators: JRL, Dorian (MJT support)
-
SteenJakobsen
- Pro Scripter
- Posts: 110
- Joined: Thu Apr 08, 2010 6:11 am
- Location: Hørsholm, Denmark
-
Contact:
Post
by SteenJakobsen » Tue Apr 27, 2010 10:33 am
Hi,
I have an error when using include>
Code: Select all
Include>%TEMP_DIR%MacroBegin.scp
/*----------------------------*/
messagemodal>[<LabkaDataString>]
/*----------------------------*/
Include>%TEMP_DIR%MacroEnd.scp
When I use F8 to debug this code it tells med tat it can not find the includefile.
However afterwards it works quite ok .
However the second time i run it using F8 it gives me:
Access violation at address 00320FF. Read of adress 00321000.
If I dont use the debugger and just run it then all is running just fine
Please let me know if you have fixed it
Best Regards
Steen Jakobsen
DM Software A/S
-
gdyvig
- Automation Wizard
- Posts: 447
- Joined: Fri Jun 27, 2008 7:57 pm
- Location: Seattle, WA
Post
by gdyvig » Tue Apr 27, 2010 5:25 pm
Hi SteenJakobsen,
The problem might be inside MacroBegin.scp and MacroEnd.scp. Try replacing the contents of those scripts with a simple messagemodal statment. Do you get the same error?
Remember, when you run in debug you are running a temp copy of the script with a ".dlg" suffix rather than ".scp". Any references to %SCRIPT_DIR% will be different than running the script without the editor.
On my computer if I use a variable in the include statement, I get a "File in Include does not exist" message, then it sucessfully runs the nonexistant script. That problem occurs in v11 under Windows XP. This problem does not occur for the beta, v12.
This workaround used to be required:
Code: Select all
ChangeDirectory>%temp_dir%
Include>MacroBegin
...
...
Include>MacroEnd
ChangeDirectory>%Script_Dir%
Gale
-
SteenJakobsen
- Pro Scripter
- Posts: 110
- Joined: Thu Apr 08, 2010 6:11 am
- Location: Hørsholm, Denmark
-
Contact:
Post
by SteenJakobsen » Wed Apr 28, 2010 4:56 am
Hi Gale,
It seems to make no difference whats inside the include macrofiles.
here is the code
Code: Select all
Include>%TEMP_DIR%MacroBegin.scp
/*----------------------------*/
messagemodal>[<LabkaDataString>]
/*----------------------------*/
Include>%TEMP_DIR%MacroEnd.scp
MacroBegin.scp
Code: Select all
/*
OnEvent>KEY_DOWN,Q,5,DMEXIT
Let>[<<MacroData>>]=
Let>[<<MacroFile>>]=
Let>[<<MacroResult>>]=
Let>DM_DIR=c:\sourcenxt\dialog manager
DeleteFile>%TEMP_DIR%MacroBreak.txt
SRT>DMEXIT
WriteLn>%TEMP_DIR%MacroBreak.txt,nWLNRes,Break
Exit
END>DMEXIT
*/
Let>[<LabkaDataString>]=steen
MacroEnd.scp
Code: Select all
DeleteFile>%TEMP_DIR%p8a.dat
WriteLn>%TEMP_DIR%p8a.dat ,nWLNRes,%[<LabkaDataString>]%
You can skype me if you like
SkypeName: dm.software.sj
Best Regards
Steen Jakobsen
DM Software A/S
-
gdyvig
- Automation Wizard
- Posts: 447
- Joined: Fri Jun 27, 2008 7:57 pm
- Location: Seattle, WA
Post
by gdyvig » Wed Apr 28, 2010 2:55 pm
Hi Steen,
I tried out your script under Windows XP SP3 using MS v11. I don't get the same symptoms as you, but the script does not work properly. When in debug you should see the insides of the include files as you step through the script.
This limitation to the include statement has been documented, but not in the help for the statement itself.
The following main script works for me:
Code: Select all
ChangeDirectory>%TEMP_DIR%
Include>MacroBegin.scp
/*----------------------------*/
messagemodal>[<LabkaDataString>]
/*----------------------------*/
//Change Directory again in case it is no longer set to %TEMP_DIR%
ChangeDirectory>%TEMP_DIR%
Include>MacroEnd.scp
Gale
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Wed Apr 28, 2010 2:59 pm
It is fixed in v12 beta build 024. See recent update.
-
gdyvig
- Automation Wizard
- Posts: 447
- Joined: Fri Jun 27, 2008 7:57 pm
- Location: Seattle, WA
Post
by gdyvig » Wed Apr 28, 2010 3:37 pm
Confirmed that v12build24 fixed the problem for Steen's script under Windows XP SP3. Tried Trace and also stepping thru each line.
Gale