Page 1 of 1

free money???

Posted: Sat Jan 21, 2012 12:11 pm
by Golbez
i started making a script for: ezswag.com/swagbucks/watcher/index.php with autoit3. alot of it works but im having trouble when the message box apears the script seems to not click ok on the message box. i figured i could get help to convert it from autoit to Solar code.

autoit code:

Code: Select all

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


Global $site = "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
edit: autoit fourm --> http://www.autoitscript.com/forum/topic ... ge-window/