GeekS Posted September 17, 2008 Share Posted September 17, 2008 Lets say we have a GUI with an input box like this: $BeltInput1 = GUICtrlCreateInput("FCR", 369, 281-20, 31, 20, $ES_CENTER, $WS_EX_TRANSPARENT) GUICtrlSetFont(-1, 8, 1500, 0, "Arial") GUICtrlSetBkColor(-1, 3223601) GUICtrlSetColor(-1, 0xFFFFFF) Now, whenever i want to insert something in the box instead of "FCR", i have to "Overwrite" it. I want it to automatically remove the "FCR" whenever i click a box. Thanks in advance, Gnu / GeekS. Link to comment Share on other sites More sharing options...
YellowLab Posted September 17, 2008 Share Posted September 17, 2008 (edited) GUICtrlSetData may be the function you are looking for. GUICtrlSetData($BeltInput1,"The New Data") or GUICtrlSetData($BeltInput1,"") for nothing Bob Edited September 17, 2008 by YellowLab You can't see a rainbow without first experiencing the rain. Link to comment Share on other sites More sharing options...
GeekS Posted September 19, 2008 Author Share Posted September 19, 2008 It's not exactly the command GUICtrlSetData i'm searching for. However i want it to do the same as you wrote, only when i click on the inputbox. Link to comment Share on other sites More sharing options...
oren Posted September 19, 2008 Share Posted September 19, 2008 Try using GUIGetMsg (1) This give you a array... Try reading the array and then you'll know what to do... Link to comment Share on other sites More sharing options...
GeekS Posted September 22, 2008 Author Share Posted September 22, 2008 Try using GUIGetMsg (1) This give you a array... Try reading the array and then you'll know what to do... Sadly it doesnt actually tell me anything out from this: $array[0] = 0 or Event ID or Control ID $array[1] = The window handle the event is from $array[2] = The control handle the event is from (if applicable) $array[3] = The current X position of the mouse cursor (relative to the GUI window) $array[4] = The current Y position of the mouse cursor (relative to the GUI window) Anyone who can help me actually read how to make that array usefull for my purpose? Link to comment Share on other sites More sharing options...
nuki Posted September 22, 2008 Share Posted September 22, 2008 #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $gui = GUICreate("GUI", 434, 58, 193, 125) $input = GUICtrlCreateInput("blub", 16, 16, 393, 21) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() $cmsg = GUIGetCursorInfo($gui) If $msg = $GUI_EVENT_CLOSE Then Exit If $cmsg[4] = 3 AND $cmsg[2] = 1 Then GUICtrlSetData($input,"") WEnd have fun =] Link to comment Share on other sites More sharing options...
nuki Posted September 22, 2008 Share Posted September 22, 2008 (edited) / sorry for double post :S forum bug Edited September 22, 2008 by nuki Link to comment Share on other sites More sharing options...
GeekS Posted September 22, 2008 Author Share Posted September 22, 2008 (edited) Thanks Nuki for helping, helped me out there . Didnt end up exactly the way you said but something like it: Case $msg = $GUI_EVENT_PRIMARYUP Dim $Item[44] = ["", $HelmInput1, $HelmInput2, $HelmInput3, $HelmInput4, $AmuletInput1, $AmuletInput2, $AmuletInput3, $AmuletInput4, $WeaponInput1, $WeaponInput2, $WeaponInput3, $WeaponInput4, $ArmorInput1, $ArmorInput2, $ArmorInput3, $ArmorInput4, $ShieldInput1, $ShieldInput2, $ShieldInput3, $ShieldInput4, $GlovesInput1, $GlovesInput2, $GlovesInput3, $Ring1Input1, $Ring1Input3, $BeltInput1, $BeltInput2, $BeltInput3, $BeltInput4, $Ring2Input1, $Ring2Input3, $BootsInput2, $BootsInput3, $BootsInput4, $CharmsInput2, $CharmsInput3, $CharmsInput4, $SkillsInput3, $Skillsinput4] $click=GUIGetCursorInfo() For $count = 1 to 43 If $click[4] = $Item[$count] Then GUICtrlSetData($item[$count],"") Next This topic can be closed. Edited September 22, 2008 by GeekS Link to comment Share on other sites More sharing options...
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