pdark1987 Posted March 24, 2015 Posted March 24, 2015 MouseClick("left" 624, 375, 1,10) ;op app sleep(2000) MouseClick("left" [,680, 1113 [, click = 1 [speed = 10]]]) ;switch windows app MouseClickDrag("left", 601, 960, 280, 960) ;close op app MouseClick("left" [,576, 962 [, click = 1 [speed = 10]]]) ; root explorer MouseClick("left" [,346, 196 [, click = 1 [speed = 10]]]) ; document main when i run script get error: line 2 mouseclick("left"624,375,1,10) mouselick"^ERROR error:error in expression im new to this try do a kinda like a marco, but will try to add more functions once i get some of the bassics down.. btw thats the sstart of the script not sure i need to start it some other way..
Solution SadBunny Posted March 24, 2015 Solution Posted March 24, 2015 (edited) You forgot the comma between "left" and 624. Also in the rest of your code, the square brackets (meaning "[" and "]") in the helpfile indicate optional arguments. So a text like "Function _myFunction(arg1 [, arg2])" means that arg1 is necessary, and arg2 is optional. So in the case of MouseClick, the helpfile states: MouseClick ( "button" [, x, y [, clicks = 1 [, speed = 10]]] ) This means that you can do: MouseClick("left") or MouseClick("left", 10, 20) (note: x and y are on the same "level of optional" so to speak, you can choose to either not supply both or supply both) or MouseClick("left", 10, 20, 2) ("clicks = 1" as an argument means that if you do not specify it, it defaults to 1, in this case we do set it to 2) or MouseClick("left", 10, 20, 2, 5) (again, "speed = 10" means "default to 10 if not given as argument".) Hope this makes it somewhat more clear. Edited March 24, 2015 by SadBunny Roses are FF0000, violets are 0000FF... All my base are belong to you.
Moderators JLogan3o13 Posted March 24, 2015 Moderators Posted March 24, 2015 pdark1987, what kind of document are you trying to manipulate? I can almost guarantee there is an easier way than using Mouseclicks, which will only lead to headache SorryButImaNewbie 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
SorryButImaNewbie Posted March 24, 2015 Posted March 24, 2015 FileMove could probably achive what you are aiming for, generally MouseClick is kind of a last resort thing.
pdark1987 Posted March 24, 2015 Author Posted March 24, 2015 thanks guys.got the the clicks to work. next question if i save a image has an bitmap image and want to click it at the x,y location when image loads? because sometime it take a bit longer to load cuz of the connections.. and also how can i start and stop a script cuz of sometimes when it misses and i want to stop it? thanks for everything
JohnOne Posted March 25, 2015 Posted March 25, 2015 Quote if i save a image has an bitmap image and want to click it at the x,y location when image loads Loads in what? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
pdark1987 Posted March 25, 2015 Author Posted March 25, 2015 i meant click that x,y location when the image shows
JohnOne Posted March 25, 2015 Posted March 25, 2015 Shows where? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Moderators JLogan3o13 Posted March 25, 2015 Moderators Posted March 25, 2015 J1 is asking the same question that has been asked since post #3. What application are you trying to automate? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
pdark1987 Posted March 27, 2015 Author Posted March 27, 2015 im trying to play around with droid4x emulator on pc..
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