Jump to content

Script Request, an easy one.


Nihilum
 Share

Recommended Posts

I'm searching for a easy script that:

Sleep 10s and then:

Shift key pressing every 100ms (SendKeyDelay= 100), and pressed for 10ms (SendKeyDownDelay=10). It ends when I Press ESC.

I'm asking for it because I can't make HotKeySet to work -.-

I know I'm very newbie.

Thanks in advance

Link to comment
Share on other sites

Shift key pressing every 100ms (SendKeyDelay= 100), and pressed for 10ms (SendKeyDownDelay=10). It ends when I Press ESC.

I'm asking for it because I can't make HotKeySet to work with ESC and another question:

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

Do

Opt ("SendKeyDelay", 1000)

Opt ("SendKeyDownDelay", 500)

Send ("+", 1)

until what i have to write here if i want it to be repeated until I press ESC?

Func MyExit()

Exit

EndFunc

Thanks in advance

Cannot edit

Link to comment
Share on other sites

HotKeySet("{ESC}", "MyExit")
AdlibEnable ( "Press",100)
While 1
WEnd

Func Press()
    ;Opt("SendKeyDelay", 1000)
    Opt("SendKeyDownDelay", 500)
    ;Send("{LSHIFT}", 1)
    Send("K", 1)
EndFunc

Func MyExit()
    Exit
EndFunc   ;==>MyExit

You may get different results by uncommenting ;Opt("SendKeyDelay", 1000)

Edited by weaponx
Link to comment
Share on other sites

I'm searching for a easy script that:

Sleep 10s and then:

Shift key pressing every 100ms (SendKeyDelay= 100), and pressed for 10ms (SendKeyDownDelay=10). It ends when I Press ESC.

I'm asking for it because I can't make HotKeySet to work -.-

I know I'm very newbie.

Thanks in advance

What did you need HotKeySet for? To check for the ESC? I'm not too good with Autoit either, but maybe I can help.

#include <Misc.au3>;This library is needed for the IsPressed function
Opt("SendKeyDownDelay",10)

Sleep(10000)
While 1;infinite loop
    if _IsPressed("1B") Then;This checks to see if a key is pressed, 1B is the hex code for the ESC key
        ExitLoop;       
    EndIf
    Sleep(100)
    Send("{LSHIFT}");presses the left shift key
WEnd

I hope that helps. Note that I didn't use the sendkeydowndelay option.

edit: Snap. I took so long replying that someone beat me to it <_<

Edited by Nevin
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...