Jump to content
Sign in to follow this  
Canasian

Please help me with opening window certain size.

Recommended Posts

Canasian

Hello I'm wanting to make a little click bot for this simple flash shooting game it's very very simple not even other colors so it will be easy for me :D I'm just wanting to do this for a learning experience lol the url of the game is http://www.flashninjaclan.com/tutorialpage.php?ID=49

Can someone please help me with getting the window to open up only around the game? I saw a click bot example a long time ago but i tried to find it with search many times and i can't.. And is there a way to open up internet explorer straight to the url instead of how i usually just open firefox.exe then send Alt+D to go to address bar then send the url then push enter? lol there has to be a faster way. Well thank you for any comments or help.

Share this post


Link to post
Share on other sites
Skruge

OK so what i'm wanting to do is open up the game on the URL in a window with just the game.. would I have to create a GUI to do that? :D lol

I used the finder tool on the game and i got Position 324,211 and Size 599,419 does that help? http://www.flashninjaclan.com/tutorialpage.php?ID=49

The finder tool isn't very useful for web content. You need to look at the source instead.

#include <IE.au3>
 _IECreate("http://www.flashninjaclan.com/tutorialpages/shootinggame/shootinggame.swf")

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites
Canasian

The finder tool isn't very useful for web content. You need to look at the source instead.

#include <IE.au3>
 _IECreate("http://www.flashninjaclan.com/tutorialpages/shootinggame/shootinggame.swf")

Thank you very much :D is there a way to make it open maximized this way? or would i use something else to make it maximized?

Share this post


Link to post
Share on other sites
Canasian

Ok so.. I've started building on my project and this is what I have so far.. i'm sure there's a lot that can be fixed and added or subtracted.. so.. help me out please :o oh and big problem :D it clicks too slow.. is there a way to fix that? oh and what does #include <GUIConstants.au3> do?

here is my project:

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.0.0
 Author:         Mysticwonton

 Script Function:
    Shooting Game Clickbot

#ce ----------------------------------------------------------------------------
#include <IE.au3>

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

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.