Jump to content

Recommended Posts

Hello,
I need to correct this script.
 

Quote

######################### reserve


Func _restart($r)
    ShellExecute(@ScriptName)
    Exit
EndFunc   ;==>_restart

Func Running()    
    $x = $i * 45 + 150
    $x2 = $i * 10 + 313

    # chose map
    MouseClick($MOUSE_CLICK_LEFT, 114, 14, 1)
    sleep(4000)
    MouseClick($MOUSE_CLICK_LEFT, 632, 51, 1)
    sleep(4000)
    ClipPut ("https://www.opentable.de/r/my-lyn-baden-baden")
    sleep(4000)
    Send("^v")
    sleep(3000)
    Send("{ENTER}")
    Sleep(15000)
    MouseClick($MOUSE_CLICK_LEFT, 953, 714, 1)
    sleep(4000)
    MouseClick($MOUSE_CLICK_LEFT, 953, $x2, 1)
    sleep(4000)
    MouseClick($MOUSE_CLICK_LEFT, 886, 774, 1)
    sleep(5000)
    If $i = 0 Then
    MouseClick($MOUSE_CLICK_LEFT, 805, 844, 1)
    sleep(8000)
    ElseIf $i = 1 Then
    MouseClick($MOUSE_CLICK_LEFT, 892, 849, 1)
    sleep(8000)
    ElseIf $i = 2 Then
    MouseClick($MOUSE_CLICK_LEFT, 965, 843, 1)
    sleep(8000)
    ElseIf $i = 3 Then
    MouseClick($MOUSE_CLICK_LEFT, 807, 893, 1)
    sleep(8000)
    ElseIf $i = 4 Then
    MouseClick($MOUSE_CLICK_LEFT, 896, 880, 1)
    sleep(8000)
    ElseIf $i = 5 Then
    MouseClick($MOUSE_CLICK_LEFT, 886, 774, 1)
    sleep(8000)
    ElseIf $i = 6 Then
    MouseClick($MOUSE_CLICK_LEFT, 892, 849, 1)
    sleep(8000)
    ElseIf $i = 7 Then
    MouseClick($MOUSE_CLICK_LEFT, 965, 843, 1)
    sleep(8000)
    ElseIf $i = 8 Then
    MouseClick($MOUSE_CLICK_LEFT, 807, 893, 1)
    sleep(8000)
    ElseIf $i = 9 Then
    MouseClick($MOUSE_CLICK_LEFT, 896, 880, 1)
    sleep(8000)
    ElseIf $i = 10 Then
    MouseClick($MOUSE_CLICK_LEFT, 886, 774, 1)
    sleep(8000)
    ElseIf $i = 11 Then
    MouseClick($MOUSE_CLICK_LEFT, 892, 849, 1)
    sleep(8000)
    ElseIf $i = 12 Then
    MouseClick($MOUSE_CLICK_LEFT, 965, 843, 1)
    sleep(8000)
    EndIf
    MouseClick($MOUSE_CLICK_LEFT, 447, 683, 1)
    sleep(8000)
    MouseClick($MOUSE_CLICK_LEFT, 1197, 22, 1)
    sleep(5000)
    MouseClick($MOUSE_CLICK_LEFT, 1242, $x, 1)
    sleep(5000)

EndFunc

    For $i = 0 To 12 Step 1
    Next

For $i = 0 To 999999999 Step 1
    Running()
    Next

 

The $x and $x2 didnt run 12 times as requested. How can I code to launch the $x run 12 times and the $x2 run 20 times and loop infintely?

Quote

    If $i = 0 Then
    MouseClick($MOUSE_CLICK_LEFT, 805, 844, 1)
    sleep(8000)
    ElseIf $i = 1 Then
    MouseClick($MOUSE_CLICK_LEFT, 892, 849, 1)
    sleep(8000)
    ElseIf $i = 2 Then
    MouseClick($MOUSE_CLICK_LEFT, 965, 843, 1)
    sleep(8000)
    ElseIf $i = 3 Then
    MouseClick($MOUSE_CLICK_LEFT, 807, 893, 1)
    sleep(8000)
    ElseIf $i = 4 Then
    MouseClick($MOUSE_CLICK_LEFT, 896, 880, 1)
    sleep(8000)
    ElseIf $i = 5 Then
    MouseClick($MOUSE_CLICK_LEFT, 886, 774, 1)
    sleep(8000)
    ElseIf $i = 6 Then
    MouseClick($MOUSE_CLICK_LEFT, 892, 849, 1)
    sleep(8000)
    ElseIf $i = 7 Then
    MouseClick($MOUSE_CLICK_LEFT, 965, 843, 1)
    sleep(8000)
    ElseIf $i = 8 Then
    MouseClick($MOUSE_CLICK_LEFT, 807, 893, 1)
    sleep(8000)
    ElseIf $i = 9 Then
    MouseClick($MOUSE_CLICK_LEFT, 896, 880, 1)
    sleep(8000)
    ElseIf $i = 10 Then
    MouseClick($MOUSE_CLICK_LEFT, 886, 774, 1)
    sleep(8000)
    ElseIf $i = 11 Then
    MouseClick($MOUSE_CLICK_LEFT, 892, 849, 1)
    sleep(8000)
    ElseIf $i = 12 Then
    MouseClick($MOUSE_CLICK_LEFT, 965, 843, 1)
    sleep(8000)
    EndIf

How can I recode it in easier way?


I´m a newbie to this, so I would be very thankful for the answer!

Link to post
Share on other sites
  • Developers

As you have failed no a couple of times answering our questions and had your previous thread locked, you are now on a posting ban from these forums until you explain yourself in a PM to one of the mods.

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites
  • Jos locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...