Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
aboredprogrammer
- Junior Coder
- Posts: 40
- Joined: Wed Jan 27, 2010 6:31 am
Post
by aboredprogrammer » Mon Feb 01, 2010 8:44 pm
Hello,
I could use some help with the MainMenu= code. I cannot get it to show the message when the user clicks File>About
In the dialog I have it as this: MainMenu=File,About(30),Exit(40)
And here is the script I want it to run if the user clicks About:
Code: Select all
Label>Loop
GetDialogAction>dialog1,r
If>r=30
LibFunc>user32,MessageBoxA,r,0,Compiled 2-1-10,About...,262208
ResetDialogAction>Dialog1
EndIf
Wait>0.01
Goto>Loop
What could I be doing wrong?
Thanks
aboredprogrammer
-
JRL
- Automation Wizard
- Posts: 3532
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Mon Feb 01, 2010 9:15 pm
I put together a sample using your code copied and pasted directly from the forum and it works fine for me. Perhaps there is something wrong elsewhere in your script.
Code: Select all
Dialog>Dialog1
Caption=Dialog1
Width=445
Height=250
Top=272
Left=88
MainMenu=File,About(30),Exit(40)
Button=msButton1,179,164,75,25,0
EndDialog>Dialog1
Show>Dialog1
Label>Loop
GetDialogAction>dialog1,r
If>r=30
LibFunc>user32,MessageBoxA,r,0,Compiled 2-1-10,About...,262208
ResetDialogAction>Dialog1
EndIf
Wait>0.01
Goto>Loop
-
aboredprogrammer
- Junior Coder
- Posts: 40
- Joined: Wed Jan 27, 2010 6:31 am
Post
by aboredprogrammer » Tue Feb 02, 2010 1:41 am
Thanks for the reply.
Hmm, very odd. I just copied my original code and put it on a fresh script editor page and it works fine. Thanks JRL.
aboredprogrammer