gcue Posted June 4, 2008 Posted June 4, 2008 theres a userinput created $var from a child popup window after i delete the gui child i cant get to that var i tried setting it global Global $location=GUICtrlCreateInput("",10,10,220,25, $ES_UPPERCASE);10 i also have Global $location up at top but it doesnt carry over to later functions how can i carry it over?
Developers Jos Posted June 4, 2008 Developers Posted June 4, 2008 (edited) $Location contains the Handle to the Control which obviously will be gone after you Delete the GUI. Just do a GUICtrlRead() to retrieve the value before deleting the GUI. Edited June 4, 2008 by Jos 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.
gcue Posted June 4, 2008 Author Posted June 4, 2008 (edited) it doesnt carry over.. what am i doing wrong? $location_child=GUICreate("Enter Location Name:", 400,80, -1, -1, $WS_EX_MDICHILD) $location=GUICtrlCreateInput("",10,10,220,25, $ES_UPPERCASE);10 $OK_btn = GUICtrlCreateButton ("OK", 245,13,40,20,0x0300);13 GUICtrlSetOnEvent($OK_btn, "Location_Check") ...... EndFunc Func Location_Check() msgbox(0,"",Guictrlread($location)) <==== still readable guictrlread($location) GUIDelete($location_child) Find_IP () EndFunc Func Find_IP() msgbox(0,"",Guictrlread($location)) <===== no longer readable EndFunc Edited June 4, 2008 by gcue
Developers Jos Posted June 4, 2008 Developers Posted June 4, 2008 Read my reply again ... it does explain why... 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.
gcue Posted June 4, 2008 Author Posted June 4, 2008 hmm i did do a guictrlread before deleting the gui
Developers Jos Posted June 4, 2008 Developers Posted June 4, 2008 hmm i did do a guictrlread before deleting the guiI saw that, but you need to save the result of the GUICtrlRead() in A global variable and use that. 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.
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