Sign in to follow this  
Followers 0
borlays

How Can I Press "1", "2", "3" with the delay of seconds per press?

17 posts in this topic

How Can I Press "1", "2", "3" with the delay of seconds per press?

Example:

I would like to press "1" then after 1.5 seconds ill press "2" and after 1 second ill press "3"

Can anybody help me?

Share this post


Link to post
Share on other sites



How can i run it in Notepad for example?

Share this post


Link to post
Share on other sites

How can i run it in Notepad for example?

And how can i execute it after pressing "=" key?

Share this post


Link to post
Share on other sites

Someone said

Send(1)

Sleep(1500)

Send(2)

Sleep(1000)

Send(3)

when i try to run this script it didn't work

Share this post


Link to post
Share on other sites

Have your program open note pad, then set = as a hot key. If the numbers are automatically inserted then you can just set If = key send 6 (assuming your adding)


Giggity

Share this post


Link to post
Share on other sites

sorry for being a newbie, but i dont know how to make a script for that..

can anybody make a sample script?

Share this post


Link to post
Share on other sites

There are probably 5 tutorials in the help file that go through opening notepad and typing something. then search for hot keys.


Giggity

Share this post


Link to post
Share on other sites

Dude you need to put forth a little effort. Next time post your code. If someone tells you a command (send and sleep) go and look at the help files. They have examples on how to use them. They are probably the most helpful help files I have ever seen. Here is the code you want. This doesnt help you any when someone just gives you the answer.

HotKeySet("{=}", "_First")
HotKeySet("{ESC}", "_Quit")

; Run Notepad
Run("notepad.exe")

; Wait for the Notepad become active - it is titled "Untitled - Notepad" on English systems
WinWaitActive("Untitled - Notepad")

While 1
Sleep(10)
WEnd

Func _First()
    Send(1)
    Sleep(1500)
    Send(2)
    Sleep(1000)
    Send(3)
EndFunc

Func _Quit()
    Exit
EndFunc

Share this post


Link to post
Share on other sites

all ready searched but i dont know how to start my script

Share this post


Link to post
Share on other sites

I personally didn't attempt to come to the forum until I had completed all the tutorials and tried doing things I wanted by going through the help file. The very first tutorial will tell you how to start your script.


Giggity

Share this post


Link to post
Share on other sites

thanks Smiley for the help..

i really appreciate it..

but 1 thing again, what if I was already running may Notepad? Is there a way that after I press "=" the script will run

Share this post


Link to post
Share on other sites

Dude you need to put forth a little effort. Next time post your code. If someone tells you a command (send and sleep) go and look at the help files. They have examples on how to use them. They are probably the most helpful help files I have ever seen.

look up processexists


Giggity

Share this post


Link to post
Share on other sites

HotKeySet("{=}", "_First")

HotKeySet("{ESC}", "_Quit")

WinWaitActive("Untitled - Notepad")

While 1

Sleep(10)

WEnd

Func _First()

Send("{1}")

Sleep(1500)

Send("{2}")

Sleep(1000)

Send("{3}")

EndFunc

Func _Quit()

Exit

EndFunc

Is My script Right?

Share this post


Link to post
Share on other sites

You dont need WinWaitActive("Untitled - Notepad"). That code will send 1,2,3 anytime = is pressed. You can be in word, or notepad and it will send 123. You just have to have the window you want to use set to active (meaning on top).

Share this post


Link to post
Share on other sites

I try it on other software but it didnt work, i want to use it in Cabal online for making some combos

Share this post


Link to post
Share on other sites

Is it right for mouse to move in that position then press Mouse 2?

MouseClick("right",304,278,1,5)
(Sleep 6500)
MouseClick("right",304,278,1,5)
(Sleep 6000)
MouseClick("right",304,278,1,5)
(Sleep 4000)
MouseClick("right",304,278,1,5)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0