Arclite86 Posted January 24, 2014 Posted January 24, 2014 i have this code here #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 282, 93, 192, 124) $Edit1 = GUICtrlCreateEdit("", 0, 40, 281, 49) GUICtrlSetData(-1, "") $Button1 = GUICtrlCreateButton("start showing text", 0, 0, 281, 41) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd i want that if you push the "start showing text" button, a text will appearance on the $edit1 display how can i do this?
dcat127 Posted January 24, 2014 Posted January 24, 2014 #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 282, 93, 192, 124) $Edit1 = GUICtrlCreateEdit("", 0, 40, 281, 49) GUICtrlSetData(-1, "") $Button1 = GUICtrlCreateButton("start showing text", 0, 0, 281, 41) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 GUICtrlSetData($Edit1, "Text to show") EndSwitch WEnd
Arclite86 Posted January 24, 2014 Author Posted January 24, 2014 (edited) thank you, that was what i was looking for Edited January 24, 2014 by Arclite86
Arclite86 Posted January 24, 2014 Author Posted January 24, 2014 and what if you want to activate a function ?
Moderators JLogan3o13 Posted January 24, 2014 Moderators Posted January 24, 2014 (edited) Then change the line below to call your function: Case $Button1 GUICtrlSetData($Edit1, "Text to show") To: Case $Button1 _myFunc() Edited January 24, 2014 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Geir1983 Posted January 24, 2014 Posted January 24, 2014 #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ###Form= $Form1 = GUICreate("Form1", 282, 93, 192, 124) $Edit1 = GUICtrlCreateEdit("", 0, 40, 281, 49) GUICtrlSetData(-1, "") $Button1 = GUICtrlCreateButton("start showing text", 0, 0, 281, 41) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 GUICtrlSetData($Edit1, "Text to show") _MyFunction() EndSwitch WEnd Func _MyFunction() MsgBox(0, "Box", "I am called from a function" ) EndFunc
Arclite86 Posted January 24, 2014 Author Posted January 24, 2014 i am trying to activate this but it doesn work somehow expandcollapse popup#include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> #include <String.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 282, 93, 192, 124) $Edit1 = GUICtrlCreateEdit("", 0, 40, 281, 49) GUICtrlSetData(-1, "item1") $Button1 = GUICtrlCreateButton("start showing text", 0, 0, 281, 41) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Call ("find") Func find() $oIE = _IECreate("https://twitter.com/followbacklist3",1,0) $oInputs = _IETagNameGetCollection($oIE, "a") For $oInput In $oInputs If $oInput.className() = "js-nav" Then If StringInStr($oInput.innerHTML(), 'Volgers') Then ConsoleWrite(_StringBetween($oInput.innerHTML(),'>','<')[0] & @CRLF) ExitLoop EndIf EndIf Next EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 GUICtrlSetData($Edit1, "Text to show") _MyFunction(find) EndSwitch WEnd by the way, does somebody know the basic tutorials for GUI, or tell me how you guys have learn this all, so i dont have to ask all the time
Moderators Solution JLogan3o13 Posted January 24, 2014 Moderators Solution Posted January 24, 2014 (edited) Change this: Case $Button1 GUICtrlSetData($Edit1, "Text to show") _MyFunction(find) to this: Case $Button1 GUICtrlSetData($Edit1, "Text to show") find() Edit: as to learning about GUIs, there are some tutorials on the Wiki, but the examples in the help file is how I learned. Edited January 24, 2014 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
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