Lord_Doominik Posted June 21, 2005 Posted June 21, 2005 1. is there a chance to do a request, if an input box is marked, so, that you can type in it? 2. do you can change the value, which is shown in an input box? f.e.: $input = GUICtrlCreateInput("bla", ...) $input = "nyo" or $input = GUICtrlSetData("nyo") dont changes the value...
quick_sliver007 Posted June 23, 2005 Posted June 23, 2005 You can change the value in the script with this line GUICtrlSetData($input ,"nyo") .
Lord_Doominik Posted June 24, 2005 Author Posted June 24, 2005 You can change the value in the script with this lineGUICtrlSetData($input ,"nyo")<{POST_SNAPBACK}>thx!does anybody know if here is a way to have a request like If input box is marked?
quick_sliver007 Posted June 25, 2005 Posted June 25, 2005 (edited) thx!does anybody know if here is a way to have a request like If input box is marked?<{POST_SNAPBACK}>See if this helps you any.#include <GuiConstants.au3> $gui = GuiCreate("MyGUI", 392, 323,(@DesktopWidth-392)/2, (@DesktopHeight-323)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Input_1 = GuiCtrlCreateInput("Input1", 40, 20, 310, 190) $Button_2 = GuiCtrlCreateButton("set focus to this button", 50, 220, 290, 40) $Button_3 = GuiCtrlCreateButton("set focus to the input", 50, 280, 290, 40) GuiSetState() While 1 $msg = GuiGetMsg() $b = ControlGetFocus ( $gui ) Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_2 $a = ControlGetFocus ( $gui ) MsgBox(0,$a,$a) Case $msg = $Button_3 ControlFocus($gui, "", $Input_1) MsgBox(0,"","Changeing the focus to the $Input_1 also known as edit1") $a = ControlGetFocus ( $gui ) MsgBox(0,"The new focus is "&$a,"The new focus is "&$a) If $a = "edit1" Then MsgBox(0,$a,"I hope this helps you.") EndIf ;;;;;;;;;;;;;;;$b = ControlGetFocus ( $gui ) Case $b = "edit1" msgBox(0,$b,"I hope this helps you.") ControlFocus($gui, "", $Button_2) MsgBox(0,"","Changeing the focus to $Button_2 also known as button1") $a = ControlGetFocus ( $gui ) MsgBox(0,"The new focus is "&$a,"The new focus is "&$a) EndSelect WEnd Exit Edited June 25, 2005 by quick_sliver007 .
Lord_Doominik Posted June 27, 2005 Author Posted June 27, 2005 hm tryed it but it dont works at my script o.O... im going to check it another times.... but the code is like the code in your example o.O
quick_sliver007 Posted June 28, 2005 Posted June 28, 2005 (edited) hm tryed it but it dont works at my script o.O... im going to check it another times.... but the code is like the code in your example o.O<{POST_SNAPBACK}>The exsample should work just fine. I think what is getting you is that controlID's are not the same as the variables you set to the controls. The MsgBoxes are there to show you that. Like "edit1" is the controlID of the control $Input_1 in the script.Also did you try clicking the Input? Try clicking the different controls in the GUI to see the results. Edited June 28, 2005 by quick_sliver007 .
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