| View previous topic :: View next topic |
| Author |
Message |
thnx
Joined: 23 Jun 2008 Posts: 10 Location: Bulgaria
|
Posted: Fri Aug 22, 2008 9:06 am Post subject: Macro? |
|
|
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 |
|
 |
Hu (the guy from China) Guest
|
Posted: Fri Aug 22, 2008 1:38 pm Post subject: |
|
|
No, I can't.  |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 711 Location: Calgary, AB, Canada
|
Posted: Fri Aug 22, 2008 1:56 pm Post subject: Re: Who can help me? |
|
|
| 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 |
|
 |
SpiderGames
Joined: 09 Jun 2008 Posts: 464 Location: Canada
|
Posted: Fri Aug 22, 2008 3:23 pm Post subject: |
|
|
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 |
|
 |
thnx
Joined: 23 Jun 2008 Posts: 10 Location: Bulgaria
|
Posted: Sat Aug 23, 2008 9:06 am Post subject: |
|
|
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 |
|
 |
BoBo² Guest
|
Posted: Sat Aug 23, 2008 9:19 am Post subject: |
|
|
Your subject line sucks.  |
|
| Back to top |
|
 |
not logged in neyon Guest
|
Posted: Sat Aug 23, 2008 10:09 am Post subject: |
|
|
| Agree with Bobo. What answer do you espect? "I can", "I cannot"?? |
|
| Back to top |
|
 |
[VxE]
Joined: 07 Oct 2006 Posts: 1496
|
Posted: Sat Aug 23, 2008 10:19 am Post subject: |
|
|
| 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 |
|
 |
BoBo² Guest
|
Posted: Sat Aug 23, 2008 11:23 am Post subject: |
|
|
| 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". . So, it depends.  |
|
| Back to top |
|
 |
|