Sign in to follow this  
Followers 0
Guest 2s2p

Typing something to actvate a scirpt

7 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



Check the help file for HotKeySet. You may find all the answers you need


CheersNobby

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

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



While 1
    Sleep(100)
WEnd


Func Start()
MouseClick("left", x, y)
Sleep(1000)
MouseClick("left", x, y)
Sleep(1000)
MouseClick("left", x, y)
Sleep(1000)
EndFunc

Func Terminate()
    Exit 0
EndFunc

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

Share this post


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 ?


regards,Woocash[ACN]

Share this post


Link to post
Share on other sites

http://www.autoitscript.com/forum/index.php?showtopic=7112

Thats a link to a UDF created by Insolence called _MouseClickPlus() which enables you to click in minimized windows.


[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

UDF is for user-defined-function ? :)

thnx, i'll try to use it.


regards,Woocash[ACN]

Share this post


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.

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  
Followers 0