John117 Posted July 13, 2007 Posted July 13, 2007 What is the reason that a blank box would return other than blank? Thanks! CODE#include <GuiConstants.au3> #include <file.au3> $window = GUICreate("Temp", 400, 400,400,400) $SpamUserName = GUICtrlCreateEdit("0", 200, 5, 30, 19, $ES_WANTRETURN);Left, Top, Right, Bottom GUISetState() While 1 if $SpamUserName <> "" then Call("SPAM_USER") WEnd Func SPAM_USER() MsgBox(0, "Message Sent", "'" & $SpamUserName & "'") EndFunc
mikehunt114 Posted July 13, 2007 Posted July 13, 2007 (edited) $SpamUserName will return the control ID of your edit. Use GUICtrlRead to get the contents of the edit. Edited July 13, 2007 by mikehunt114 IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
MHz Posted July 13, 2007 Posted July 13, 2007 #include <GuiConstants.au3> #include <file.au3> $window = GUICreate("Temp", 400, 400, 400, 400) $SpamUserName = GUICtrlCreateEdit("0", 200, 5, 30, 19, $ES_WANTRETURN);Left, Top, Right, Bottom GUISetState() While 1 If $SpamUserName <> "" Then Call("SPAM_USER") WEnd Func SPAM_USER() MsgBox(0, "Message Sent", "'" & GUICtrlRead($SpamUserName) & "'") EndFunc Use GuiCtrlRead() to read the control. The '3' is the ControlID.
John117 Posted July 13, 2007 Author Posted July 13, 2007 That works! MsgBox(0, "Message Sent",GUICtrlRead($SpamUserName)) Thanks- its a little up hill knowing it works in vba and not knowing in autoit
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