pnut Posted October 27, 2006 Share Posted October 27, 2006 Hey there I've just made a script that clicks randomly around the screen and pressing Alt+Q at the same time. Having this done, I felt a sense of achievement for myself. I would like some ideas for improvements like a GUI. This script is pretty basic - #notrayicon HotKeySet("{F11}", "_exit") $delay = 500 Break(0) While 1 Sleep($delay) MouseMove(Random(0, @DesktopWidth), Random(0, @DesktopHeight), 0) Send("ALTQ") Sleep($delay) WEnd Func _exit() Break(1) Exit EndFunc If possible i want the script to continuously click ALT+Q while clicking the screen at 0.5 second interval. Much thanks from me Link to comment Share on other sites More sharing options...
Valuater Posted October 27, 2006 Share Posted October 27, 2006 just before the while loop use... AdlibEnable ( "function" [, time] ) and place the send() command inside the function.. see help 8) Link to comment Share on other sites More sharing options...
pnut Posted October 27, 2006 Author Share Posted October 27, 2006 Oh thx I'm kinda new into this, btw how do u make specific mouseclicks. For example, i want it to click at the top of my screen and the bottom of my screen, and how do i get coordinates. Link to comment Share on other sites More sharing options...
Valuater Posted October 27, 2006 Share Posted October 27, 2006 0 = top of screen @DesktopHeight = bottom of screen use MouseClick() - see help 8) Link to comment Share on other sites More sharing options...
pnut Posted October 28, 2006 Author Share Posted October 28, 2006 Sorry for the trouble but what about a specific location of the screen? I'd like to know how to get coordinates Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted October 28, 2006 Share Posted October 28, 2006 use the autoit window info that comes with autoit or run this press the home key and it will copy the coords to the clipboard in the format x,y HotKeySet("{Home}","capture") HotKeySet("{Esc}","quit") While 1 Sleep(25) $pos = MouseGetPos() ToolTip("x = " & $pos[0] & "," & "y = " & $pos[1],$pos[0] + 10,$pos[1] + 10) WEnd Func capture() ClipPut($pos[0] & "," & $pos[1]) EndFunc Func quit() Exit EndFunc Link to comment Share on other sites More sharing options...
pnut Posted October 28, 2006 Author Share Posted October 28, 2006 Hey thanks man. Btw i made a new script- #notrayicon HotKeySet("{F11}", "_exit") Break(0) While 1 MouseClick("left") Sleep(200) Send ("!q") WEnd Func _exit() Break(1) Exit EndFunc Basically its something to prevent me from getting kicked in a game for being inactive. I'd like to know how can i make the script run without even playing the game. For example, i run the script and i do not have to switch to my game screen for it to work. Probably it require WaitWinActive function but i don't know how to use it. I'm asking this as i have to be away in a game doing projects with my friends. Thanks again Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now