spootnick Posted August 11, 2011 Posted August 11, 2011 i was searching on the internet, and i kinda fell over this site. Im new at this autoit thing, and i have searched alot, trying to find something, usefull, without luck. I want to make a script, that moves the mouse to a specific location, then do one mouse click, and then move the mouse to another location, and then do a click, and so on. i have the cords for where the mouse should click, i have figered that out. but i don't know if MouseClick could do it, or do i have to make a Mousemove First, and then do a mouse click? I have tryed to fit the cords and all that in to Mouseclick, but it seems that i ain't putting it the right place, because its getting red every time i try. And i don't know how to get the window name, is it just the name in top of the window i have to get? If someone could post, an exampel, of where to put the window name, and cords, and maybe tell me witch commands i sould use, "mouseclick" or "mousemove then click" It would be vary helpfull Thanks alot,
wakillon Posted August 11, 2011 Posted August 11, 2011 No need to use MouseMove between 2 MouseClick. For window title, you need to use AutoIt Window Info Tool. AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
spootnick Posted August 11, 2011 Author Posted August 11, 2011 okay, so i just have to use Mouseclick, and with that, i can get the mouse moving to specific location? Could you try post and exampel ?
monoscout999 Posted August 11, 2011 Posted August 11, 2011 (edited) The window name or window title is the text located in the top of the window. you can get this title (that sometimes is hidden) using the AutoIt Window Info Tool that comes with AutoIt.About the function, bout ways are fine, if you use MouseMove you probably end up using MouseClick without coordenates in his parameters. Read the HelpFile in detail when you want to learn to implement some function, also the HelpFile has examples at the end where you can see how is implemented that function.If you want to have an easy way to open the help file in a specific function, you should......Click once in the text of the function...Press F1 KeyThis works when you use the SciTe Editor(I strongly recommend to download the full version of this editor and use it)And at the end i left to you an example of MouseClick() and MouseMove() functionToolTip("Moving mouse to the 0, 0 coordenates",500,0) mousemove(0,0,50) ; I set the speed parameter to "50") ToolTip("Clicking once Right Click at the Coordenates 500, 500",500,0) mouseclick("right",500,500,1,50) ToolTip("Clicking three left Click at the Coordenates 0," &@desktopheight,500,0) mouseclick("left",0,@desktopheight,3,50) ; look for @desktopheight in the help file, is a MACRO ToolTip("Clicking Left Click at the Middle of the screen",500,0) mouseclick("Left",@desktopwidth/2,@desktopheight/2,1,50) ToolTip("Moving the mouse at different speeds",500,0) For $i = 0 to 5 ; A loop mousemove(Random(0,@desktopwidth,1),Random(0,@desktopheight,1),Random(0,100,1)) next ToolTip("")And welcome! Edited August 11, 2011 by monoscout999
spootnick Posted August 11, 2011 Author Posted August 11, 2011 How do i get it to loop, so when its done, it just do it again, and again, and again, ? And where do i put in the window name, so that when i have a window open, it will click in the window? And thanks, for the exampel, i have found out how to make it work now, now i just need the loop, and how to get it to click in a window
wakillon Posted August 11, 2011 Posted August 11, 2011 You can use While / WEnd for a loop but show what you already have done. AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
Blue_Drache Posted August 11, 2011 Posted August 11, 2011 (edited) Vague topic with no example code is vague. Perhaps OP is trying to avoid saying *WHAT* he wants it for simply because it may be against forum rules? Suggestion... use notepad to learn with. Edited August 11, 2011 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
Bert Posted August 11, 2011 Posted August 11, 2011 Vague topic with no example code is vague. Perhaps OP is trying to avoid saying *WHAT* he wants it for simply because it may be against forum rules?Suggestion... use notepad to learn with.agreed The Vollatran project My blog: http://www.vollysinterestingshit.com/
monoscout999 Posted August 11, 2011 Posted August 11, 2011 anyway the user is noob in scriptting, but i agree that he has to show us the code that he is working with. sorry if my english is not good.
Blue_Drache Posted August 11, 2011 Posted August 11, 2011 (edited) Regarding the OP's original question about moving the mouse and/or clicking the mouse... MouseMove() MouseClick() A simple click on the functions will bring up the online help. Or ... if you prefer ... Middle click so you can keep this page open. Read. Learn. Enjoy. Edited August 11, 2011 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
spootnick Posted August 11, 2011 Author Posted August 11, 2011 Okay okay, im not trying to do anything aginst forum rules, I am just trying to make the mouse move, and click specific locations, im not trying to make anything big, just trying to learn. I have to start some place? And get the mouse moving, is a good start, getting it to click at a specific pos, is allso good to learn, then i wanna learn, how to get it click in a specific window. What i have larned so far is this. mouseclick("left",400,400,1,50); "Mouseclick" is the command - "left" is witch button on the mouse it should use - "400,400" is the cords - "1" is how many clicks - "50" is the speed don't think that learning is aginst forum rules? What i asking about is, that when i get it to move from pos 400,400 to 546,347 (exampel) i need it to start over then go back to 400,400 and then 546,347 again, a loop. what i don't understand is that, when i get the cords in a window, and put it in the script, the mouse is not moving to the pos where i got the cords in the first place? And if i understand it right, its because i need to put in the name of the window, but where do i put it in? can you give an exampel? Sorry for bad english!
BrewManNH Posted August 11, 2011 Posted August 11, 2011 Vague topic with no example code is vague. Perhaps OP is trying to avoid saying *WHAT* he wants it for simply because it may be against forum rules?Suggestion... use notepad to learn with.AS I am to understand how the rules are interpreted, if the poster doesn't say it's for a game, and it's not obvious from the code posted or from what the user has posted that it's for a game, it's legitimate to ask any questions. Until such time that it's obvious that it's for a game, that's when the helping should stop. Anything else is badgering a poster because you are trying to get them to confess something before you have evidence that they're doing anything against the rules. I look at it this way, assume that the poster is innocent until you can prove otherwise. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
spootnick Posted August 11, 2011 Author Posted August 11, 2011 Thank you BrewManNH. Im not making any script for any game Just trying to learn (: Hope someone could help me with my last post
PowerCat Posted August 11, 2011 Posted August 11, 2011 Thank you BrewManNH. Im not making any script for any game Just trying to learn (: Hope someone could help me with my last post while 1 mouseclick("left",400,400,1,50) mouseclick("left",546,347,1,50) WEnd
spootnick Posted August 11, 2011 Author Posted August 11, 2011 i got another question, can i make, so that when the mouse click, it hold it down? Lets say mouseclick at 400,359 and then hold it down until 400,538? (eksempel)
wakillon Posted August 11, 2011 Posted August 11, 2011 i got another question, can i make, so that when the mouse click, it hold it down?Lets say mouseclick at 400,359 and then hold it down until 400,538? (eksempel)MouseClickDrag ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
Blue_Drache Posted August 11, 2011 Posted August 11, 2011 You also want to make sure the specific window is active. WinActivate() WinWaitActive() Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
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