Is this possible?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Cuyu
Newbie
Posts: 1
Joined: Sun Nov 17, 2019 5:48 pm

Is this possible?

Post by Cuyu » Sun Nov 17, 2019 6:23 pm

Hello and thanks in advance.I wanted to know if this is possible.
Let>x=0
Let>y=0
Let>x1=150
Let>y1=0
wait>3
label>start
Let>loop_count=0
Repeat>loop_count
mousemove>x,y
Wait>1
MouseMove>x1,y1
Wait>1
Let>loop_count=loop_count+1
Until>loop_count=10
Until>loop_count
Repeat>loop_count
mousemove>x,y
Wait>1
MouseMove>x1,y1
Wait>1
Let>loop_count=loop_count+1
Until>loop_count=10
Until>loop_count
Goto>start
label>end
    What i wanted to know if its possible to move the mouse 10 pixels down and 10 pixels to the left in each value and in every loop withouth having to do it mannually. Is this possible?

    User avatar
    Dorian (MJT support)
    Automation Wizard
    Posts: 1348
    Joined: Sun Nov 03, 2002 3:19 am
    Contact:

    Re: Is this possible?

    Post by Dorian (MJT support) » Mon Nov 18, 2019 9:13 am

    Yes, although I can't figure out why you want to do this. Once edited, it seems to do the same thing in two different loops, and then go back to the start again. You needed to reset loop_count (or use a different variable, and you had Until twice for each loop. Edited version below.

    If that isn't what you were trying to do, please let us know and we'll be happy to guide you.

    Code: Select all

    Let>x=0
    Let>y=0
    Let>x1=150
    Let>y1=0
    wait>3
    label>start
    Let>loop_count=0
    Repeat>loop_count
    mousemove>x,y
    Wait>1
    MouseMove>x1,y1
    Wait>1
    Let>loop_count=loop_count+1
    Until>loop_count=10
    Let>loop_count=0
    Repeat>loop_count
    mousemove>x,y
    Wait>1
    MouseMove>x1,y1
    Wait>1
    Let>loop_count=loop_count+1
    Until>loop_count=10
    Goto>start
    label>end
    
    Yes, we have a Custom Scripting Service. Message me or go here

    Post Reply
    Sign up to our newsletter for free automation tips, tricks & discounts