Jump to content

Mouseclick and #include IE.au3 question


Recommended Posts

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

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

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 :o that worked perfectly but... the flash game lags too much in internet explorer :D 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?

#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

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
 Share

  • Recently Browsing   0 members

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