Jump to content

Recommended Posts

how could i create a script that does nothing until the user presses specified keys in a certain order instead of the same time?

ex:

the combo is.......... t e s t

i want to press "t", release, then "e", release, "s", release, "t", release and do the specified function

if i press "t" and then any other key other than "e" i want the proccess to start over, being the same case with the following "s" and "t"

i tried but i only got as far as a script that would do this, but without restarting on a wrong key press...

so the combos.... t e s a t ... t e k s t ... t f e h s h t ... etc

would work

as long as i manage to press the keys...

can anyone help me???

EDIT: problem further explained

Edited by HackerZer0
Link to post
Share on other sites

Ar you ill talking about autohotkey? seriously dude they ripped autoits source code off so if your going to post autohotkey stuff leave the forum.

Heres a quick mod i through into one of Smoke_N's scripts

type test and then press enter

Global $nNumBuffer = ''
_HotKeySetNums()

While 1
    Sleep(0x7FFFFFFF)
WEnd

Func _HotKeySetNums()
    HotKeySet('t', '_HKBuffer')
    HotKeySet('e', '_HKBuffer')
    HotKeySet('s', '_HKBuffer')
    HotKeySet('t', '_HKBuffer')
    For $iCC = 0 To 4
        HotKeySet($iCC, '_HKBuffer')
    Next
    HotKeySet('{ENTER}', '_HKEnter')
    HotKeySet('{NUMPADENTER}', '_HKEnter')
EndFunc



Func _HKBuffer()
    $nNumBuffer &= @HotKeyPressed
EndFunc


Func _HKEnter()
    HotKeySet('{ENTER}')
    Send('{ENTER}')
    HotKeySet('{ENTER}', '_HKEnter')
    If $nNumBuffer = '' Then Return ''
    _ProgramsToRun($nNumBuffer)
    $nNumBuffer = ''
    Return ''
EndFunc

Func _ProgramsToRun($nNumProg)
    Switch $nNumBuffer
        Case "test"
            Run('NotePad.exe')
    EndSwitch
    Return ''
EndFunc
Link to post
Share on other sites
  • Moderators

When someone says they modded something of someone elses, I generally look up the function names in the advanced search here... by doing that you could find the original post usually if the function names were unique enough.

http://www.autoitscript.com/forum/index.php?showtopic=36518

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...