HotKey Aufzeichnen

  • Ich möchte das er die Tastenkombination aufgezeichnet wird wie "Drücken sie jetzt einen Tastenkombination" und dann steht da "[alt] + [Strg] + [3]", dann registriere ich das alt Hotkey und alle sind glücklich :)

  • Ich hab mir für ein projekt mal soetwas geschrieben. leider bin ich zur zeit beruflich unterwegs. aber ich könnte es dir am wochenende posten. eventuell schon morgen.

    wenn dus selber probiern willst:
    ich weiß noch dass ich die komplette _IsPressed() tabelle, also die werte wie z.B. 00 für Linke maustaste usw., in ein array eingelesen hab und dann mithilfe einer select case abfrage die richtige taste ermittelt hab. bei bestimmten steuertasten (sowie strg und alt) muss man die select case halt weiterlaufen lassen

  • Habe grade etwas geschrieben... ist nicht so schön... aber... naja.. schaus dir selber mal an

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <Misc.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $HK[3], $lol, $Hotkey, $Keys, $Key[3]

    [/autoit] [autoit][/autoit] [autoit]

    $mGui = GUICreate("My GUI")
    $ipt = GUICtrlCreateInput("Click button to set Hotkey", 10, 10, 200)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $btn = GUICtrlCreateButton("...", 220, 10)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Do
    $msg = GUIGetMsg($mGui)
    Switch $msg
    Case $btn
    GUICtrlSetData($ipt, "Press Hotkeys now")
    GUICtrlSetState($btn, $GUI_DISABLE)
    $Key[2] = ""
    While 1
    For $i = 1 To 255
    If _IsPressed($i) Then
    $HK[1] = $i
    _Pressed("1")
    Sleep(200)
    While 1
    For $i = 1 To 255
    If _IsPressed($i) Then
    $HK[2] = $i
    If $HK[2] = $HK[1] Then ContinueLoop 2
    _Pressed("2")
    ExitLoop 4
    EndIf
    Next
    WEnd
    ExitLoop 2
    EndIf
    Next
    WEnd
    GUICtrlSetState($btn, $GUI_ENABLE)
    EndSwitch
    Until $msg = $GUI_EVENT_CLOSE

    [/autoit] [autoit][/autoit] [autoit]

    Func _Pressed($a)
    Switch $HK[$a]
    Case '01'
    $Hotkey = 'Left mouse button'
    Case '02'
    $Hotkey = 'Right mouse button'
    Case '04'
    $Hotkey = 'Middle mouse button (three-button mouse)'
    Case '05'
    $Hotkey = 'Windows 2000/XP: X1 mouse button'
    Case '06'
    $Hotkey = 'Windows 2000/XP: X2 mouse button'
    Case '08'
    $Hotkey = 'BACKSPACE key'
    Case '09'
    $Hotkey = 'TAB key'
    Case '0C'
    $Hotkey = 'CLEAR key'
    Case '0D'
    $Hotkey = 'ENTER key'
    Case '10'
    $Hotkey = 'SHIFT key'
    Case '11'
    $Hotkey = 'CTRL key'
    Case '12'
    $Hotkey = 'ALT key'
    Case '13'
    $Hotkey = 'PAUSE key'
    Case '14'
    $Hotkey = 'CAPS LOCK key'
    Case '1B'
    $Hotkey = 'ESC key'
    Case '20'
    $Hotkey = 'SPACEBAR'
    Case '21'
    $Hotkey = 'PAGE UP key'
    Case '22'
    $Hotkey = 'PAGE DOWN key'
    Case '23'
    $Hotkey = 'END key'
    Case '24'
    $Hotkey = 'HOME key'
    Case '25'
    $Hotkey = 'LEFT ARROW key'
    Case '26'
    $Hotkey = 'UP ARROW key'
    Case '27'
    $Hotkey = 'RIGHT ARROW key'
    Case '28'
    $Hotkey = 'DOWN ARROW key'
    Case '29'
    $Hotkey = 'SELECT key'
    Case '2A'
    $Hotkey = 'PRINT key'
    Case '2B'
    $Hotkey = 'EXECUTE key'
    Case '2C'
    $Hotkey = 'PRINT SCREEN key'
    Case '2D'
    $Hotkey = 'INS key'
    Case '2E'
    $Hotkey = 'DEL key'
    Case '30'
    $Hotkey = '0 key'
    Case '31'
    $Hotkey = '1 key'
    Case '32'
    $Hotkey = '2 key'
    Case '33'
    $Hotkey = '3 key'
    Case '34'
    $Hotkey = '4 key'
    Case '35'
    $Hotkey = '5 key'
    Case '36'
    $Hotkey = '6 key'
    Case '37'
    $Hotkey = '7 key'
    Case '38'
    $Hotkey = '8 key'
    Case '39'
    $Hotkey = '9 key'
    Case '41'
    $Hotkey = 'A key'
    Case '42'
    $Hotkey = 'B key'
    Case '43'
    $Hotkey = 'C key'
    Case '44'
    $Hotkey = 'D key'
    Case '45'
    $Hotkey = 'E key'
    Case '46'
    $Hotkey = 'F key'
    Case '47'
    $Hotkey = 'G key'
    Case '48'
    $Hotkey = 'H key'
    Case '49'
    $Hotkey = 'I key'
    Case '4A'
    $Hotkey = 'J key'
    Case '4B'
    $Hotkey = 'K key'
    Case '4C'
    $Hotkey = 'L key'
    Case '4D'
    $Hotkey = 'M key'
    Case '4E'
    $Hotkey = 'N key'
    Case '4F'
    $Hotkey = 'O key'
    Case '50'
    $Hotkey = 'P key'
    Case '51'
    $Hotkey = 'Q key'
    Case '52'
    $Hotkey = 'R key'
    Case '53'
    $Hotkey = 'S key'
    Case '54'
    $Hotkey = 'T key'
    Case '55'
    $Hotkey = 'U key'
    Case '56'
    $Hotkey = 'V key'
    Case '57'
    $Hotkey = 'W key'
    Case '58'
    $Hotkey = 'X key'
    Case '59'
    $Hotkey = 'Y key'
    Case '5A'
    $Hotkey = 'Z key'
    Case '5B'
    $Hotkey = 'Left Windows key'
    Case '5C'
    $Hotkey = 'Right Windows key'
    Case '60'
    $Hotkey = 'Numeric keypad 0 key'
    Case '61'
    $Hotkey = 'Numeric keypad 1 key'
    Case '62'
    $Hotkey = 'Numeric keypad 2 key'
    Case '63'
    $Hotkey = 'Numeric keypad 3 key'
    Case '64'
    $Hotkey = 'Numeric keypad 4 key'
    Case '65'
    $Hotkey = 'Numeric keypad 5 key'
    Case '66'
    $Hotkey = 'Numeric keypad 6 key'
    Case '67'
    $Hotkey = 'Numeric keypad 7 key'
    Case '68'
    $Hotkey = 'Numeric keypad 8 key'
    Case '69'
    $Hotkey = 'Numeric keypad 9 key'
    Case '6A'
    $Hotkey = 'Multiply key'
    Case '6B'
    $Hotkey = 'Add key'
    Case '6C'
    $Hotkey = 'Separator key'
    Case '6D'
    $Hotkey = 'Subtract key'
    Case '6E'
    $Hotkey = 'Decimal key'
    Case '6F'
    $Hotkey = 'Divide key'
    Case '70'
    $Hotkey = 'F1 key'
    Case '71'
    $Hotkey = 'F2 key'
    Case '72'
    $Hotkey = 'F3 key'
    Case '73'
    $Hotkey = 'F4 key'
    Case '74'
    $Hotkey = 'F5 key'
    Case '75'
    $Hotkey = 'F6 key'
    Case '76'
    $Hotkey = 'F7 key'
    Case '77'
    $Hotkey = 'F8 key'
    Case '78'
    $Hotkey = 'F9 key'
    Case '79'
    $Hotkey = 'F10 key'
    Case '7A'
    $Hotkey = 'F11 key'
    Case '7B'
    $Hotkey = 'F12 key'
    Case '7C'
    $Hotkey = 'F13 key'
    Case '7D'
    $Hotkey = 'F14 key'
    Case '7E'
    $Hotkey = 'F15 key'
    Case '7F'
    $Hotkey = 'F16 key'
    Case '80H'
    $Hotkey = 'F17 key'
    Case '81H'
    $Hotkey = 'F18 key'
    Case '82H'
    $Hotkey = 'F19 key'
    Case '83H'
    $Hotkey = 'F20 key'
    Case '84H'
    $Hotkey = 'F21 key '
    Case '85H'
    $Hotkey = 'F22 key'
    Case '86H'
    $Hotkey = 'F23 key'
    Case '87H'
    $Hotkey = 'F24 key'
    Case '90'
    $Hotkey = 'NUM LOCK key'
    Case '91'
    $Hotkey = 'SCROLL LOCK key'
    Case 'A0'
    $Hotkey = 'Left SHIFT key'
    Case 'A1'
    $Hotkey = 'Right SHIFT key'
    Case 'A2'
    $Hotkey = 'Left CONTROL key'
    Case 'A3'
    $Hotkey = 'Right CONTROL key'
    Case 'A4'
    $Hotkey = 'Left MENU key'
    Case 'A5'
    $Hotkey = 'Right MENU key'
    Case 'BA'
    $Hotkey = ';'
    Case 'BB'
    $Hotkey = '='
    Case 'BC'
    $Hotkey = ','
    Case 'BD'
    $Hotkey = '-'
    Case 'BE'
    $Hotkey = '.'
    Case 'BF'
    $Hotkey = '/'
    Case 'C0'
    $Hotkey = '`'
    Case 'DB'
    $Hotkey = '['
    Case 'DC'
    $Hotkey = '\'
    Case 'DD'
    $Hotkey = ']'
    EndSwitch
    $Key[$a] = $Hotkey
    $Keys = $Key[1] & " + " & $Key[2]
    GUICtrlSetData($ipt,$Keys)
    EndFunc ;==>_Pressed

    [/autoit]

    Edit: Dummerweise reagiert er nicht auf manche Knöpfe wie z.B. "J" usw... ist bestimmt irgendein anfängerfehler aber bin ich wohl zu doof für.

    Edit2: Mit ein bisschen nachdenken weiss ich jetzt woran es liegt. Undzwar liegt es daran, dass ich die _IsPressed Liste aus der Hilfe habe, welche nicht nur Ziffern sondern auch Buchstaben enthält. Jedoch weiss ich nicht, wie ich denn jetzt die For ... Next schleife gestalten sollte, dass er auch die Buchstaben mit rein nimmt.

    Einmal editiert, zuletzt von SiLenCa (3. Dezember 2009 um 19:48)

  • Spoiler anzeigen
    [autoit]

    Dim $rKEYLIST[113][2] = [ _
    ["01", "Left"],["02", "Right"],["04", "Middle"],["05", "Windows 2000/XP: X1"],["06", "Windows 2000/XP: X2"],["08", "BACKSPACE"],["09", "TAB"],["0C", "CLEAR"],["0D", "ENTER"],["13", "PAUSE"],["14", "CAPSLOCK"],["1B", "ESC"],["20", "SPACE"],["21", "PGUP"],["22", "PGDN"],["23", "END"],["24", "HOME"],["25", "LEFT"],["26", "UP"],["27", "RIGHT"],["28", "DOWN"],["29", "SELECT"],["2A", "PRINT"],["2B", "EXECUTE"],["2C", "PRINTSCREEN"],["2D", "INS"],["2E", "DEL"], _
    ["30", "0"],["31", "1"],["32", "2"],["33", "3"],["34", "4"],["35", "5"],["36", "6"],["37", "7"],["38", "8"],["39", "9"],["41", "A"],["42", "B"],["43", "C"],["44", "D"],["45", "E"],["46", "F"],["47", "G"],["48", "H"],["49", "I"],["4A", "J"],["4B", "K"],["4C", "L"],["4D", "M"],["4E", "N"],["4F", "O"],["50", "P"],["51", "Q"],["52", "R"],["53", "S"],["54", "T"],["55", "U"],["56", "V"],["57", "W"],["58", "X"],["59", "Y"],["5A", "Z"],["5B", "LWIN"],["5C", "RWIN"], _
    ["60", "NUMPAD0"],["61", "NUMPAD1"],["62", "NUMPAD2"],["63", "NUMPAD3"],["64", "NUMPAD4"],["65", "NUMPAD5"],["66", "NUMPAD6"],["67", "NUMPAD7"],["68", "NUMPAD8"],["69", "NUMPAD9"],["6A", "Multiply"],["6B", "NUMPADADD"],["6C", "Separator"],["6D", "NUMPADSUB"],["6E", "NUMPADDOT"],["6F", "NUMPADDIV"],["70", "F1"],["71", "F2"],["72", "F3"],["73", "F4"],["74", "F5"],["75", "F6"],["76", "F7"],["77", "F8"],["78", "F9"],["79", "F10"],["7A", "F11"],["7B", "F12"],["7C-7F", "F13 - F16"],["80-87H", "F17 - F24"], _
    ["90", "NUMLOCK"],["91", "SCROLLLOCK"],["A4", "TAB"],["A5", "Right MENU"],["BA", ";"],["BB", "="],["BC", ","],["BD", "-"],["BE", "."],["BF", "/"],["C0", "`"],["DB", "["],["DC", "\"],["DD", "]"] _
    ]

    [/autoit] [autoit][/autoit] [autoit]

    $dll = DllOpen("user32.dll")

    [/autoit] [autoit][/autoit] [autoit]

    #include <GUIConstants.au3>
    #include <Misc.au3>
    #region - GUI Create
    $hGUI = GUICreate('Test')
    $hButton = GUICtrlCreateButton("Choose Hotkey",100,300)
    $hLable = GUICtrlCreateLabel("No Hotkey",20,20,250,250)
    GUICtrlSetFont(-1,20)
    GUISetState()
    #endregion

    [/autoit] [autoit][/autoit] [autoit]

    #region - GUI SelectLoop
    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $hButton
    _ChangeHotKey()
    EndSwitch
    WEnd
    #endregion

    [/autoit] [autoit][/autoit] [autoit]

    Func _ChangeHotKey()
    Local $WaitForHK = True, $CTRLK
    GUICtrlSetData($hLable,"Waiting...")
    While $WaitForHK
    For $i = 5 to UBound($rKEYLIST)-1
    If _IsPressed($rKEYLIST[$i][0],$dll) Then

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed(10, $dll) Then $CTRLK &= "SHIFT+"
    If _IsPressed(11, $dll) Then $CTRLK &= "STRG+"
    If _IsPressed(12, $dll) Then $CTRLK &= "ALT+"

    [/autoit] [autoit][/autoit] [autoit]

    Do
    Sleep(10)
    Until Not _IsPressed($rKEYLIST[$i][0], $dll)

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetData($hLable,$CTRLK&$rKEYLIST[$i][1])
    $WaitForHK = False
    Return 1
    EndIf
    Next
    WEnd
    EndFunc

    [/autoit]

    sowas in der art? Ist natürlich nur ne grobe bastelei, die Keyliste ist nicht ganz fertig (ein paar F-Tasten fehlen). Aber im Prinzip ist es doch das was du haben willst, oder?

  • du kannst alternativ auch ne udf dafür schreiben^^ bzw das inputfeld in einer anderen sprache machen^^
    wenn du willst kann ich dir ein programm machen, was einen hotkey "ausließt" und in einer datei speichert (ist besser als irnwelche ispressed^^) ;D

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

    wie wärs damit ?^^

    Edit:
    Hier bisschen umgeformte Version. Liest einfach die Inputs aus und speichert die in ne Ini.

    Spoiler anzeigen
    [autoit]

    ;~ Func _hotkeyset()
    ; ==================================================================================================
    ; <_HotKeyControl.au3>
    ;
    ; Functions:
    ; _ToggleAsHotkeyControl()
    ; _GetAutoItHotkey()
    ;
    ; _HotkeyWindowProc()
    ; _GetAutoItCode()
    ; _ShowHotKey()
    ; _GetHandleIndex()
    ;
    ; Author: WideBoyDixon
    ; ==================================================================================================

    [/autoit] [autoit][/autoit] [autoit]

    #include-once

    [/autoit] [autoit][/autoit] [autoit]

    #include <WinAPI.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GUIEdit.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Region VIRTUAL_KEYS
    Global Const $VKEY_LBUTTON = 0x01, $VKEY_RBUTTON = 0x02, $VKEY_CANCEL = 0x03, $VKEY_MBUTTON = 0x04
    Global Const $VKEY_XBUTTON1 = 0x05, $VKEY_XBUTTON2 = 0x06, $VKEY_BACK = 0x08, $VKEY_TAB = 0x09
    Global Const $VKEY_CLEAR = 0x0C, $VKEY_RETURN = 0x0D, $VKEY_SHIFT = 0x10, $VKEY_CONTROL = 0x11
    Global Const $VKEY_MENU = 0x12, $VKEY_PAUSE = 0x13, $VKEY_CAPITAL = 0x14, $VKEY_KANA = 0x15
    Global Const $VKEY_HANGEUL = 0x15, $VKEY_HANGUL = 0x15, $VKEY_JUNJA = 0x17, $VKEY_FINAL = 0x18
    Global Const $VKEY_HANJA = 0x19, $VKEY_KANJI = 0x19, $VKEY_ESCAPE = 0x1B, $VKEY_CONVERT = 0x1C
    Global Const $VKEY_NONCONVERT = 0x1D, $VKEY_ACCEPT = 0x1E, $VKEY_MODECHANGE = 0x1F, $VKEY_SPACE = 0x20
    Global Const $VKEY_PRIOR = 0x21, $VKEY_NEXT = 0x22, $VKEY_END = 0x23, $VKEY_HOME = 0x24
    Global Const $VKEY_LEFT = 0x25, $VKEY_UP = 0x26, $VKEY_RIGHT = 0x27, $VKEY_DOWN = 0x28
    Global Const $VKEY_SELECT = 0x29, $VKEY_PRINT = 0x2A, $VKEY_EXECUTE = 0x2B, $VKEY_SNAPSHOT = 0x2C
    Global Const $VKEY_INSERT = 0x2D, $VKEY_DELETE = 0x2E, $VKEY_HELP = 0x2F, $VKEY_LWIN = 0x5B
    Global Const $VKEY_RWIN = 0x5C, $VKEY_APPS = 0x5D, $VKEY_SLEEP = 0x5F, $VKEY_NUMPAD0 = 0x60
    Global Const $VKEY_NUMPAD1 = 0x61, $VKEY_NUMPAD2 = 0x62, $VKEY_NUMPAD3 = 0x63, $VKEY_NUMPAD4 = 0x64
    Global Const $VKEY_NUMPAD5 = 0x65, $VKEY_NUMPAD6 = 0x66, $VKEY_NUMPAD7 = 0x67, $VKEY_NUMPAD8 = 0x68
    Global Const $VKEY_NUMPAD9 = 0x69, $VKEY_MULTIPLY = 0x6A, $VKEY_ADD = 0x6B, $VKEY_SEPARATOR = 0x6C
    Global Const $VKEY_SUBTRACT = 0x6D, $VKEY_DECIMAL = 0x6E, $VKEY_DIVIDE = 0x6F, $VKEY_F1 = 0x70
    Global Const $VKEY_F2 = 0x71, $VKEY_F3 = 0x72, $VKEY_F4 = 0x73, $VKEY_F5 = 0x74
    Global Const $VKEY_F6 = 0x75, $VKEY_F7 = 0x76, $VKEY_F8 = 0x77, $VKEY_F9 = 0x78
    Global Const $VKEY_F10 = 0x79, $VKEY_F11 = 0x7A, $VKEY_F12 = 0x7B, $VKEY_F13 = 0x7C
    Global Const $VKEY_F14 = 0x7D, $VKEY_F15 = 0x7E, $VKEY_F16 = 0x7F, $VKEY_F17 = 0x80
    Global Const $VKEY_F18 = 0x81, $VKEY_F19 = 0x82, $VKEY_F20 = 0x83, $VKEY_F21 = 0x84
    Global Const $VKEY_F22 = 0x85, $VKEY_F23 = 0x86, $VKEY_F24 = 0x87, $VKEY_NUMLOCK = 0x90
    Global Const $VKEY_SCROLL = 0x91, $VKEY_OEM_NEC_EQUAL = 0x92, $VKEY_OEM_FJ_JISHO = 0x92, $VKEY_OEM_FJ_MASSHOU = 0x93
    Global Const $VKEY_OEM_FJ_TOUROKU = 0x94, $VKEY_OEM_FJ_LOYA = 0x95, $VKEY_OEM_FJ_ROYA = 0x96
    Global Const $VKEY_LSHIFT = 0xA0, $VKEY_RSHIFT = 0xA1, $VKEY_LCONTROL = 0xA2, $VKEY_RCONTROL = 0xA3
    Global Const $VKEY_LMENU = 0xA4, $VKEY_RMENU = 0xA5, $VKEY_BROWSER_BACK = 0xA6, $VKEY_BROWSER_FORWARD = 0xA7
    Global Const $VKEY_BROWSER_REFRESH = 0xA8, $VKEY_BROWSER_STOP = 0xA9, $VKEY_BROWSER_SEARCH = 0xAA, $VKEY_BROWSER_FAVORITES = 0xAB
    Global Const $VKEY_BROWSER_HOME = 0xAC, $VKEY_VOLUME_MUTE = 0xAD, $VKEY_VOLUME_DOWN = 0xAE, $VKEY_VOLUME_UP = 0xAF
    Global Const $VKEY_MEDIA_NEXT_TRACK = 0xB0, $VKEY_MEDIA_PREV_TRACK = 0xB1, $VKEY_MEDIA_STOP = 0xB2, $VKEY_MEDIA_PLAY_PAUSE = 0xB3
    Global Const $VKEY_LAUNCH_MAIL = 0xB4, $VKEY_LAUNCH_MEDIA_SELECT = 0xB5, $VKEY_LAUNCH_APP1 = 0xB6, $VKEY_LAUNCH_APP2 = 0xB7
    Global Const $VKEY_OEM_1 = 0xBA, $VKEY_OEM_PLUS = 0xBB, $VKEY_OEM_COMMA = 0xBC, $VKEY_OEM_MINUS = 0xBD
    Global Const $VKEY_OEM_PERIOD = 0xBE, $VKEY_OEM_2 = 0xBF, $VKEY_OEM_3 = 0xC0, $VKEY_OEM_4 = 0xDB
    Global Const $VKEY_OEM_5 = 0xDC, $VKEY_OEM_6 = 0xDD, $VKEY_OEM_7 = 0xDE, $VKEY_OEM_8 = 0xDF
    Global Const $VKEY_OEM_AX = 0xE1, $VKEY_OEM_102 = 0xE2, $VKEY_ICO_HELP = 0xE3, $VKEY_ICO_00 = 0xE4
    Global Const $VKEY_PROCESSKEY = 0xE5, $VKEY_ICO_CLEAR = 0xE6, $VKEY_PACKET = 0xE7, $VKEY_OEM_RESET = 0xE9
    Global Const $VKEY_OEM_JUMP = 0xEA, $VKEY_OEM_PA1 = 0xEB, $VKEY_OEM_PA2 = 0xEC, $VKEY_OEM_PA3 = 0xED
    Global Const $VKEY_OEM_WSCTRL = 0xEE, $VKEY_OEM_CUSEL = 0xEF, $VKEY_OEM_ATTN = 0xF0, $VKEY_OEM_FINISH = 0xF1
    Global Const $VKEY_OEM_COPY = 0xF2, $VKEY_OEM_AUTO = 0xF3, $VKEY_OEM_ENLW = 0xF4, $VKEY_OEM_BACKTAB = 0xF5
    Global Const $VKEY_ATTN = 0xF6, $VKEY_CRSEL = 0xF7, $VKEY_EXSEL = 0xF8, $VKEY_EREOF = 0xF9
    Global Const $VKEY_PLAY = 0xFA, $VKEY_ZOOM = 0xFB, $VKEY_NONAME = 0xFC, $VKEY_PA1 = 0xFD, $VKEY_OEM_CLEAR = 0xFE
    #EndRegion VIRTUAL_KEYS

    [/autoit] [autoit][/autoit] [autoit]

    #Region GLOBAL_VARIABLES
    ; This maps virtual keycodes to AutoIt equivalents
    Global $gaVirtkeyMap[75][2] = [[$VKEY_SPACE, "{SPACE}"],[$VKEY_RETURN, "{ENTER}"],[$VKEY_MENU, "{ALT}"],[$VKEY_BACK, "{BS}"], _ ; 4
    [$VKEY_DELETE, "{DEL}"],[$VKEY_UP, "{UP}"],[$VKEY_DOWN, "{DOWN}"],[$VKEY_LEFT, "{LEFT}"], _ ; 8
    [$VKEY_RIGHT, "{RIGHT}"],[$VKEY_HOME, "{HOME}"],[$VKEY_END, "{END}"],[$VKEY_ESCAPE, "{ESC}"], _ ; 12
    [$VKEY_INSERT, "{INS}"],[$VKEY_PRIOR, "{PGUP}"],[$VKEY_NEXT, "{PGDN}"],[$VKEY_F1, "{F1}"], _ ; 16
    [$VKEY_F2, "{F2}"],[$VKEY_F3, "{F3}"],[$VKEY_F4, "{F4}"],[$VKEY_F5, "{F5}"], _ ; 20
    [$VKEY_F6, "{F6}"],[$VKEY_F7, "{F7}"],[$VKEY_F8, "{F8}"],[$VKEY_F9, "{F9}"], _ ; 24
    [$VKEY_F10, "{F10}"],[$VKEY_F11, "{F11}"],[$VKEY_F12, "{F12}"],[$VKEY_TAB, "{TAB}"], _ ; 28
    [$VKEY_PRINT, "{PRINTSCREEN}"],[$VKEY_LWIN, "{LWIN}"],[$VKEY_RWIN, "{RWIN}"], _ ; 31
    [$VKEY_NUMLOCK, "{NUMLOCK}"],[$VKEY_CAPITAL, "{CAPSLOCK}"],[$VKEY_SCROLL, "{SCROLLLOCK}"], _ ; 34
    [$VKEY_PAUSE, "{PAUSE}"],[$VKEY_NUMPAD0, "{NUMPAD0}"],[$VKEY_NUMPAD1, "{NUMPAD1}"], _ ; 37
    [$VKEY_NUMPAD2, "{NUMPAD2}"],[$VKEY_NUMPAD3, "{NUMPAD3}"],[$VKEY_NUMPAD4, "{NUMPAD4}"], _ ; 40
    [$VKEY_NUMPAD5, "{NUMPAD5}"],[$VKEY_NUMPAD6, "{NUMPAD6}"],[$VKEY_NUMPAD7, "{NUMPAD7}"], _ ; 43
    [$VKEY_NUMPAD8, "{NUMPAD8}"],[$VKEY_NUMPAD9, "{NUMPAD0}"],[$VKEY_ADD, "{NUMPADADD}"], _ ; 46
    [$VKEY_SUBTRACT, "{NUMPADSUB}"],[$VKEY_DIVIDE, "{NUMPADDIV}"],[$VKEY_DECIMAL, "{NUMPADDOT}"], _ ; 49
    [$VKEY_APPS, "{APPSKEY}"],[$VKEY_LMENU, "{LALT}"],[$VKEY_RMENU, "{RALT}"], _ ; 52
    [$VKEY_LCONTROL, "{LCTRL}"],[$VKEY_RCONTROL, "{RCTRL}"],[$VKEY_LSHIFT, "{LSHIFT}"], _ ; 55
    [$VKEY_RSHIFT, "{RSHIFT}"],[$VKEY_SLEEP, "{SLEEP}"],[$VKEY_BROWSER_BACK, "{BROWSER_BACK}"], _ ; 58
    [$VKEY_BROWSER_FORWARD, "{BROWSER_FORWARD}"],[$VKEY_BROWSER_REFRESH, "{BROWSER_REFRESH}"], _ ; 60
    [$VKEY_BROWSER_STOP, "{BROWSER_STOP}"],[$VKEY_BROWSER_SEARCH, "{BROWSER_SEARCH}"], _ ; 62
    [$VKEY_BROWSER_FAVORITES, "{BROWSER_FAVORITES}"],[$VKEY_BROWSER_HOME, "{BROWSER_HOME}"], _ ; 64
    [$VKEY_VOLUME_MUTE, "{VOLUME_MUTE}"],[$VKEY_VOLUME_DOWN, "{VOLUME_DOWN}"],[$VKEY_VOLUME_UP, "{VOLUME_UP}"], _ ; 67
    [$VKEY_MEDIA_NEXT_TRACK, "{MEDIA_NEXT}"],[$VKEY_MEDIA_PREV_TRACK, "{MEDIA_PREV}"], _ ; 69
    [$VKEY_MEDIA_STOP, "{MEDIA_STOP}"],[$VKEY_MEDIA_PLAY_PAUSE, "{MEDIA_PLAY_PAUSE}"], _ ; 71
    [$VKEY_LAUNCH_MAIL, "{LAUNCH_MAIL}"],[$VKEY_LAUNCH_MEDIA_SELECT, "{LAUNCH_MEDIA}"], _ ; 73
    [$VKEY_LAUNCH_APP1, "{LAUNCH_APP1}"],[$VKEY_LAUNCH_APP2, "{LAUNCH_APP2}"]] ; 75

    [/autoit] [autoit][/autoit] [autoit]

    ; Up to 20 hotkeys. Use this array to store:
    ; - Window handle of the edit control
    ; - AutoIt key combination
    ; - Wndproc_new
    ; - Wndproc_old
    ; - Modifier key flags
    ; - Locked flag
    ; - Key
    Global $gaHotkeyList[20][7]
    #EndRegion GLOBAL_VARIABLES

    [/autoit] [autoit][/autoit] [autoit]

    ; ==================================================================================================
    ; Func _ToggleAsHotkeyControl($hWnd)
    ;
    ; Function to toggle whether the input control is a hotkey
    ;
    ; $hWnd = Handle to the input control
    ;
    ; Returns:
    ; Success: True
    ; Failure: False, with @error set:
    ;
    ; Author: WideBoyDixon
    ; ==================================================================================================
    ;### Tidy Error -> func Not closed before "Func" statement.
    ;### Tidy Error -> "func" cannot be inside any IF/Do/While/For/Case/Func statement.
    Func _ToggleAsHotkeyControl($hWnd)
    Dim $nI, $nJ = -1, $bFound = False

    [/autoit] [autoit][/autoit] [autoit]

    ; Check the current array to see if we've already got this one
    For $nI = 0 To UBound($gaHotkeyList) - 1
    If $gaHotkeyList[$nI][0] = $hWnd Then
    ; Found it
    $bFound = True
    $nJ = $nI
    ExitLoop
    ElseIf (Not IsHWnd($gaHotkeyList[$nI][0])) And ($nJ = -1) Then
    ; Remember the first empty location
    $nJ = $nI
    EndIf
    Next

    [/autoit] [autoit][/autoit] [autoit]

    ; If we already had it then remove this one
    If $bFound Then
    $gaHotkeyList[$nJ][0] = ""
    _WinAPI_SetWindowLong($hWnd, 0xFFFFFFFC, $gaHotkeyList[$nJ][3])
    Return SetError(0, 0, True)
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    ; If we don't have any spare slots then this is an error
    If ($nJ = -1) Then Return SetError(1, 0, False)
    ; Store the details and subclass the window
    $gaHotkeyList[$nJ][0] = $hWnd
    $gaHotkeyList[$nJ][1] = ""
    $gaHotkeyList[$nJ][2] = DllCallbackRegister("_HotkeyWindowProc", "ptr", "hwnd;uint;long;ptr")
    $gaHotkeyList[$nJ][3] = _WinAPI_SetWindowLong($hWnd, 0xFFFFFFFC, DllCallbackGetPtr($gaHotkeyList[$nJ][2]))
    $gaHotkeyList[$nJ][4] = 0
    $gaHotkeyList[$nJ][5] = False
    $gaHotkeyList[$nJ][6] = ""

    [/autoit] [autoit][/autoit] [autoit]

    ; Success
    Return SetError(0, 0, True)
    EndFunc ;==>_ToggleAsHotkeyControl

    [/autoit] [autoit][/autoit] [autoit]

    ; ==================================================================================================
    ; Func _HotkeyWindowProc($hWnd, $uiMsg, $wParam, $lParam)
    ;
    ; Windows procedure for subclassing an input control
    ;
    ; $hWnd = Handle to the input control
    ; $uiMsg = The windows message
    ; $wParam = WPARAM
    ; $lParam = LPARAM
    ;
    ; Returns:
    ; 1 = Don't process this message as it's already been handled
    ; Other = Use the default processing for this message
    ;
    ; Author: WideBoyDixon
    ; ==================================================================================================
    ;### Tidy Error -> func Not closed before "Func" statement.
    ;### Tidy Error -> "func" cannot be inside any IF/Do/While/For/Case/Func statement.
    Func _HotkeyWindowProc($hWnd, $uiMsg, $wParam, $lParam)
    Local $scanCode, $sAutoitKey
    Local $nIndex = _GetHandleIndex($hWnd) ; Get the index of this window in the array
    If $nIndex >= 0 Then
    If $uiMsg = $WM_GETDLGCODE Then
    If $wParam = $VKEY_RETURN Then
    $uiMsg = $WM_KEYDOWN ; A bit of a hack to get {ENTER} recognised ...
    EndIf
    EndIf
    Switch $uiMsg
    Case $WM_SETFOCUS
    ; Re-start when we get the focus
    $gaHotkeyList[$nIndex][4] = 0
    $gaHotkeyList[$nIndex][5] = False
    $gaHotkeyList[$nIndex][6] = ""
    Case $WM_SYSKEYDOWN, $WM_KEYDOWN
    ; A key is down
    $scanCode = DllCall("user32.dll", "uint", "MapVirtualKey", "uint", $wParam, "uint", 2) ; Map the virtual key to a scan code
    Switch $wParam
    Case $VKEY_SHIFT, $VKEY_LSHIFT, $VKEY_RSHIFT
    ; Shift has been pressed
    $gaHotkeyList[$nIndex][4] = BitOR($gaHotkeyList[$nIndex][4], 1)
    Case $VKEY_CONTROL, $VKEY_LCONTROL, $VKEY_RCONTROL
    ; Control has been pressed
    $gaHotkeyList[$nIndex][4] = BitOR($gaHotkeyList[$nIndex][4], 2)
    Case $VKEY_LWIN, $VKEY_RWIN
    ; Windows key has been pressed
    $gaHotkeyList[$nIndex][4] = BitOR($gaHotkeyList[$nIndex][4], 4)
    Case $VKEY_MENU, $VKEY_LMENU, $VKEY_RMENU
    ; Alt key has been pressed
    $gaHotkeyList[$nIndex][4] = BitOR($gaHotkeyList[$nIndex][4], 8)
    ;~ Case Else
    $sAutoitKey = _GetAutoItCode($wParam) ; Is there an AutoIt equivalent?
    ;~ If $sAutoitKey = "" Then
    ;~ ; No AutoIt code ... can we use the scan code?
    ;~ If $scanCode[0] <> 0 Then $sAutoitKey = Chr($scanCode[0])
    ;~ EndIf
    Case Else
    $sAutoitKey = _GetAutoItCode($wParam)
    If $sAutoitKey = "" Then
    Select; No AutoIt code ... can we use the scan code?
    Case $scanCode[0] = 65
    $sAutoitKey = Chr(97)
    Case $scanCode[0] = 66
    $sAutoitKey = Chr(98)
    Case $scanCode[0] = 67
    $sAutoitKey = Chr(99)
    Case $scanCode[0] = 68
    $sAutoitKey = Chr(100)
    Case $scanCode[0] = 69
    $sAutoitKey = Chr(101)
    Case $scanCode[0] = 70
    $sAutoitKey = Chr(102)
    Case $scanCode[0] = 71
    $sAutoitKey = Chr(103)
    Case $scanCode[0] = 72
    $sAutoitKey = Chr(104)
    Case $scanCode[0] = 73
    $sAutoitKey = Chr(105)
    Case $scanCode[0] = 74
    $sAutoitKey = Chr(106)
    Case $scanCode[0] = 75
    $sAutoitKey = Chr(107)
    Case $scanCode[0] = 76
    $sAutoitKey = Chr(108)
    Case $scanCode[0] = 77
    $sAutoitKey = Chr(109)
    Case $scanCode[0] = 78
    $sAutoitKey = Chr(110)
    Case $scanCode[0] = 79
    $sAutoitKey = Chr(111)
    Case $scanCode[0] = 80
    $sAutoitKey = Chr(112)
    Case $scanCode[0] = 81
    $sAutoitKey = Chr(113)
    Case $scanCode[0] = 82
    $sAutoitKey = Chr(114)
    Case $scanCode[0] = 83
    $sAutoitKey = Chr(115)
    Case $scanCode[0] = 84
    $sAutoitKey = Chr(116)
    Case $scanCode[0] = 85
    $sAutoitKey = Chr(117)
    Case $scanCode[0] = 86
    $sAutoitKey = Chr(118)
    Case $scanCode[0] = 87
    $sAutoitKey = Chr(119)
    Case $scanCode[0] = 88
    $sAutoitKey = Chr(120)
    Case $scanCode[0] = 89
    $sAutoitKey = Chr(121)
    Case $scanCode[0] = 90
    $sAutoitKey = Chr(122)
    Case $sAutoitKey = ""
    If $scanCode[0] <> 0 Then $sAutoitKey = Chr($scanCode[0])
    ;~ MsgBox(0, "", $scanCode[0])
    EndSelect
    EndIf
    ; If we have a key then store it
    If $sAutoitKey <> "" Then
    $gaHotkeyList[$nIndex][6] = $sAutoitKey
    _ShowHotKey($nIndex)
    $gaHotkeyList[$nIndex][5] = True
    EndIf
    EndSwitch

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    If Not $gaHotkeyList[$nIndex][5] Then _ShowHotKey($nIndex) ; Show the current status
    Return 1 ; Don't process this message any more
    Case $WM_SYSKEYUP, $WM_KEYUP
    ; A key is up
    Switch $wParam
    Case $VKEY_SHIFT, $VKEY_LSHIFT, $VKEY_RSHIFT
    ; Shift is up
    $gaHotkeyList[$nIndex][4] = BitAND($gaHotkeyList[$nIndex][4], 14)
    Case $VKEY_CONTROL, $VKEY_LCONTROL, $VKEY_RCONTROL
    ; Control is up
    $gaHotkeyList[$nIndex][4] = BitAND($gaHotkeyList[$nIndex][4], 13)
    Case $VKEY_LWIN, $VKEY_RWIN
    ; Windows key is up
    $gaHotkeyList[$nIndex][4] = BitAND($gaHotkeyList[$nIndex][4], 11)
    Case $VKEY_MENU, $VKEY_LMENU, $VKEY_RMENU
    ; Alt is up
    $gaHotkeyList[$nIndex][4] = BitAND($gaHotkeyList[$nIndex][4], 7)
    EndSwitch
    If Not $gaHotkeyList[$nIndex][5] Then _ShowHotKey($nIndex) ; Show the current status if necessary
    If $gaHotkeyList[$nIndex][5] Then
    ; Have all modifier keys been released? If so then reset the hotkey
    $gaHotkeyList[$nIndex][5] = ($gaHotkeyList[$nIndex][5] <> 0)
    If Not $gaHotkeyList[$nIndex][5] Then $gaHotkeyList[$nIndex][6] = ""
    EndIf
    Return 1 ; Don't process this message any more
    Case $WM_CHAR, $WM_PASTE, $WM_CUT
    Return 1 ; Don't process this message any more
    EndSwitch

    [/autoit] [autoit][/autoit] [autoit]

    ; Use default processing for all other messages
    Return _WinAPI_CallWindowProc($gaHotkeyList[$nIndex][3], $hWnd, $uiMsg, $wParam, $lParam)
    Else
    Return _WinAPI_DefWindowProc($hWnd, $uiMsg, $wParam, $lParam)
    EndIf
    EndFunc ;==>_HotkeyWindowProc

    [/autoit] [autoit][/autoit] [autoit]

    ; ==================================================================================================
    ; Func _GetAutoItCode($vkCode)
    ;
    ; Get an AutoIt equivalent for a virtual key
    ;
    ; $vkCode = The virtual key code
    ;
    ; Returns:
    ; The AutoIt equivalent or an empty string if there isn't one
    ;
    ; Author: WideBoyDixon
    ; ==================================================================================================
    ;### Tidy Error -> func Not closed before "Func" statement.
    ;### Tidy Error -> "func" cannot be inside any IF/Do/While/For/Case/Func statement.
    Func _GetAutoItCode($vkCode)
    Local $nI, $sRet = ""

    [/autoit] [autoit][/autoit] [autoit]

    ; Look through the map array to find this value
    For $nI = 0 To UBound($gaVirtkeyMap) - 1
    If $gaVirtkeyMap[$nI][0] = $vkCode Then
    ; Found it ... return it
    $sRet = $gaVirtkeyMap[$nI][1]
    ExitLoop
    EndIf
    Next

    [/autoit] [autoit][/autoit] [autoit]

    Return SetError(0, 0, $sRet)
    EndFunc ;==>_GetAutoItCode

    [/autoit] [autoit][/autoit] [autoit]

    ; ==================================================================================================
    ; Func _ShowHotKey($nIndex)
    ;
    ; Display the hotkey for an input control
    ;
    ; $nIndex = The array index for the control
    ;
    ; Returns:
    ; None - the text of the control is set
    ;
    ; Author: WideBoyDixon
    ; ==================================================================================================
    ;### Tidy Error -> func Not closed before "Func" statement.
    ;### Tidy Error -> "func" cannot be inside any IF/Do/While/For/Case/Func statement.
    Func _ShowHotKey($nIndex)
    Local $sText = ""
    $gaHotkeyList[$nIndex][1] = ""

    [/autoit] [autoit][/autoit] [autoit]

    ; Build up the hotkey - display and AutoIt specific
    If BitAND($gaHotkeyList[$nIndex][4], 1) Then
    $gaHotkeyList[$nIndex][1] &= "+"
    $sText &= "SHIFT + "
    EndIf
    If BitAND($gaHotkeyList[$nIndex][4], 2) Then
    $gaHotkeyList[$nIndex][1] &= "^"
    $sText &= "CTRL + "
    EndIf
    If BitAND($gaHotkeyList[$nIndex][4], 4) Then
    $gaHotkeyList[$nIndex][1] &= "#"
    $sText &= "WIN + "
    EndIf
    If BitAND($gaHotkeyList[$nIndex][4], 8) Then
    $gaHotkeyList[$nIndex][1] &= "!"
    $sText &= "ALT + "
    EndIf
    $gaHotkeyList[$nIndex][1] &= $gaHotkeyList[$nIndex][6]
    $sText &= $gaHotkeyList[$nIndex][6]

    [/autoit] [autoit][/autoit] [autoit]

    ; Set the window text and set the selection to be the end of the string
    _WinAPI_SetWindowText($gaHotkeyList[$nIndex][0], $sText)
    _GUICtrlEdit_SetSel($gaHotkeyList[$nIndex][0], StringLen($sText), StringLen($sText))
    EndFunc ;==>_ShowHotKey

    [/autoit] [autoit][/autoit] [autoit]

    ; ==================================================================================================
    ; Func _GetHandleIndex($hWnd)
    ;
    ; Get the index in the array for a window handle
    ;
    ; $hWnd = The window handle of the input control
    ;
    ; Returns:
    ; The array index for the handle or -1 if it's not found
    ;
    ; Author: WideBoyDixon
    ; ==================================================================================================
    ;### Tidy Error -> func Not closed before "Func" statement.
    ;### Tidy Error -> "func" cannot be inside any IF/Do/While/For/Case/Func statement.
    Func _GetHandleIndex($hWnd)
    Local $nI, $nJ = -1
    For $nI = 0 To UBound($gaHotkeyList) - 1
    If $gaHotkeyList[$nI][0] = $hWnd Then
    $nJ = $nI
    ExitLoop
    EndIf
    Next
    Return $nJ
    EndFunc ;==>_GetHandleIndex

    [/autoit] [autoit][/autoit] [autoit]

    ; ==================================================================================================
    ; Func _GetAutoItHotkey($hWnd)
    ;
    ; Get the AutoIt hotkey combination for a window handle
    ;
    ; $hWnd = The window handle of the input control
    ;
    ; Returns:
    ; Success: The AutoIt version of the hotkey which can be used in HotKeySet
    ; Failure: An empty string ("") with @error set to 1
    ;
    ; Author: WideBoyDixon
    ; ==================================================================================================
    ;### Tidy Error -> func Not closed before "Func" statement.
    ;### Tidy Error -> "func" cannot be inside any IF/Do/While/For/Case/Func statement.
    Func _GetAutoItHotkey($hWnd)
    Local $nIndex = _GetHandleIndex($hWnd)
    If $nIndex = -1 Then Return SetError(1, 0, "")
    Return SetError(0, 0, $gaHotkeyList[$nIndex][1])
    EndFunc ;==>_GetAutoItHotkey

    [/autoit] [autoit][/autoit] [autoit]

    ; ==================================================================================================
    ; Func _SetAutoItHotkey($hWnd, $sAutoitKey)
    ;
    ; Set the AutoIt hotkey combination for a window handle
    ;
    ; $hWnd = The window handle of the input control
    ; $sAutoitKey = The Autoit hotkey string
    ;
    ; Returns:
    ; Success: The AutoIt version of the hotkey which can be used in HotKeySet
    ; Failure: An empty string ("") with @error set to 1
    ;
    ; Author: WideBoyDixon
    ; ==================================================================================================
    ;### Tidy Error -> func Not closed before "Func" statement.
    ;### Tidy Error -> "func" cannot be inside any IF/Do/While/For/Case/Func statement.
    Func _SetAutoItHotkey($hWnd, $sAutoitKey)
    Local $nIndex = _GetHandleIndex($hWnd), $sKey = $sAutoitKey
    If $nIndex = -1 Then Return SetError(1, 0, False)
    $gaHotkeyList[$nIndex][4] = 0
    $gaHotkeyList[$nIndex][5] = False
    $gaHotkeyList[$nIndex][6] = ""
    While StringInStr("+^#!", StringLeft($sKey, 1)) > 0
    Switch StringLeft($sKey, 1)
    Case "+"
    $gaHotkeyList[$nIndex][4] += 1
    Case "^"
    $gaHotkeyList[$nIndex][4] += 2
    Case "#"
    $gaHotkeyList[$nIndex][4] += 4
    Case "!"
    $gaHotkeyList[$nIndex][4] += 8
    EndSwitch
    $sKey = StringMid($sKey, 2)
    WEnd
    $gaHotkeyList[$nIndex][6] = $sKey
    _ShowHotKey($nIndex)
    EndFunc ;==>_SetAutoItHotkey

    [/autoit] [autoit][/autoit] [autoit]

    $hotkeyfenster = GUICreate("Tastenbelegung ändern", 300, 230)
    GUICtrlCreateLabel("Start :", 8, 10)
    GUICtrlCreateLabel("Stopp", 8, 45)
    GUICtrlCreateLabel("Lauter :", 8, 80)
    GUICtrlCreateLabel("Leiser :", 8, 115)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $okbutton = GUICtrlCreateButton("&Speichern", 110, 180, 80, 23)
    Dim $cEdit1 = GUICtrlCreateInput("-", 110, 10, 130, 24)
    Dim $hwndEdit1 = GUICtrlGetHandle($cEdit1)
    Dim $cEdit2 = GUICtrlCreateInput("-", 110, 45, 130, 24)
    Dim $hwndEdit2 = GUICtrlGetHandle($cEdit2)
    Dim $cEdit3 = GUICtrlCreateInput("-", 110, 80, 130, 24)
    Dim $hwndEdit3 = GUICtrlGetHandle($cEdit3)
    Dim $cEdit4 = GUICtrlCreateInput("-", 110, 115, 130, 24)
    Dim $hwndEdit4 = GUICtrlGetHandle($cEdit4)
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    _ToggleAsHotkeyControl($hwndEdit1)
    _ToggleAsHotkeyControl($hwndEdit2)
    _ToggleAsHotkeyControl($hwndEdit3)
    _ToggleAsHotkeyControl($hwndEdit4)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    Sleep(50)
    $guimsg = GUIGetMsg()
    Switch $guimsg
    Case $GUI_EVENT_CLOSE
    GUIDelete($hotkeyfenster)
    Exit
    Case $okbutton
    IniWrite(@ScriptDir & "\Eigene_Radios.ini", "Section Hotkeys", "Hotkeystart", _GetAutoItHotkey($hwndEdit1))
    IniWrite(@ScriptDir & "\Eigene_Radios.ini", "Section Hotkeys", "Hotkeystopp", _GetAutoItHotkey($hwndEdit2))
    IniWrite(@ScriptDir & "\Eigene_Radios.ini", "Section Hotkeys", "Hotkeylauter", _GetAutoItHotkey($hwndEdit3))
    IniWrite(@ScriptDir & "\Eigene_Radios.ini", "Section Hotkeys", "Hotkeyleiser", _GetAutoItHotkey($hwndEdit4))
    GUIDelete($hotkeyfenster)
    Exit
    EndSwitch
    WEnd
    ;~ EndFunc ;==>_SetAutoItHotkey

    [/autoit]
  • Tja, ich würde sagen Perfekt. Zwar etwas überdimensioniert aber konnte nichts viel nicht nötiges entdecken. Jetzt muss ich nurnoch aus [STRG] + [F8] ein "^{F8}" umformen und fertig... Danke Calypso & Community

  • Tja, ich würde sagen Perfekt. Zwar etwas überdimensioniert aber konnte nichts viel nicht nötiges entdecken. Jetzt muss ich nurnoch aus [STRG] + [F8] ein "^{F8}" umformen und fertig... Danke Calypso & Community


    Wozu? Es gibt doch schon _GetAutoItHotkey($hwndEdit1) ;)