Canasian Posted April 9, 2009 Share Posted April 9, 2009 Hello my question is.. is there a way to open this maximized? #include <IE.au3> _IECreate("http://www.flashninjaclan.com/tutorialpages/shootinggame/shootinggame.swf") And my other question is.. is there a way to make this click faster? does it click so slow cuz it searches the whole desktop width or am i missing something? While True If $shoot = True Then Dim $coordinates = PixelSearch(0,0, @DesktopWidth, @DesktopHeight, 0xFFFF00) If Not @error Then MouseClick("left",$coordinates[0],$coordinates[1],1,0) EndIf EndIf Thanks. Link to comment Share on other sites More sharing options...
Authenticity Posted April 9, 2009 Share Posted April 9, 2009 1) #include <IE.au3> Dim $o_IE = _IECreate('http://www.google.com/') WinSetState(_IEPropertyGet($o_IE, 'hwnd'), '', @SW_MAXIMIZE) 2) Search the help file for Opt functions. You can specify the delay for MouseClickDelay and MouseClickDownDelay. Keep in mind that if the PixelSearch is invoked with the entire desktop width and height and the resolution is something like 1600x1200 it may take time for the function to search for that color and if the color could not be found then the entire desktop was checked. Link to comment Share on other sites More sharing options...
Valuater Posted April 9, 2009 Share Posted April 9, 2009 First Question... This worked for me #include <IE.au3> $oIE = _IECreate ("www.autoitscript.com") WinWaitActive("") WinSetState("[active]", "", @SW_MAXIMIZE) 8) Link to comment Share on other sites More sharing options...
Valuater Posted April 9, 2009 Share Posted April 9, 2009 Additionally for answer #2 Use the "Step" option in pixelSearch step [optional] Instead of searching each pixel use a value larger than 1 to skip pixels (for speed). E.g. A value of 2 will only check every other pixel. Default is 1. 8) Link to comment Share on other sites More sharing options...
Canasian Posted April 10, 2009 Author Share Posted April 10, 2009 First Question... This worked for me #include <IE.au3> $oIE = _IECreate ("www.autoitscript.com") WinWaitActive("") WinSetState("[active]", "", @SW_MAXIMIZE) 8) Ty Valuater you're amazing that worked perfectly but... the flash game lags too much in internet explorer so i gotta use fire fox.. and um.. hm.. i tried doing that skip every other pixels thing.. but it misses the target all the time now lol and i tried to change it back and it still misses i dunno waht i'm doing.. and it didn't really make it faster lol.. sigh.. so this is what i have right now.. i need to make it faster and acurate.. any ideas? expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: Mysticwonton Script Function: Shooting Game Clickbot #ce ---------------------------------------------------------------------------- Opt("MouseCoordMode", 0) Opt("PixelCoordMode", 0) Opt("MouseClickDelay", 0) Opt("MouseClickDownDelay", 0) HotKeySet("{F8}","OpenGame") HotKeySet("{F9}","ShootOnOff") HotKeySet("{F10}","ExitApp") ToolTip("F8 = Open Game, F9 = Toggle Shoot, F10 = Exit bot",0,0) Dim $shoot = False Func OpenGame() Run("C:\Program Files\Mozilla Firefox\firefox.exe http://www.flashninjaclan.com/tutorialpages/shootinggame/shootinggame.swf", @TempDir, @SW_MAXIMIZE) EndFunc Func ShootOnOff() If $shoot = False Then $shoot = True ToolTip("Shooting",0,0) Else $shoot = False Tooltip("F8 = Open Game, F9 = Toggle Shoot, F10 = Exit Bot",0,0) EndIf EndFunc Func ExitApp() WinClose("shootinggame.swf (application/x-shockwave-flash Object)") Exit EndFunc While True If $shoot = True Then Dim $coordinates = PixelSearch(0,0, @DesktopWidth, @DesktopHeight, 0xFFFF00) If Not @error Then MouseClick("left",$coordinates[0],$coordinates[1],1,0) EndIf EndIf Sleep(500) WEnd Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now