Ready Radio Button In Dialog

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
edauthier
Pro Scripter
Posts: 84
Joined: Sun Apr 13, 2003 1:26 pm
Location: USA

Ready Radio Button In Dialog

Post by edauthier » Mon May 21, 2007 8:51 pm

I hope I am not being a knucklehead, but does anyone have a Dialog that when a value is placed by the user the next button can be readied without using mouse or Tab?

There's no real script to post so here's a simple scenario to help make sense of my question:

Dialog appears asking for username and has a 'go' button.
As soon as the user begins typing in the field for username the 'go' button is ready for an [ENTER] instead of using the mouse or tabbing over to it then hitting enter.

Thanks in advance, Ed

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon May 21, 2007 9:05 pm

Trouble is - that would require the radio button to have the focus. But only one thing can have the focus at once, so you'd remove focus from the edit box and then whatever the user is typing won't end up there!
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon May 21, 2007 10:08 pm

Use Default=[Button Name] in the dialog definition.

Here's an example:

Code: Select all

Dialog>Dialog1
   Caption=User Name
   Width=333
   Height=151
   Top=CENTER
   Left=CENTER
   Label=Enter your username,96,16
   Edit=msEdit1,16,32,289,
   Button=Go,112,64,75,25,3
   Default=Go
EndDialog>Dialog1

Show>Dialog1,r1
If>r1=2,EOF
If>r1=3,Continue
Label>Continue
MDL>My name is %dialog1.msedit1%

Label>EOF

edauthier
Pro Scripter
Posts: 84
Joined: Sun Apr 13, 2003 1:26 pm
Location: USA

Thanks

Post by edauthier » Wed May 23, 2007 3:46 pm

Cheers!!! That's a nice workaround.

Ed

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts