AutoHotkey Community

It is currently May 27th, 2012, 10:50 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: November 16th, 2004, 6:58 am 
Offline

Joined: November 16th, 2004, 6:38 am
Posts: 153
Location: New York
Hi.

Recently discovered AutoHotkey and am amazed at how powerfully, yet compatibly, it extends good old AutoIt2. Great job, and thanks!

Playing with the Gui features, I think I may have stumbled onto an issue: I thought that if an option like gLABEL is added to a radio button, the subroutine at LABEL would be executed when the state of the button changes, but it appears in fact to also execute when the button merely gains focus (e.g. via the Tab key). In fact, if the radio button is the first control in a dialog, its associated subroutine executes as soon as the dialog is displayed.

Thanks again,

Jacques.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 16th, 2004, 1:56 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thanks for reporting it. I've updated the installer to fix it: http://www.autohotkey.com/download/

"Fixed radio buttons so that receiving focus does not generate an unwanted launch of the g-label."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 17th, 2004, 5:48 am 
Offline

Joined: November 16th, 2004, 6:38 am
Posts: 153
Location: New York
Amazing response. Thank you, Chris.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2004, 12:54 am 
Offline

Joined: October 12th, 2004, 11:34 pm
Posts: 74
Location: São Paulo ,Brazil
just downloaded new version, and my radio gsub are not working anymore.
Must I change something in my scripts?
thanks

EDIT
It is working...but only after a second click on the radio buttons


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Not quite fixed...
PostPosted: November 18th, 2004, 5:13 am 
Offline

Joined: November 16th, 2004, 6:38 am
Posts: 153
Location: New York
Hi.

After testing, it appears that the radio gLabel is now executed when the first radio button in the group is selected (with a mouse click or space bar) or when the arrow key is used to navigate between radio buttons, but it is *not* executed if radio buttons other than the first are directly selected via mouse click.

This sample code illustrates this (it displays three radio buttons -- none of which is selected by default -- and a disabled check box. I wanted to have the check box become enabled only when one of the radio buttons has been selected):

Gui, Add, Text,, Select a button:
Gui, Add, Radio, gEnableCheck vRadioValue, Radio option 1
Gui, Add, Radio, gEnableCheck, Radio option 2
Gui, Add, Radio, gEnableCheck, Radio option 3
Gui, Add, Checkbox, Disabled vCheckValue, Checkbox option
Gui, Show,, Test
Return

EnableCheck:
GuiControl, Enable, CheckValue
Return

GuiClose:
ExitApp

CORRECTION:
Also found that the gLabel is in fact executed if a radio button is clicked twice.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2004, 9:42 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I think I've fixed quite a few problems thanks to your detailed reports. Here are the details:

Fixed radio buttons so that: 1) the g-label won't be launched just because the button receives keyboard focus; 2) the g-label is launched once rather than twice for each selection of a new button via the arrow keys; 3) focus is on the correct radio in the group when the group receives keyboard focus; and 4) back-to-back radio groups give their first radio button a tabstop.

If you have time, please re-download and give it a try. http://www.autohotkey.com/download/


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Works for me!
PostPosted: November 20th, 2004, 12:59 pm 
Offline

Joined: November 16th, 2004, 6:38 am
Posts: 153
Location: New York
The new behavior appears to be perfect. Thanks, Chris.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2004, 4:13 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thanks for the feedback -- and for your original bug reports (without which it probably would have stayed broken for a month).


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group