Jump to content

Recommended Posts

Posted

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

Posted (edited)

$SpamUserName will return the control ID of your edit. Use GUICtrlRead to get the contents of the edit.

Edited 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]
Posted

#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.

Posted

That works!

MsgBox(0, "Message Sent",GUICtrlRead($SpamUserName))

Thanks- its a little up hill knowing it works in vba and not knowing in autoit

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...