jftuga Posted April 1, 2013 Posted April 1, 2013 If I use: for $i=1 to 10 $entry = IniRead( $ini_file, "main", "input" & $i, "") $g_inp[$i] = GUICtrlCreateInput($entry, $x+30, $y-2, 260 ) $g_btn[$i] = GUICtrlCreateButton("submit", $x+300, $y-6, 100 ) $btn_num.add($g_btn[$i],$i) $y += 28 next while 1 $msg = GUIGetMsg() switch $msg case $GUI_EVENT_CLOSE exitloop case $g_btn[1] to $g_btn[10] ; do more stuff $i = $btn_num.item($msg) endswitch wend ... everything works well. The problem I have is that 'do more stuff' case section executes when focus is tabbed from the input to the button. I only want this case section activated when the button is clicked, not simply getting focus. How can I fix this? Thanks, -John Admin_Popup, show computer info or launch shellRemote Manager, facilitates connecting to RDP / VNCProc_Watch, reprioritize cpu intensive processesUDF: _ini_to_dict, transforms ini file entries into variablesUDF: monitor_resolutions, returns resolutions of multiple monitorsReport Computer Problem, for your IT help deskProfile Fixer, fixes a 'missing' AD user profile
Developers Jos Posted April 1, 2013 Developers Posted April 1, 2013 (edited) You need to do the inputs first and the buttons next in separate loops because else the input handles are within the button handle range. Jos Edited April 1, 2013 by Jos jftuga 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
jftuga Posted April 1, 2013 Author Posted April 1, 2013 Thanks Jos. This fixed the problem! -John Admin_Popup, show computer info or launch shellRemote Manager, facilitates connecting to RDP / VNCProc_Watch, reprioritize cpu intensive processesUDF: _ini_to_dict, transforms ini file entries into variablesUDF: monitor_resolutions, returns resolutions of multiple monitorsReport Computer Problem, for your IT help deskProfile Fixer, fixes a 'missing' AD user profile
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now