How Many Times To Loop Script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
omar bishr
Posts: 92
Joined: 23 Nov 2020, 23:05

How Many Times To Loop Script

Post by omar bishr » 06 Dec 2023, 18:18

This script ask my how many times i want to send ^d

Code: Select all

$d::
InputBox n, Number, How many times?,, 300, 125
If !ErrorLevel
 Loop % n
  Send ^d
Return
its works fine
when i tried to replace Send ^d With script i made it send all scripts at the same time
what i want is when i choose 2 times for ex
in the first time send all the script first and wait when it over
then start second time.............
NOT SEND All AT THE SAME TIME

Code: Select all

$f12::
InputBox n, Number, How many times?,, 300, 125
If !ErrorLevel
 Loop % n
  Send ^d
------------
Sleep 600
Send {ctrl down}
Sleep 600
Send {down}
Sleep 600
Send {ctrl up}
Sleep 600
------------
Send ^d
Sleep 600
Send {pgup 2}
Sleep 600
------1-------
click 690,190,2
Sleep 300
Send ^a
Send ^c
Sleep 300
Send {pgdn}
Sleep 600
click 690,190,2
Sleep 300
Send ^v
Sleep 600
Send {pgup}
Sleep 600
------2-------
click 690,320,2
Sleep 300
Send ^a
Send ^c
Sleep 300
Send {pgdn}
Sleep 600
click 690,320,2
Sleep 300
Send ^v
Sleep 600
Send {pgup}
sleep 600
-----3---------
click 690,490,2
Sleep 300
Send ^a
Send ^c
Sleep 300
Send {pgdn}
Sleep 600
click 690,490,2
Sleep 300
Send ^v
Sleep 600
Send {pgup}
sleep 600
------4-------
click 690,650,2
Sleep 300
Send ^a
Send ^c
Sleep 300
Send {pgdn}
Sleep 600
click 690,650,2
Sleep 300
Send ^v
Sleep 600
-----------
send {pgup 2}
Sleep 600
send {alt down}
sleep 600
send {7}
send {7}
sleep 600
send {alt UP}
Sleep 600
send {pgdn}
-----------
Return

User avatar
mikeyww
Posts: 27165
Joined: 09 Sep 2014, 18:38

Re: How Many Times To Loop Script

Post by mikeyww » 06 Dec 2023, 18:56

If needed, your loop can use a code block.

Post Reply

Return to “Ask for Help (v1)”