Dialog Variable Help
Moderators: JRL, Dorian (MJT support)
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
Dialog Variable Help
In attempt to keep my scripts small and modular, I think I have a issue when using
Dialog Boxes variables. I have 7 scripts that run in order, Script1 calls Script2 and so on.
Script1 starts with a Dialog box that has 18 variables, after it’s closed the script continues
doing it commands and then calls Sctipt2. Which has a “Send>%DialogName.Variable%â€
Dialog Boxes variables. I have 7 scripts that run in order, Script1 calls Script2 and so on.
Script1 starts with a Dialog box that has 18 variables, after it’s closed the script continues
doing it commands and then calls Sctipt2. Which has a “Send>%DialogName.Variable%â€
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You don't say how you are "calling" each script. Use Include if you want each one to be global. Include literally sucks the "called" script into the "calling" script so that the code becomes one and the same. Whereas Macro just RUNS the called script which is a separate entity. With Macro> you would have to pass any variables required into the script.
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?
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
Dialog Variable Help
Yes your right I’m using Macro> to call my scripts.
I checked the help file but not very helpful.
So If I understand all I need to do is
Replace Macro>script name with Include>script name and it will run/call the next script
Or does the Include>script name go at the beginning of each script I want included?
Thanks Again
Gilc
I checked the help file but not very helpful.
So If I understand all I need to do is
Replace Macro>script name with Include>script name and it will run/call the next script
Or does the Include>script name go at the beginning of each script I want included?
Thanks Again
Gilc
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Just replace Macro>script name with Include>script name
If the documentation makes no sense to you then here's a sure fire way to understand the difference. Use the debugger. Create a simple script with one Include line, which calls another script. Open it in the editor and use F8 to step through the code. When yuou get to the Include like you'll see the included script lines appear in the editor. So it's as if the included code was PART of the script.
In contrast when you step past a Macro> line all that happens is that the macro gets executed. But the code is not "included".
If the documentation makes no sense to you then here's a sure fire way to understand the difference. Use the debugger. Create a simple script with one Include line, which calls another script. Open it in the editor and use F8 to step through the code. When yuou get to the Include like you'll see the included script lines appear in the editor. So it's as if the included code was PART of the script.
In contrast when you step past a Macro> line all that happens is that the macro gets executed. But the code is not "included".
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?
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
Dialog Variable Help
Marcus,
It worked as advertised.
Thank you for making using Macro Scheduler more fun to use.
Gilc
It worked as advertised.
Thank you for making using Macro Scheduler more fun to use.
Gilc
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
Dialog Variable Help
Marcus,
Now I have a strange upper/lower case issue happening with my variables.
I have "CapsOn" at the begging of my script, all may Dialog input shows
in upper case but when I send> it to my program it's all lower case, yes
I have verified that my caps lock is working correctly in my program.
I even add a message box to show my variable output and it's correct.
What makes this even stranger is I have another dialog that works just fine. Have any ideas about this one. I'm really puzzled.
Thanks
Gilc
Now I have a strange upper/lower case issue happening with my variables.
I have "CapsOn" at the begging of my script, all may Dialog input shows
in upper case but when I send> it to my program it's all lower case, yes
I have verified that my caps lock is working correctly in my program.
I even add a message box to show my variable output and it's correct.
What makes this even stranger is I have another dialog that works just fine. Have any ideas about this one. I'm really puzzled.
Thanks
Gilc
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You probably have Press Shift somewhere without a corresponding Release Shift thus those keys are being sent with Shift down which, with caps lock on, will result in lower case.
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?
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
Dialog Variable Help
Marcus, Me_Again,
I searched all macros in question and I don't have a missing Release Shift.
I started the script with the caps lock off and watched the light while running the script and
it came on and never went off, but the Send>variable is still lower case.
Hoping for more ideas!
Gilc
I searched all macros in question and I don't have a missing Release Shift.
I started the script with the caps lock off and watched the light while running the script and
it came on and never went off, but the Send>variable is still lower case.
Hoping for more ideas!
Gilc
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
When I read carefully what you wrote "I have "CapsOn" at the begging of my script, all may Dialog input shows in upper case but when I send> it to my program it's all lower case" then what you are seeing is normal.
If you Send>ABCDEF with the keyboard caps lock OFF, the result is "ABCDEF" but if you have the keyboard caps lock ON the result is a change of case so the result will be "abcdef".
If you Send>ABCDEF with the keyboard caps lock OFF, the result is "ABCDEF" but if you have the keyboard caps lock ON the result is a change of case so the result will be "abcdef".
Sending text with caps on is like sending text with the shift key down. The text will come out opposite case from what you send. Remove capson> from your script and send the text in the case you want to see it. I think of CapsOn and CapsOff as a convenience for setting the case for user input.
For proof, run this simple script. Sometimes simple testing goes a long way toward explaining "oddities".
[code]
run>notepad.exe
Wait>5
capson
Send>UPPER
Press Enter
send>lower
[/code]
For proof, run this simple script. Sometimes simple testing goes a long way toward explaining "oddities".
[code]
run>notepad.exe
Wait>5
capson
Send>UPPER
Press Enter
send>lower
[/code]
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
Dialog Variable Help
Me_Again, JRL
Thanks to both of you – Each had a piece of the puzzle that I needed.
I just had put them together in the right order.
It sure is nice when it all come together.
Gilc
Thanks to both of you – Each had a piece of the puzzle that I needed.
I just had put them together in the right order.
It sure is nice when it all come together.
Gilc
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
Dialog Variable Help Continued
I'm running a Dialog called Cont5_Dlg with vars ContNum & SNum_L1
When I run the test message below everthing works but %SN%
It's So simple, but I can't figure out why.
Help Please
Let>%Cont5_Dlg.SNum_L1% = SN
Message>%Cont5_Dlg.ContNum_L1%, %Cont5_Dlg.SNum_L1%, %Cont5_Dlg.ContCount%, %SN%
Also is there away to paste images in this post?
It would be nice to paste the message box here.
Thanks
Gilc[/img]
When I run the test message below everthing works but %SN%
It's So simple, but I can't figure out why.
Help Please
Let>%Cont5_Dlg.SNum_L1% = SN
Message>%Cont5_Dlg.ContNum_L1%, %Cont5_Dlg.SNum_L1%, %Cont5_Dlg.ContCount%, %SN%
Also is there away to paste images in this post?
It would be nice to paste the message box here.
Thanks
Gilc[/img]
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
You have "Let>%Cont5_Dlg.SNum_L1% = SN "
You should remove the %s and the spaces before and after the "=". Also remove any trailing space at the end of a line. Macro Scheduler reads the space characters literally, they are not a delimiter.
Try: Let>Cont5_Dlg.SNum_L1=SN
========================================
You can insert images on the post with the Img button and/or type in the code [img]http://image_url[/img].., The link must be available on the Internet, it is not uploaded to this site. There are a couple of free sites to store images, including http://tinypic.com.
Here is a snapshot of the Img* button using tinypic.com:

The actual code is {IMG}http://i39.tinypic.com/1zg876c.jpg{/IMG}
(I have disabled HTML and am using braces "{ }" vs. brackets "[ ]" for display on the forum).
You should remove the %s and the spaces before and after the "=". Also remove any trailing space at the end of a line. Macro Scheduler reads the space characters literally, they are not a delimiter.
Try: Let>Cont5_Dlg.SNum_L1=SN
========================================
You can insert images on the post with the Img button and/or type in the code [img]http://image_url[/img].., The link must be available on the Internet, it is not uploaded to this site. There are a couple of free sites to store images, including http://tinypic.com.
Here is a snapshot of the Img* button using tinypic.com:

The actual code is {IMG}http://i39.tinypic.com/1zg876c.jpg{/IMG}
(I have disabled HTML and am using braces "{ }" vs. brackets "[ ]" for display on the forum).
Last edited by Bob Hansen on Wed Feb 18, 2009 12:15 am, edited 2 times in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!