AutoHotkey Community

It is currently May 26th, 2012, 11:05 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: November 3rd, 2009, 2:47 pm 
Offline

Joined: November 3rd, 2009, 2:41 pm
Posts: 4
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 :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2009, 3:15 pm 
Offline

Joined: November 3rd, 2009, 2:41 pm
Posts: 4
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2009, 3:34 pm 
Offline

Joined: October 15th, 2007, 3:10 pm
Posts: 790
Location: England
Have you tried just Click?
Code:
Click 5


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 November 3rd, 2009, 3:50 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2009, 3:46 pm 
Offline

Joined: November 2nd, 2009, 1:47 pm
Posts: 19
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2009, 3:52 pm 
Offline

Joined: October 15th, 2007, 3:10 pm
Posts: 790
Location: England
Rizzit wrote:
With this if u press c


Alt-c :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2009, 5:14 pm 
Offline

Joined: November 3rd, 2009, 2:41 pm
Posts: 4
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!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2009, 5:55 pm 
Offline

Joined: October 15th, 2007, 3:10 pm
Posts: 790
Location: England
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2009, 6:57 pm 
Offline

Joined: November 3rd, 2009, 2:41 pm
Posts: 4
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%




Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: JSLover, Kirtman, Miguel, XstatyK and 57 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group