AutoHotkey Community

It is currently May 27th, 2012, 3:37 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: November 2nd, 2005, 1:45 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Hello,

on a big GUI I've sometimes the problem, that fast klicking on a listbox won't always call the subroutine specified at the g-label.

Code:
Gui, Add, ListBox, Section AltSubmit X8 Y50 H338 W120 vOptionsListBox gsub_OptionsListBox, %OptionsListBox%


I've found a workaround with a timer. Maybe this info could be used to improve the reliability.

Code:
sub_OptionsListBox:
   SetTimer, tim_OptionsListBox, 10
Return

tim_OptionsListBox:
   SetTimer, tim_OptionsListBox, Off
   ; the code ...
   ; ...
Return

_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 2nd, 2005, 1:59 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Does the code in the subroutine take a while to finish?
Then I assume it is:
Quote:
Clicking on a control while its g-label is already running from a prior click will have no effect and the event is discarded. To prevent this, use Critical as the subroutine's first line (however, this will also buffer/defer other threads such as the press of a hotkey).
*taken from the manual on GUI*

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 2nd, 2005, 2:43 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Ahh, thanks, I've missed the new command.

_________________
Tekl


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 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