Jump to content
Sign in to follow this  

Visit website bot

Recommended Posts


I want to make a bot like this, so you can type your URL into input1 and it visits the website you've typed, and input2 for how many times. My code looks like this, but it visits "3" instead of the input. It works if you do quotes, but not If I do with Input.

Should I refresh the "Inputs" ?

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>


#Region ### START Koda GUI section ### Form=d:\program files\autoit3\scite\koda\forms\winner_dk's website visit bot.kxf
$Form1 = GUICreate("WinneR_DK's Website visit bot", 418, 192, 193, 125)
$Input1 = GUICtrlCreateInput("http://www.Google.com/", 16, 32, 385, 21)
$Label1 = GUICtrlCreateLabel("Website", 184, 8, 43, 17)
$Label2 = GUICtrlCreateLabel("Visits", 192, 64, 28, 17)
$Input2 = GUICtrlCreateInput("10", 160, 88, 97, 21)
$Button1 = GUICtrlCreateButton("Visit Youtube.com!", 120, 160, 177, 25, 0)
$Label4 = GUICtrlCreateLabel("F8 to visit the website!", 152, 112, 109, 17)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button1
    $oIE = _IECreate()
    _IENavigate($oIE, "http://www.Youtube.com")

Func Visit()
$oIE = _IECreate()
For $i = 1 To $Input2
    _IENavigate($oIE, $Input1);Website
ToolTip("Page:  " & $Input1 & "    Times Loaded: " & $i, 0, 1)

Share this post

Link to post
Share on other sites

Use GuiCtrlRead($Input1) to obtain the information from the input box.

Share this post

Link to post
Share on other sites

Pain is correct.

As the documentation says GUICtrlCreateInput Returns the identifier (controlID) of the new control. Not the input. To obtain the value of the control see GUICtrlRead.

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.