Shammyshanks Posted January 24, 2011 Share Posted January 24, 2011 I wanted to make a script that left click a place on my computer screen every 2 seconds in a windowed program, problem is its not doing anything when i have the window up but when i leave my desktop open it works fine this is what I'm using Sleep(2000); While 1 < 2 MouseMove(1014, 811, 0); //Click Start MouseClick("Left"); Sleep(2000); WEnd Link to comment Share on other sites More sharing options...
Fubarable Posted January 24, 2011 Share Posted January 24, 2011 (edited) .... problem is its not doing anything when i have the window up but when i leave my desktop open it works fine ...Can you clarify this statement above? What exactly is working and what exactly isn't working? this is what I'm using Sleep(2000); While 1 < 2 MouseMove(1014, 811, 0); //Click Start MouseClick("Left"); Sleep(2000); WEnd You'll want to enclose your code in code tags which will make it easier for others to read. e.g., Sleep(2000); While 1 < 2 MouseMove(1014, 811, 0); //Click Start MouseClick("Left"); Sleep(2000); WEnd Much luck and welcome to the fourm! Edited January 24, 2011 by Fubarable Link to comment Share on other sites More sharing options...
Shammyshanks Posted January 24, 2011 Author Share Posted January 24, 2011 the script doesnt work when i have the program up but when i minimize it, it works fine Link to comment Share on other sites More sharing options...
Zibit Posted January 24, 2011 Share Posted January 24, 2011 (edited) you are trying to make a game bot or some sort? i know various games that use Ahn's lab hackshield it blocks out all MouseClick simulations (even Send function). if you are not trying to bot prove me otherwise. Edit: why this Sleep(2000); While 1 < 2 MouseMove(1014, 811, 0); //Click Start MouseClick("Left"); Sleep(2000); WEnd when you can do it like this While 1 Sleep(2000) MouseClick("Left", 1014, 811, 1, 0) WEnd Edited January 24, 2011 by Zibit Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam 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