Jump to content

help? click ok on message window


Golbez
 Share

Recommended Posts

hi there. im trying to make a script that will open a webpage, then wait for a message box to appear then click ok. not really sure why its not working.

#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <IE.au3>
#include <WindowsConstants.au3>
#include <Java.au3>

Global $site = "http://ezswag.com/swagbucks/watcher/sbtv9.php"
Global $okwindow = "[CLASS:#32770]"
Global $buttonclick = "[CLASS:Button; INSTANCE:1]"

_IEErrorHandlerRegister()
Local $ie = _IECreateEmbedded()
GUISetIcon("Icon.ico")
GUICreate("Money Clicker", 420, 500, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
        $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN, $WS_EX_TOPMOST)
GUICtrlCreateObj($ie, 2, 2, 420, 500)
GUISetState() ;Show GUI
_IENavigate($ie, $site)
_IEPropertySet($ie, "addressbar", False)
_IEPropertySet($ie, "menubar", False)
_IEPropertySet($ie, "statusbar", False)
_IEPropertySet($ie, "toolbar", False)
_IELoadWait($ie)
While 1
    Local $msg = GUIGetMsg()
If WinExists($okwindow) Then clickok()
    If WinActive($okwindow) Then clickok()
    Select
  Case $msg = $GUI_EVENT_CLOSE
   GUIDelete()
        EndSelect
WEnd

Func Terminate()
Exit 0
EndFunc
Func clickok()
ControlClick("","", $okwindow, $buttonclick, 1)
EndFunc
Link to comment
Share on other sites

  • Moderators

Hi, Golbez. The only pop up messages I see on this site concern restarting the bot and checking for the captcha. Not sure if you'll get much assistance on this one.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Developers

ok so cant you just point me in the direction of click ok on the message box?

You are here long enough to understand our rules.

So consider this your last warning.

oh, and that last post was plainly stupid.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...