Derto Posted July 20, 2008 Share Posted July 20, 2008 Hey. I got an GUICreateInpute function but when i put something on the textbox i cant get it back. when i enter the variable by myself with $pw="blabla" it works then, when i try to get it back from the text bow, it doesnt work, so there is a problem with it but i dont know where :''( ty CODE #include <GUIConstantsEx.au3> $gogo = 1 GUICreate("Test", 400, 400) Opt("GUIOnEventMode", 1) GUICtrlCreateLabel("Password :", 20, 105) $pwLine = GUICtrlCreateInput("", 107, 105, 273, 20) $pw = GUICtrlRead($pwLine) $go = GUICtrlCreateButton("Start", 10, 360, 90) GUICtrlSetOnEvent ($go, "go") GUISetState(@SW_SHOW) do until $gogo = 0 run("notepad.exe") sleep(1000) send($pw & "{enter}") Func go() $gogo = 0 EndFunc Link to comment Share on other sites More sharing options...
pete1234 Posted July 21, 2008 Share Posted July 21, 2008 So you want the value to be typed into Notepad? #include <GUIConstantsEx.au3> $gogo = 1 GUICreate("Test", 400, 400) Opt("GUIOnEventMode", 1) GUICtrlCreateLabel("Password :", 20, 105) $pwLine = GUICtrlCreateInput("", 107, 105, 273, 20) $go = GUICtrlCreateButton("Start", 10, 360, 90) GUICtrlSetOnEvent ($go, "go") GUISetState(@SW_SHOW) do $pw = GUICtrlRead($pwLine) until $gogo = 0 run("notepad.exe") sleep(1000) send($pw & "{enter}") Func go() $gogo = 0 EndFunc You were reading the value before you could enter a value into the input box Link to comment Share on other sites More sharing options...
Cha0sBG Posted July 21, 2008 Share Posted July 21, 2008 (edited) Yeah You Have To Include a Local in the function like so : Local $PwLine = GuiCtrlRead($pw)oÝ÷ Ø ÝN§ ©e:ëSâèq©KG+ºÚ"µÍÙ[ ÌÍÔÓ[H [È ][ÝÞÑ[I][ÝÊ Edited July 21, 2008 by Cha0sBG Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. 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