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 

How do I increment a mouse click

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



Joined: 28 Mar 2009
Posts: 5

PostPosted: Sun May 10, 2009 8:06 pm    Post subject: How do I increment a mouse click Reply with quote

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 Sun May 10, 2009 8:19 pm; edited 2 times in total
Back to top
View user's profile Send private message
34t



Joined: 07 May 2009
Posts: 13

PostPosted: Sun May 10, 2009 8:13 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
EdC



Joined: 28 Mar 2009
Posts: 5

PostPosted: Sun May 10, 2009 8:22 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Frankie



Joined: 02 Nov 2008
Posts: 2850

PostPosted: Sun May 10, 2009 8:27 pm    Post subject: Reply with quote

Inside the loop this will work:
Code:
MouseClick, left, 213, 325 + (A_Index * 18)

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run
Back to top
View user's profile Send private message
EdC



Joined: 28 Mar 2009
Posts: 5

PostPosted: Sun May 10, 2009 8:42 pm    Post subject: Reply with quote

thanks that did it
Back to top
View user's profile Send private message
Display posts from previous:   
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