Technical support and scripting issues
Moderators: Dorian (MJT support), JRL
-
Grovkillen
- Automation Wizard
- Posts: 1128
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
-
Contact:
Post
by Grovkillen » Mon Sep 20, 2021 6:31 am
Code: Select all
Let>counter=0
Message>counter
//DOWN
OnEvent>KEY_DOWN,VK40,0,TEST_ROUTINE,{1}
//ESC
OnEvent>KEY_DOWN,VK27,0,EXIT_APP
Label>mainLoopStart
Wait>0.05
Goto>mainLoopStart
SRT>TEST_ROUTINE
**BREAKPOINT**
Add>counter,TEST_ROUTINE_Var_1
//why is the script starting from top after I have used the arrow DOWN to start the TEST_ROUTINE
END>TEST_ROUTINE
SRT>EXIT_APP
Exit>
END>EXIT_APP
Last edited by
Grovkillen on Mon Sep 20, 2021 7:20 am, edited 1 time in total.
-
Grovkillen
- Automation Wizard
- Posts: 1128
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
-
Contact:
Post
by Grovkillen » Mon Sep 20, 2021 6:42 am
I have found the problem.... the passed variable will mess the loop up:
Code: Select all
Let>counter=0
Message>counter
//DOWN
OnEvent>KEY_DOWN,VK40,0,TEST_ROUTINE,{1}
//UP
OnEvent>KEY_DOWN,VK38,0,TEST_ROUTINE
//ESC
OnEvent>KEY_DOWN,VK27,0,EXIT_APP
Label>mainLoopStart
Wait>0.05
Goto>mainLoopStart
SRT>TEST_ROUTINE
**BREAKPOINT**
Let>TEST_Var_1=0*TEST_ROUTINE_Var_1
If>TEST_Var_1=0
Add>counter,TEST_ROUTINE_Var_1
Else>
Let>counter=100
Endif>
END>TEST_ROUTINE
SRT>EXIT_APP
Exit>
END>EXIT_APP
-
Grovkillen
- Automation Wizard
- Posts: 1128
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
-
Contact:
Post
by Grovkillen » Fri Sep 24, 2021 6:45 am
[EDIT] posted in wrong thread.