Jump to content
Sign in to follow this  
Masterphilly

using hotkeys to start, end, and restart and func

Recommended Posts

hello everybody, i'm new to AutoIt, it's only been about 2 weeks since i started, but i understand most of the basics

so i was trying to create a script to play this armorgames called Podz. it involves click on all the green balls before the time runs out. i was trying to make it so everytime you press "s" it would do the function. this is because you have to press a button in between each level. i also wanted to make so you could press "e" to end the function

so this is what i have so far:

#include <misc.au3>

$xcor = 259

$ycor = 200

$da = 1

Func podz()

sleep(100)

while $ycor < 593

If _IsPressed("45") Then ExitLoop

While $xcor < 727

MouseMove( $xcor, $ycor,0)

If PixelGetColor($xcor,$ycor) = 10870552 Then MouseClick("left")

$xcor += 2

WEnd

$ycor+=3

mousemove(0, $ycor,0)

$xcor = 0

WEnd

EndFunc

While 1

if _IsPressed("53") then podz()

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...