Jump to content

Typing something to actvate a scirpt

Recommended Posts

Ok for a game i play i was wondering if i could make a scipt that clicks like 3 times in differents of the screen when i say something

If i press these keys Enter, The type /auto, Enter

then the scipt clicks the place waits 1 sec clicks differnt place then waits an clicks again

though i can do the clicking part though i dont even know if autoit has a function for the other part :?

Edited by 2s2p
Link to post
Share on other sites

You will probably need to have the autoit script start with windows in the startup menu if you want it to work all the time without opening it each time you want to play the game.

Just start the script with a winwaitactive

or if winexists

Here is an example that uses F11 to start the macro

HotKeySet("{F11}", "Start")
HotKeySet("{ESC}", "Terminate")

While 1

Func Start()
MouseClick("left", x, y)
MouseClick("left", x, y)
MouseClick("left", x, y)

Func Terminate()
    Exit 0

Replace "yourgame" with the name of the window of your game

Replace X and Y in Mouseclick with the X,Y cordinates of where you want the clicks to happen

Edited by megahyperion
Link to post
Share on other sites

one more question about clicking...

is it possible to make script which clicks on button on webpage every X minutes? Maybe even if web-browser window is minimised ?

I've got a access to some database via web and it logs me off if I don't clik for a few (10?) minutes... so I thought about auto-clicking "refresh"...

(I cannot use browser "refresh" as it crashes the application)

i think it could work but I'm not sure:

;Check the browser window state (active, non-active, minimised)

;Make it active and maximised

;Auto-click in certain cords

;Restore browser window state as it was at the beggining of the loop

what do You think about it ?


Link to post
Share on other sites

Good to see my function being put to use :)

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...