"wait" function in script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Imjohn
Posts: 3
Joined: 23 Oct 2018, 17:12

"wait" function in script

23 Oct 2018, 17:29

Hello guys, i need some help with "wait" function in AHK script

Code: Select all

Process, priority, , High 
SetBatchLines, 0 

SetKeyDelay, 0,0
;SendMode InputThenPlay

Say(text)
{
Send,{F6} 
Sleep, 70
Send, {space}%text%{Enter} 
Sleep, 520
}
SayNoEnter(text)
{
Send,{F6} 
Sleep, 70
Send, {space}%text%
Sleep, 520
}


!1::

{

Say("bla bla bla some text")
SayNoEnter("bla bla bla")

}

Return
I need function that will make my script waiting until i type some text and press ENTER key, after pressing key script should countinue typing

example

{
Say("bla bla bla some text")
SayNoEnter("bla bla bla type some text here:")
here my script should stop and wait until i type some text and press enter key. when i press it script should countinue typing
Say("hello world")
}
Return

Help please.
User avatar
AlphaBravo
Posts: 586
Joined: 29 Sep 2013, 22:59

Re: "wait" function in script

23 Oct 2018, 20:22

I am not sure I understand what you're asking but look at input
Imjohn
Posts: 3
Joined: 23 Oct 2018, 17:12

Re: "wait" function in script

24 Oct 2018, 05:22

AlphaBravo wrote:
23 Oct 2018, 20:22
I am not sure I understand what you're asking but look at input
I need script for game chat. It should work when i press ctrl+4.
What script actions do i need?
1st action- { type some text and then do not enter typed text in game chat until i type more words and press enter key. In the first step i want to know how to make script wait until i press ENTER key.
2nd action- after i press ENTER key the script should countinue typing text which i've already binded after 1st step.
3rd action- } return

If Input command is right could you help me with code? I've already tried input but it didnt work bucause i dont know how to use it.

Sorry if you dont understand me again :(

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], mikeyww and 318 guests