Zithen Posted August 26, 2005 Posted August 26, 2005 i'm sure that its been done already, but havnt found it yet. trying to do something simple, when you click the mouse it will take the postion and break it up to 2 $vars one for the X cord and one for the Y cord. how could i go about doing this. in the mean time i will keep looking, but havnt found anything yet
Valuater Posted August 26, 2005 Posted August 26, 2005 i'm sure that its been done already, but havnt found it yet.trying to do something simple, when you click the mouse it will take the postion and break it up to 2 $vars one for the X cord and one for the Y cord. how could i go about doing this.in the mean time i will keep looking, but havnt found anything yet<{POST_SNAPBACK}>staright from help$pos = MouseGetPos() MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1])8)
SupraNatural Posted August 26, 2005 Posted August 26, 2005 Im starting to wonder if ppl even read the help files first. Visit http://www.blizzedout.com/forums/register....referrerid=8306 for the top blizzard hacks. WoW, TfT, D2/LOD, CS. You name it we got it!
Zithen Posted August 26, 2005 Author Posted August 26, 2005 Im starting to wonder if ppl even read the help files first.<{POST_SNAPBACK}>ok yes i know that part, sorry for not explaining that part.the part i am having the issue is when you click the mouse part. theres no function or anything for on mouse click. I know how to pull the position, but need to do it when the mouse is click. is there a command or function that will do that part when you click the mouse?
Moderators SmOke_N Posted August 26, 2005 Moderators Posted August 26, 2005 Look up _IsPressed in search and use MouseGetPos(). Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
BigDod Posted August 26, 2005 Posted August 26, 2005 #include <IsPressed.au3> While 1 Sleep(100) If _IsPressed('01') = 1 Then $pos = MouseGetPos() MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1]) EndIf WEnd Exit I got this working for you but I have not figured out how to turn it off at the end Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
Moderators SmOke_N Posted August 26, 2005 Moderators Posted August 26, 2005 (edited) Or someone could just write it for you BigDod, are you talking about after it clicks? #include <IsPressed.au3> While 1 Sleep(100) If _IsPressed('01') = 1 Then $pos = MouseGetPos() MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1]) Sleep(500) ExitLoop EndIf WEnd Edit: Oops it would of exited if it wasn't clicked before... LOL. Edited August 26, 2005 by ronsrules Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Zithen Posted August 26, 2005 Author Posted August 26, 2005 Thanks guys for that, ispressed is what i needed. I kinda remembered something about that a while ago but didnt remember the command..droped autoit for a little and forgot about all the good UDF's PS thanks for the tid bits of code will save me about 2 mins of coding hehe =P
Wepwawet Posted August 26, 2005 Posted August 26, 2005 http://www.torrez.org/projects/xumouse.shtmlWith the above app I can set a Delay before the mouse clicks agian but I need something like a delay 45 sec to 55 sec and its just clicks at a random time inbetween 45 and 55 sec?I posted on another board and was sent to AutoIt but I have never scripted before :"> so am real lost. Can this be done using AutoIt? Wheres a good place to start? Thanks
SupraNatural Posted August 26, 2005 Posted August 26, 2005 A good place to start is telling us what you want done. Saying delay the mouse 45 secs doesn't help much, I'd reccomend reading the helpfile and searching it for "mouse" and "sleep" Visit http://www.blizzedout.com/forums/register....referrerid=8306 for the top blizzard hacks. WoW, TfT, D2/LOD, CS. You name it we got it!
Wepwawet Posted August 26, 2005 Posted August 26, 2005 All I want it to do is click the Left mouse button, But I dont want it at set rate like 45 sec so every 45 it clicks= bad for me What i would like is say variables are 45 sec and 55 sec so every 45-55 sec it just clicks the left mouse button but i need the values of the time between the two set variables to change. exp 45 sec first click 49 sec sec click 47 sec third click 54 sec forth click so basicly just random picking of when the mouse is clicked without a static value. I have read the help and think i could do most of it myself but dont see where/how to get it to pick a random number between the time variables. I hope I explained it well, but have a habit of making things sound more complacted then they really are. Thanks for the help
therks Posted August 26, 2005 Posted August 26, 2005 (edited) Check out the Random function. It has a minimum and maximum setting.$delay = Random(45, 55, 1) (the 1 ensures the return will be an integer, no decimal places) Edited August 26, 2005 by Saunders My AutoIt Stuff | My Github
Wepwawet Posted August 27, 2005 Posted August 27, 2005 Cpl quick questions1) Is this the right form to keep asking lots of questions form a total new to script writing person such as myself?2) Expression in this script here can i put anything?? like to end the looping I would like to hit a key on my keyboard- How would i put the key in so the program sees that i pushed it so it will stop the script?3) Am I on the right track for what I want this to do?4) Should I make a GUI like XUMOUSE above so i can just enter my variables and have a start/stop button for ease of use? Where now I would have to edit the script everytime to change my variables($delay = Random( [55 [,60 [,0 ]]] ))5) Being that this is my first ever script would 4 be WAY to hard to where I am pulling my hair out trying to figure it out?; Script Start - MouseClick ( "Left" [, 29, 85 [, 1 [, 10 ]]] )$delay = Random( [55 [,60 [,0 ]]] )While <expression> statements ...WEndThanks for everyones time that is helping me, If there is a better place to be posting these types of questions please let me know where.
herewasplato Posted August 27, 2005 Posted August 27, 2005 It would have been better to start a new post for this round of questions. This string of posts (thread) belongs to Zithen. It makes a difference to the way some users read the forum and how some are notified of when another member posts to "their" thread. 1) Other than that, yes - this is the correct forum (place) to ask. 2) See help file under HotKeySet - steal the code at the bottom of that page. 3) Yes 4) Stay away from GUI on first script - use InputBox function 5) Not too hard at all... stick with it. The brackets "[" in your lines of code are not correct... they specify [optional] parameters. You might want to start a new post for your next round of questions...... [size="1"][font="Arial"].[u].[/u][/font][/size]
SupraNatural Posted August 27, 2005 Posted August 27, 2005 *applauds herewasplato* Nicely put. Visit http://www.blizzedout.com/forums/register....referrerid=8306 for the top blizzard hacks. WoW, TfT, D2/LOD, CS. You name it we got it!
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