| View previous topic :: View next topic |
| Author |
Message |
Snowdog
Joined: 03 Nov 2009 Posts: 4
|
Posted: Tue Nov 03, 2009 1:47 pm Post subject: Need simple mouse click Win7 |
|
|
I wanted to create a simple 100 mouse clicks in a face book app.
I am using win7 and was wondering if this app supports win7.
I know this is probably simple but after 10 mins I cant get it to run. I tried the autoscript writer but didnt have much luck getting it to run. I will spend more time reading later today for sure but if someone can point me to a simple "How to " or a sample script that would sure help. The first step is always the hardest  |
|
| Back to top |
|
 |
Snowdog
Joined: 03 Nov 2009 Posts: 4
|
Posted: Tue Nov 03, 2009 2:15 pm Post subject: |
|
|
so I am trying a few combinations of
!c::
Send {Click}
or
!c::
Send {Click 5}
But no luck.
Browser is Firefox and the facebook app is a Flash game (Fishworld)
I also tried it in IE |
|
| Back to top |
|
 |
OceanMachine
Joined: 15 Oct 2007 Posts: 780 Location: England
|
Posted: Tue Nov 03, 2009 2:34 pm Post subject: |
|
|
Have you tried just Click?
Seems strange that it doesn't work how you have specified, but I don't have Windows 7 to test with...
You could also try changing the send mode:
| Code: | | SendInput {Click 5} |
Also you could try MouseClick:
| Code: | | MouseClick, left, , , 5 |
Of course all of these methods rely on the mouse pointer being at the position you want to click at the time when the hotkey is activated (because no co-ordinates are being specified).
Let us know how you get on - it might be something weird in the way Windows 7 is interpreting the commands?
I tried the script you put above, and it works fine on WinXPSP3 with FireFox (although the browser should have nothing to do with it)...
Pressing Alt-C activates this (just checking you are using the correct key sequence to fire your hotkey).
Do you have anything else in your script that might be interfering with this? If so, please post the whole script.
Last edited by OceanMachine on Tue Nov 03, 2009 2:50 pm; edited 1 time in total |
|
| Back to top |
|
 |
Rizzit
Joined: 02 Nov 2009 Posts: 19
|
Posted: Tue Nov 03, 2009 2:46 pm Post subject: |
|
|
Hello
try Click instead Send
| Code: | !c::
Click 231, 212
|
With this if u press c u click on coordinate 231, 212 (active window)
if u want to loop this like 100 times
| Code: | !c::
loop 100
{
Click 231, 212
}
|
Im way to noob to explain more custom things hope I could help u a little |
|
| Back to top |
|
 |
OceanMachine
Joined: 15 Oct 2007 Posts: 780 Location: England
|
Posted: Tue Nov 03, 2009 2:52 pm Post subject: |
|
|
| Rizzit wrote: |
With this if u press c |
Alt-c  |
|
| Back to top |
|
 |
Snowdog
Joined: 03 Nov 2009 Posts: 4
|
Posted: Tue Nov 03, 2009 4:14 pm Post subject: |
|
|
Mostly when I try the suggestions I bet
Error at line ..
Error This line does not contain a recognized action when I try to run the script.
!c::
SendInput {Click 5}
or
!c::
Click 231, 212
but
!c::
MouseClick, left, , , 5
That clicked 1 time. so at least I am makign headway I am not sure what the 3 commas do after the "left"
WOW!
I think this works adn ran 50 times:
!c::
loop 10
MouseClick, left, , , 5
Sweet! |
|
| Back to top |
|
 |
OceanMachine
Joined: 15 Oct 2007 Posts: 780 Location: England
|
Posted: Tue Nov 03, 2009 4:55 pm Post subject: |
|
|
What version of AutoHotkey are you using please?
The Click and SendInput commands are only version 1.0.43+
Remember, if you are having problems, always make sure you have the latest version of AHK! (I have also made that mistake before).
You can check what version you have as follows:
| Code: | | MsgBox, %A_AhkVersion% |
With regard to the MouseClick command:
| AHK Manual wrote: | | MouseClick [, WhichButton , X, Y, ClickCount, Speed, D|U, R] |
And for the X and Y values:
| AHK Manual wrote: | | If omitted, the cursor's current position is used |
So all I am doing with the 3 columns is specifying "nothing" for the X and Y co-ordinates. Feel free to fill them in if you know the exact co-ordinates on the screen you want to click (you can find this using the Window Spy app that comes installed with AHK). Specifying "nothing" means it will just click wherever the mouse pointer currently is.
Also, you do not have to loop 10 times, you can just change the number of clicks to 50, like so:
| Code: | !c::
MouseClick, left, , , 50 |
This will click at the mouse's current position 50 times. |
|
| Back to top |
|
 |
Snowdog
Joined: 03 Nov 2009 Posts: 4
|
Posted: Tue Nov 03, 2009 5:57 pm Post subject: |
|
|
Damn, I dl'ed it from twocows v 1.02x <laugh> I just upgraded, thanks for the reminder!
| OceanMachine wrote: | What version of AutoHotkey are you using please?
You can check what version you have as follows:
| Code: | | MsgBox, %A_AhkVersion% |
|
|
|
| Back to top |
|
 |
|