AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Macro?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
thnx



Joined: 23 Jun 2008
Posts: 10
Location: Bulgaria

PostPosted: Fri Aug 22, 2008 9:06 am    Post subject: Macro? Reply with quote

Hello.. I wanna make a script with pressing keys and mouse movement so it would be like..
when I hold binded key it starts this algorithm:

Press A (key)
Mouse move left
Speed -300
Sleep 1 (1 millisecond)
Speed 300
Sleep 1
Release A (key)
Stop mouse move
Press D (key)
Mouse move right
Speed -300
Sleep 1
Speed 300
Sleep 1
Release D (key)
Stop mouse move

I'm not soo good at AHK scripting so I would be thankful for some help..
P.S. dunno if theres any negative speed values of mouse moving.. but I can edit it a little if there isn't.

[Title edited. Please write descriptive titles for your topics. ~jaco0646]
Back to top
View user's profile Send private message
Hu (the guy from China)
Guest





PostPosted: Fri Aug 22, 2008 1:38 pm    Post subject: Reply with quote

No, I can't. Sad
Back to top
Sivvy



Joined: 21 Jul 2008
Posts: 711
Location: Calgary, AB, Canada

PostPosted: Fri Aug 22, 2008 1:56 pm    Post subject: Re: Who can help me? Reply with quote

thnx wrote:
1.Press A (key)
2.Mouse move left
3.Speed -300
4.Sleep 1 (1 millisecond)
5.Speed 300
6.Sleep 1
7.Release A (key)
8.Stop mouse move
9.Press D (key)
10.Mouse move right
11.Speed -300
12.Sleep 1
13.Speed 300
14.Sleep 1
15.Release D (key)
16.Stop mouse move


1. Look up "Send", or "SendInput".
2. Look up "MouseMove".
3. Same as 2.
4. You have this one correct.
5. Same as 2.
6. Correct again.
7. Same as 1.
8. It will stop.
9. Same as 1.
10. Same as 2.
11. Same as 2.
12. This is correct.
13. Same as 2.
14. This is also correct.
15. Same as 1.
16. Once again, it will stop.

As far as I can see... You only need to look in 2 pages of the helpfiles. That doesn't take long, and there are always plenty of examples.
Back to top
View user's profile Send private message MSN Messenger
SpiderGames



Joined: 09 Jun 2008
Posts: 464
Location: Canada

PostPosted: Fri Aug 22, 2008 3:23 pm    Post subject: Reply with quote

have u even open the HELP file? lol!
It's like the 3'd part in the tutorial an du could do that.
_________________

Xfire: SpiderGames77
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
thnx



Joined: 23 Jun 2008
Posts: 10
Location: Bulgaria

PostPosted: Sat Aug 23, 2008 9:06 am    Post subject: Reply with quote

Okay I made somethin' but I still have some questions..

Send {A down}
MouseMove L ; Correct ?
Speed -30 ; Does negative value works ?
Sleep 1
Speed 30
Sleep 1
Send {A up}
;Stop mousemove ?
Send {D down}
Mouse Move R ; Correct ?
Speed -30 ; Does negative value works ?
Sleep 1
Speed 30
Sleep 1
Send {D up}
;Stop mousemove ?
Back to top
View user's profile Send private message
BoBo²
Guest





PostPosted: Sat Aug 23, 2008 9:19 am    Post subject: Reply with quote

Your subject line sucks. Confused
Back to top
not logged in neyon
Guest





PostPosted: Sat Aug 23, 2008 10:09 am    Post subject: Reply with quote

Agree with Bobo. What answer do you espect? "I can", "I cannot"??
Back to top
[VxE]



Joined: 07 Oct 2006
Posts: 1496

PostPosted: Sat Aug 23, 2008 10:19 am    Post subject: Reply with quote

Code:
Send {A down} ; ok
Click, -50, 0, Left, 0, Relative ; MouseMove L ; Correct ?
 ; not a command ; Speed -30 ; Does negative value works ?
Sleep 1 ; ok
 ; not a command ; Speed 30
; Sleep 1 ; ok
Send {A up} ; ok
;Stop mousemove ? ; comments are good
Send {D down} ; ok
Click, 50, 0, Left, 0, Relative ; don't put spaces in a command word ; Mouse Move R ; Correct ?
 ; not a command ; Speed -30 ; Does negative value works ?
Sleep 1 ; ok
 ; not a command ; Speed 30
; Sleep 1 ; ok
Send {D up} ; ok
;Stop mousemove ? ; yes, and post using [code][/code] tags

If I asked Bobo² whether he knew the time... he'd reply "yes".
_________________
My Home Thread
More Common Answers: [1]. It's in the FAQ [2]. Ternary ( a ? b : c ) guide [3]. Post code inside [code][/code] tags !
Back to top
View user's profile Send private message
BoBo²
Guest





PostPosted: Sat Aug 23, 2008 11:23 am    Post subject: Reply with quote

Quote:
If I asked Bobo² whether he knew the time... he'd reply "yes".
If requested verbaly, "It's <timestamp>", at a subject line "yes". Cool. So, it depends. Wink
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group