Jump to content
Sign in to follow this  

selecting a input box on a webpage

Recommended Posts


My code so far is

#include <GUIConstants.au3>
#include <IE.au3>

Global $oIE1 = _IECreateEmbedded()
Global $oIE2 = _IECreateEmbedded()

#Region ### START Koda GUI section ### Form=
$Browser = GUICreate("OptiBot", 800, 700, 185, 145)
$First_Group = GUICtrlCreateGroup("Optimusbot URL", 8, 10, 783, 510)

$GUIActiveX1 = GUICtrlCreateObj($oIE1, 25, 50, 750, 460)

$First_Link_Label = GUICtrlCreateLabel("Link", 16, 26, 24, 17)
$First_Link_Input = GUICtrlCreateInput("http://www.optimusbot.com/forum/index.php", 48, 24, 225, 21)
$Surf1_Button = GUICtrlCreateButton("Visit", 278, 24, 80, 21, 0)
GUICtrlCreateLabel("Make sure you fill in all the information before you click Visit.", 380, 27)
GUICtrlCreateLabel("Username", 16, 540, 47, 30)
$username = GUICtrlCreateInput("", 70, 537, 90, 20)
GUICtrlCreateLabel("Password", 180, 540, 47, 30)
$password = GUICtrlCreateInput("", 237, 537, 90, 20)

GUICtrlCreateLabel("Subject", 16, 580, 47, 30)
$subject = GUICtrlCreateInput("", 67, 580, 259, 20)

GUICtrlCreateLabel("Message", 16, 615, 47, 30)
$subject = GUICtrlCreateInput("", 67, 615, 259, 70)

GUICtrlCreateGroup("", -99, -99, 1, 1)
#EndRegion ### END Koda GUI section ###

While 1
    $msg = GUIGetMsg()
        Case $msg = $GUI_EVENT_CLOSE
        Case $msg = $Surf1_Button
            $GUICtrlReadFirstLink = GUICtrlRead($First_Link_Input)
            _IENavigate($oIE1, $GUICtrlReadFirstLink)


what i am trying to do is when you enter your username, password, subject and message and click visit it logs you in and selects 'Spam/Flame' Forum then creates a new topic with the Subject and Message you entered before. What i ask is if you can help me get it to select the username box on the right hand side of the page. I tried MouseMove but that failed, if you could point me in the right direction with a bit of code it will help so much. Also i did try searching around before i posted this. Also another thing i did not search for is could you create a second mouse to use on the program so you can do other things while it is running.

Thanks for your time. Also this is not a spambot im trying to do this for a project and i have been allowed to use their forums to test it.

Edited by cane

Share this post

Link to post
Share on other sites

Please strip your question down to just the specifics of the problem you are having - I presume all of the GUI code is unrelated.


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post

Link to post
Share on other sites

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
Sign in to follow this