AutoHotkey Community

It is currently May 26th, 2012, 7:40 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: May 10th, 2009, 9:06 pm 
Offline

Joined: March 28th, 2009, 7:19 pm
Posts: 5
I need to increment a mouse click in a loop
from
MouseClick, left, 213, 343
to
MouseClick, left, 203, 361

the difference in the Y direction is about 18 units

how do I do this

the macro is below



Code:
IfWinNotActive, Pipes: editing 'search for articles' - Mozilla Firefox, , WinActivate, Pipes: editing 'search for articles' - Mozilla Firefox,
WinWaitActive, Pipes: editing 'search for articles' - Mozilla Firefox,
MouseClick, left,  217,  14
Sleep, 100
MouseClick, left,  211,  319
Sleep, 100
Send, {CTRLDOWN}v{CTRLUP}
MouseClick, left,  174,  297
Sleep, 100
MouseClick, left,  213,  343
Sleep, 100

loop, 10
{
WinWait, NoName03.txt - Notepad,
IfWinNotActive, NoName03.txt - Notepad, , WinActivate, NoName03.txt - Notepad,
WinWaitActive, NoName03.txt - Notepad,
MouseClick, left,  218,  7
Sleep, 100
Send, {HOME}{DOWN}{SHIFTDOWN}{END}{SHIFTUP}{CTRLDOWN}c{CTRLUP}
WinWait, Pipes: editing 'search for articles' - Mozilla Firefox,
IfWinNotActive, Pipes: editing 'search for articles' - Mozilla Firefox, , WinActivate, Pipes: editing 'search for articles' - Mozilla Firefox,
WinWaitActive, Pipes: editing 'search for articles' - Mozilla Firefox,
MouseClick, left,  416,  15
Sleep, 100
Send, {CTRLDOWN}v{CTRLUP}
MouseClick, left,  171,  301
Sleep, 100
MouseClick, left,  203,  361
Sleep, 100
}


Last edited by EdC on May 10th, 2009, 9:19 pm, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 10th, 2009, 9:13 pm 
Offline

Joined: May 7th, 2009, 9:03 pm
Posts: 13
Hi!

I'm a little confused by the code you posted. Is the first section part of the entire script or is the entire script only the loop?

I recommend using [ code] and [/ code] tags to include only your whole script.

As I understand it now, all you want your program to do is copy some text from a txt file and then paste it into firefox 10 times, each time moving the paste position in firefox a few pixels over?

That said, MouseClick accepts expressions, so you can include a variable that (one for X and one for Y) that is incremented by the specific amount of pixels.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 10th, 2009, 9:22 pm 
Offline

Joined: March 28th, 2009, 7:19 pm
Posts: 5
thanks for helping

yes you got it right copy text from a txt file and paste it into firefox 10 times in a different position

how do I do that


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 10th, 2009, 9:27 pm 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
Inside the loop this will work:
Code:
MouseClick, left, 213, 325 + (A_Index * 18)

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 10th, 2009, 9:42 pm 
Offline

Joined: March 28th, 2009, 7:19 pm
Posts: 5
thanks that did it


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Azevedo, perlsmith and 66 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