Hi, I have this script,
1::
gosub, abc
input, var , L1 T5
if ( var == "2")
{send, hello
return
}
return
but i want it sends "hello" 5s since finishing the sub abc instead of immediately when i press 2
example
i press 1
it does the sub abc and finish
after 2s i press 2
THEN after 3s it sends "hello"
end
Thanks in advance.
Similar to INPUT function but delay a specific time before excecuting
-
- Posts: 5
- Joined: 02 May 2018, 03:48
Re: Similar to INPUT function but delay a specific time before excecuting
Hallo,
this:or that:
this:
Code: Select all
1::
gosub, abc
SetTimer, Hello, -5000 ;sends "hello" 5s since finishing the sub abc
Return
Hello:
Send, Hello
Return
Code: Select all
1::
gosub, abc
SetTimer, Hello, -5000
input, var , L1 T5
Return
Hello:
if ( var == "2")
Send, Hello
Return
-
- Posts: 5
- Joined: 02 May 2018, 03:48
Re: Similar to INPUT function but delay a specific time before excecuting
thanks, it works well for this examble but it's quite difficult for me to use because i want to use it many times in 1 script. Do you have any idea to make it as a function?Rohwedder wrote: ↑29 Nov 2018, 11:36Hallo,
this:or that:Code: Select all
1:: gosub, abc SetTimer, Hello, -5000 ;sends "hello" 5s since finishing the sub abc Return Hello: Send, Hello Return
Code: Select all
1:: gosub, abc SetTimer, Hello, -5000 input, var , L1 T5 Return Hello: if ( var == "2") Send, Hello Return
Who is online
Users browsing this forum: Danielsan73 and 39 guests