Add control to all [Pause] in a script

Advanced Macro Recorder/Editor.

Moderator: Pulover

Bzkdu95
Posts: 3
Joined: 13 Dec 2024, 03:32

Add control to all [Pause] in a script

Post by Bzkdu95 » 13 Dec 2024, 03:47

Hello everyone,

I'm pretty new to AutoHotkey, and to Pulover's Macro Creator, so in advance : sorry if my question is obvious for you all, but I haven't found how to do what I want :oops:

So, basically I'm trying to use it to automize simple keyboard actions, and I want pauses in my script to be randomized.
To do so, I use the "Random delay" in the Pause options.

It's working fine, but I want to do that for all the pauses in my script, and do this manually for every pause is going to be veeeeeeery long :lol:

So my question is : is there any way to add control to all pauses in my script, by incrementing them by 500 ms for exemple ?

Thanks for your reading :D

Draken
Posts: 488
Joined: 08 Dec 2022, 01:19

Re: Add control to all [Pause] in a script

Post by Draken » 13 Dec 2024, 04:47

Maybe something like this?

Code: Select all

#Requires AutoHotkey v2

sleeptime := 0

f2::global sleeptime += 500
f3::global sleeptime -= 500

loop {
    MsgBox("MSG 1 " sleeptime,, "T0.5")
    Sleep sleeptime
    MsgBox("MSG 2 " sleeptime,, "T0.5")
    Sleep sleeptime
}

Bzkdu95
Posts: 3
Joined: 13 Dec 2024, 03:32

Re: Add control to all [Pause] in a script

Post by Bzkdu95 » 13 Dec 2024, 05:09

Draken wrote:
13 Dec 2024, 04:47
Maybe something like this?

Code: Select all

#Requires AutoHotkey v2

sleeptime := 0

f2::global sleeptime += 500
f3::global sleeptime -= 500

loop {
    MsgBox("MSG 1 " sleeptime,, "T0.5")
    Sleep sleeptime
    MsgBox("MSG 2 " sleeptime,, "T0.5")
    Sleep sleeptime
}
Hey Draken,

Thanks for your answer. I'm not sure how to put this in Pulover's ?

I should have joined a picture of my problem.

Basically, I want to do what I've done in line 4, but for all [Pause] lines in my script :)
Attachments
pb.PNG
pb.PNG (29.21 KiB) Viewed 424 times

User avatar
Ragnar
Posts: 831
Joined: 30 Sep 2013, 15:25

Re: Add control to all [Pause] in a script

Post by Ragnar » 13 Dec 2024, 05:13

I've moved this topic from Ask for Help (v2) to Pulovers Macro Creator.

Draken
Posts: 488
Joined: 08 Dec 2022, 01:19

Re: Add control to all [Pause] in a script

Post by Draken » 13 Dec 2024, 05:16

I'm sorry I somehow missed that this is Pulover's Macro Creator, I can't help you with that.

Bzkdu95
Posts: 3
Joined: 13 Dec 2024, 03:32

Re: Add control to all [Pause] in a script

Post by Bzkdu95 » 13 Dec 2024, 05:19

No worries, I think I used the wrong section at first, thanks for trying to help me through :)

Post Reply

Return to “Pulovers Macro Creator”