Sign in to follow this  
Followers 0
Enlil

HELP!

13 posts in this topic

Is there a command or routine that will allow me to click and hold the left mouse button for a few seconds at at a given set of coordinates and then move to a new set of coordinates while holding the left mouse button then release the left mouse button at the new set of coords?

:whistle:

Share this post


Link to post
Share on other sites



Thanks Jdeb & Larry. I think Larry has what I need. Now the MouseDown command will press the left mouse button down during which I can Sleep for a second or two, then MouseMove,x,y to the spot i wish to release it at and Mouse Up. Am I understanding you correctly?

Share this post


Link to post
Share on other sites

Yeap, should work.... something like:

MouseMove(50, 10)

MouseDown("left")

Sleep(2000)

MouseMove(500, 500, 0)

MouseUp("left")

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

MouseMove(50, 10)

MouseDown("left") <--- left must be contained within quotations within parenthesis?

Sleep(2000)

MouseMove(500, 500, 0)

MouseUp("left") <--- left must be contained within quotations within parenthesis?

Again, I thank you for your help.

Share this post


Link to post
Share on other sites

Enlil,

Could it be that you are mixing V2 and V3 syntax?

This is from the v3 beta helpfile:

MouseDown( "button" )

button, "left", "right" or "middle".

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

possibly......

I just DLed it 3 days ago from hiddensoft.com....I'm not even sure what version it is.

Share this post


Link to post
Share on other sites

It was v.2, Jos. Can anyone put this v.2 script in v.3 syntax for me. I tried last night at home, but coudn't get it to work in v.3. I couldn't find a list of commands for v.3.

start:

Send, {F1}

Send, {Enter}

LeftClick, ##,##

LeftClick, ##,##

LeftClick, ##,##

LeftClick, ##,##

LeftClick, ##,##

LeftClick, ##,##

Sleep, 4000

Send, {Enter}

Sleep, 2000

LeftClick, ##,##

Sleep, 2000

Send, {Enter}

Sleep, 2000

Send, {Enter}

Sleep, 2000

LeftClick, ##,##

Sleep, 2000

Send, {Enter}

Sleep, 2000

Goto, start

Share this post


Link to post
Share on other sites

Enlil,

You can find all functions in the AutoIT.CHM which is part of the installset on the download page.

Anyway this should be close:

while 1=1

Send, {F1}

Send({Enter})

mouseClick( "left" ,x ,y)

mouseClick( "left" ,x ,y)

mouseClick( "left" ,x ,y)

mouseClick( "left" ,x ,y)

mouseClick( "left" ,x ,y)

mouseClick( "left" ,x ,y)

Sleep(4000)

Send({Enter})

Sleep(2000)

MouseClick( "left" ,x ,y )

Sleep(2000)

Send({Enter})

Sleep(2000)

Send({Enter})

Sleep(2000)

MouseClick( "left" ,x ,y )

Sleep(2000)

Send({Enter})

Sleep(2000)

wend

jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Jos, you've been a big help.

Does this 'wend' statement at the end of the script acts the same as the goto, start statement in my v.2 script? Also, just to be certain....I noticed the spaces between the open and close parenthesis and the open and close quotation marks in the mouseClick statments.....is this correct?

Edited by Enlil

Share this post


Link to post
Share on other sites

hi

You made a small mistake.

New:

while 1=1

Send ("{F1}")

Send("{Enter}")

mouseClick( "left" ,x ,y)

mouseClick( "left" ,x ,y)

mouseClick( "left" ,x ,y)

mouseClick( "left" ,x ,y)

mouseClick( "left" ,x ,y)

mouseClick( "left" ,x ,y)

Sleep(4000)

Send("{Enter}")

Sleep(2000)

MouseClick( "left" ,x ,y )

Sleep(2000)

Send("{Enter}")

Sleep(2000)

Send("{Enter}")

Sleep(2000)

MouseClick( "left" ,x ,y )

Sleep(2000)

Send("{Enter}")

Sleep(2000)

wend

Greetz Silvan


Sorry, which my English is so bad. I come from Switzerland ;-)

Share this post


Link to post
Share on other sites

Thank you Silvanr

Share this post


Link to post
Share on other sites

Thanks Silvanr... :whistle: you are right I did a quick 'n dirty conversion without testing. could be other mistakes in there....

Enlil,

the While ... wend is an endless loop ... this version of AutoIt is Goto-Less

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0