Jump to content

Search the Community

Showing results for tags 'HotKeySet'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

  1. When I hold a key down I need it to fire a function which will run until I release the key. I tried using _IsPressed which works, but it continues sending the actual key I'm holding down which is no good. To prevent the key being sent I used HotKeySet. However, when I hold down the key set as a hotkey, it triggers the function continuously until I let go. So back to square one. Is there a way to achieve what I want? #include <Misc.au3> Local $hDLL = DllOpen("user32.dll") HotKeySet("{F8}", "Terminate") HotKeySet("=", "test") Func Terminate() DllClose($hDLL) Exit 0 EndFunc Func test() If _IsPressed("BB", $hDLL) Then ConsoleWrite("_IsPressed - '=' Key was pressed." & @CRLF) While _IsPressed("BB", $hDLL) ConsoleWrite(" '=' Key remains pressed." & @CRLF) Sleep(250) WEnd ConsoleWrite("_IsPressed - '=' Key was released." & @CRLF) EndIf Sleep(250) EndFunc While 1 Sleep(250) WEnd DllClose($hDLL)
  2. Hey all, I know this code has been attempted before as a GUI app, and it would not copy text properly. Here is an updated version of the Google Search Shortcut Script from: Google Search Shortcut Script #Region #AutoIt3Wrapper_Outfile=shortcuts.exe #EndRegion #include <Clipboard.au3> Opt("TrayMenuMode", 3) Opt("TrayOnEventMode", 1) HotKeySet("{F1}", "_googleit") TraySetToolTip("Right click to exit") TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "_exit") While 1 Sleep(20) WEnd #cs _googleit() Source User: ViciousXUSMC https://www.autoitscript.com/forum/topic/177446-google-search-shortcut-script/?do=findComment&comment=1273519 #ce Source Func _googleit() Opt("WinTitleMatchMode", 2) ;Set Title Match To "Any Part of String" $sOldClip = ClipGet() ;Save Current Clipboard Send("^c") ;Copy Selected Text to Clipboard *before losing focus of current window WinActivate("Google Chrome", "") ; activate chrome ShellExecute("https://www.google.at/search?q=" & URLEncode(_ClipBoard_GetData())) ;Navigate to search ClipPut($sOldClip) ;Restore Old Clipboard Opt("WinTitleMatchMode", 1) ; Sets back to default EndFunc ;==>_googleit ;URL encoding is critical when doing string search queries via URL. #cs URLEncode Source User: Dhilip89 - UnicodeURL UDF https://www.autoitscript.com/forum/topic/46894-unicodeurl-udf/ #ce Func URLEncode($UnicodeURL) $UnicodeBinary = StringToBinary($UnicodeURL, 4) $UnicodeBinary2 = StringReplace($UnicodeBinary, '0x', '', 1) $UnicodeBinaryLength = StringLen($UnicodeBinary2) Local $EncodedString For $i = 1 To $UnicodeBinaryLength Step 2 $UnicodeBinaryChar = StringMid($UnicodeBinary2, $i, 2) If StringInStr("$-_.+!*'(),;/?:@=&abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", BinaryToString('0x' & $UnicodeBinaryChar, 4)) Then $EncodedString &= BinaryToString('0x' & $UnicodeBinaryChar) Else $EncodedString &= '%' & $UnicodeBinaryChar EndIf Next Return $EncodedString EndFunc ;==>URLEncode Func _exit() $result = MsgBox(1, "Shortcuts", "Do you wish to exit Shortcuts?", 0) If $result == 1 Then Exit EndFunc ;==>_exit shortcuts.au3 shortcuts.exe
  3. Right now the script will exit immediately if I don't pause it somehow (obvious of course). I was curious on people's opinions of how they do it or what option they prefer below? Thanks Option 1 (I prefer) #include <MsgBoxConstants.au3> HotKeySet('^!p', SomeFunc) ProcessWaitClose(@AutoItPID) Func SomeFunc() MsgBox($MB_SYSTEMMODAL, "Title", "This message box will timeout after 10 seconds or select the OK button.", 10) EndFunc Option 2 (in the help file) #include <MsgBoxConstants.au3> HotKeySet('^!p', SomeFunc) While Sleep(100) WEnd Func SomeFunc() MsgBox($MB_SYSTEMMODAL, "Title", "This message box will timeout after 10 seconds or select the OK button.", 10) EndFunc Option 3 #include <MsgBoxConstants.au3> HotKeySet('^!p', SomeFunc) While 1 GUIGetMsg() ; Use the internal sleep WEnd Func SomeFunc() MsgBox($MB_SYSTEMMODAL, "Title", "This message box will timeout after 10 seconds or select the OK button.", 10) EndFunc
  4. Dear developers and creators of the language, please explain to me why when pressing the combination Crtl + Shift + C from the 5th or the 10th time "sticks / sinks" Ctrl or Shift? And then you need to press Ctrl or Shift again to reset their triggering. I only need to use hot keys like in the example! The code is a small example. Its essence is that when a user in the editor selects any number and presses a combination, then it increases by 1. Dim $x HotKeySet("+^c","Calc") While 1 Sleep(10000) WEnd Func Calc() Send("^c") Sleep(50) $x=ClipGet()+1 ClipPut($x) Send("^v") EndFunc I thought that in my program some kind of glitch was searching for a reason for a long time. And it turned out that apparently somehow the work of some functions used in the example is not compatible. Tell me, please, what is the problem?
  5. Hey anyone knows how i can have a inputbox that is connected to an HotKeySet? Like if u put in like "a" in the inputbox it sets the hotkey to "a"?
  6. Hello guys. how are u doing today ?? Im new here but i wanted show somethink i just did. best kind of dynamic way to set hotkeys in yours own program. i need any suggestions, bugs report or any way to improve or any way i can do it better. its first my own "example" so be easy for me. Thank u for your attention !!! #include <Misc.au3> #include <MsgBoxConstants.au3> #include <GUIConstantsEx.au3> $GUI = GUICreate("set hotkeys", -1,-1) GUISetState() $button_hotkey = GUICtrlCreateButton("", 80, 30, 150, 25) $button_empty = GUICtrlCreateButton("", -1 ,-1) GUICtrlSetState ($button_empty, $GUI_HIDE) Local $hDLL = DllOpen("user32.dll") $start = False $CTRL = False $SHIFT = False $ALT = False $SHIFTCTRL = False $SHIFTALT = False $CTRLALT = False $SHIFTCTRLALT = False $klawisz_shift = "" $klawisz_ctrl = "" $klawisz_alt = "" Global $klawisz_shift_autoit, $klawisz_ctrl_autoit, $klawisz_alt_autoit, $klawisz, $klawisz_autoit While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit Case $button_hotkey GUICtrlSetState($button_empty, $GUI_FOCUS) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit) $start = True $SHIFT = False $CTRL = False $ALT = False $SHIFTCTRL = False $SHIFTALT = False $CTRLALT = False $SHIFTCTRLALT = False GUISetState(@SW_DISABLE, $GUI) $klawisz_shift = "" $klawisz_ctrl = "" $klawisz_alt = "" $klawisz_shift_autoit = "" $klawisz_ctrl_autoit = "" $klawisz_alt_autoit = "" $klawisz_autoit = "" $klawisz = "" GUICtrlSetData($button_hotkey, "Press Hot Key") pobierz_hotkey() EndSwitch WEnd Func pobierz_hotkey() While $start = True If $start = True And _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) And $SHIFT = False Then $klawisz_shift = "SHIFT + " $klawisz_ctrl = "" $klawisz_alt = "" $klawisz_shift_autoit = "+" $klawisz_ctrl_autoit = "" $klawisz_alt_autoit = "" $SHIFT = True $CTRL = False $ALT = False $SHIFTCTRL = False $SHIFTALT = False $CTRLALT = False $SHIFTCTRLALT = False GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) ElseIf $start = True And $SHIFT = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) Then $klawisz_shift = "SHIFT" $klawisz_ctrl = "" $klawisz_alt = "" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) GUISetState(@SW_ENABLE) $start = False EndIf ; SHIFT If $start = True And Not _IsPressed('10', $hDLL) And _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) And $CTRL = False Then $klawisz_shift = "" $klawisz_ctrl = "CTRL + " $klawisz_alt = "" $klawisz_shift_autoit = "" $klawisz_ctrl_autoit = "^" $klawisz_alt_autoit = "" $SHIFT = False $CTRL = True $ALT = False $SHIFTCTRL = False $SHIFTALT = False $CTRLALT = False $SHIFTCTRLALT = False GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) ElseIf $start = True And $CTRL = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) Then $klawisz_shift = "" $klawisz_ctrl = "CTRL" $klawisz_alt = "" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ; CTRL If $start = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And _IsPressed('12', $hDLL) And $ALT = False Then $klawisz_shift = "" $klawisz_ctrl = "" $klawisz_alt = "ALT + " $klawisz_shift_autoit = "" $klawisz_ctrl_autoit = "" $klawisz_alt_autoit = "!" $SHIFT = False $CTRL = False $ALT = True $SHIFTCTRL = False $SHIFTALT = False $CTRLALT = False $SHIFTCTRLALT = False GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) ElseIf $start = True And $ALT = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) Then $klawisz_shift = "" $klawisz_ctrl = "" $klawisz_alt = "ALT" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ; ALT If $start = True And _IsPressed('10', $hDLL) And _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) And $SHIFTCTRL = False Then $klawisz_shift = "SHIFT + " $klawisz_ctrl = "CTRL + " $klawisz_alt = "" $klawisz_shift_autoit = "+" $klawisz_ctrl_autoit = "^" $klawisz_alt_autoit = "" $SHIFT = False $CTRL = False $ALT = False $SHIFTCTRL = True $SHIFTALT = False $CTRLALT = False $SHIFTCTRLALT = False GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) ElseIf $start = True And $SHIFTCTRL = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) Then $klawisz_shift = "SHIFT + " $klawisz_ctrl = "CTRL" $klawisz_alt = "" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ; SHIFT CTRL If $start = True And _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And _IsPressed('12', $hDLL) And $SHIFTALT = False Then $klawisz_shift = "SHIFT + " $klawisz_ctrl = "" $klawisz_alt = "ALT + " $klawisz_shift_autoit = "+" $klawisz_ctrl_autoit = "" $klawisz_alt_autoit = "!" $SHIFT = False $CTRL = False $ALT = False $SHIFTCTRL = False $SHIFTALT = True $CTRLALT = False $SHIFTCTRLALT = False GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) ElseIf $start = True And $SHIFTCTRL = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) Then $klawisz_shift = "SHIFT + " $klawisz_ctrl = "" $klawisz_alt = "ALT" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ;SHIFT ALT If $start = True And Not _IsPressed('10', $hDLL) And _IsPressed('11', $hDLL) And _IsPressed('12', $hDLL) And $CTRLALT = False Then $klawisz_shift = "" $klawisz_ctrl = "CTRL + " $klawisz_alt = "ALT + " $klawisz_shift_autoit = "" $klawisz_ctrl_autoit = "^" $klawisz_alt_autoit = "!" $SHIFT = False $CTRL = False $ALT = False $SHIFTCTRL = False $SHIFTALT = False $CTRLALT = True $SHIFTCTRLALT = False GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) ElseIf $start = True And $CTRLALT = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) Then $klawisz_shift = "" $klawisz_ctrl = "CTRL + " $klawisz_alt = "ALT" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ; CTRL ALT If $start = True And _IsPressed('10', $hDLL) And _IsPressed('11', $hDLL) And _IsPressed('12', $hDLL) And $SHIFTCTRLALT = False Then $klawisz_shift = "SHIFT + " $klawisz_ctrl = "CTRL + " $klawisz_alt = "ALT + " $klawisz_shift_autoit = "+" $klawisz_ctrl_autoit = "^" $klawisz_alt_autoit = "!" $SHIFT = False $CTRL = False $ALT = False $SHIFTCTRL = False $SHIFTALT = False $CTRLALT = False $SHIFTCTRLALT = True GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) ElseIf $start = True And $SHIFTCTRLALT = True And Not _IsPressed('10', $hDLL) And Not _IsPressed('11', $hDLL) And Not _IsPressed('12', $hDLL) Then $klawisz_shift = "SHIFT + " $klawisz_ctrl = "CTRL + " $klawisz_alt = "ALT" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ; SHIFT CTRL ALT ;/////// /////// /////// /////// /////// /////// /////// /////// /////// If $start = True And _IsPressed('08', $hDLL) Then $klawisz = "BACKSPACE" $klawisz_autoit = "{BACKSPACE}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('09', $hDLL) Then $klawisz = "TAB" $klawisz_autoit = "{TAB}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('0D', $hDLL) Then $klawisz = "ENTER" $klawisz_autoit = "{ENTER}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('13', $hDLL) Then $klawisz = "PAUSE" $klawisz_autoit = "{PAUSE}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('14', $hDLL) Then $klawisz = "CAPSLOCK" $klawisz_autoit = "{CAPSLOCK}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('1B', $hDLL) Then $klawisz = "ESC" $klawisz_autoit = "{ESC}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('20', $hDLL) Then $start = False $klawisz = "SPACEBAR" $klawisz_autoit = "{SPACE}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('21', $hDLL) Then $klawisz = "PAGE UP" $klawisz_autoit = "{PGUP}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('22', $hDLL) Then $klawisz = "PAGE DOWN" $klawisz_autoit = "{PGDN}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('23', $hDLL) Then $klawisz = "END" $klawisz_autoit = "{END}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('24', $hDLL) Then $klawisz = "HOME" $klawisz_autoit = "{HOME}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('25', $hDLL) Then $klawisz = "LEFT ARROW" $klawisz_autoit = "{LEFT}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('26', $hDLL) Then $klawisz = "UP ARROW " $klawisz_autoit = "{UP}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('27', $hDLL) Then $klawisz = "RIGHT ARROW" $klawisz_autoit = "{RIGHT}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('28', $hDLL) Then $klawisz = "DOWN ARROW" $klawisz_autoit = "{DOWN}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ;~ If $start = True And _IsPressed('29', $hDLL) Then ;~ $klawisz = "SELECT" ;~ $klawisz_autoit = "???" ;~ GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) ;~ GUISetState(@SW_ENABLE) ;~ HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") ;~ $start = False ;~ EndIf If $start = True And _IsPressed('2A', $hDLL) Then $klawisz = "PRINT" $klawisz_autoit = "{PRINTSCREEN}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ;~ If $start = True And _IsPressed('2B', $hDLL) Then ;~ $klawisz = "EXECUTE" ;~ $klawisz_autoit = "???" ;~ GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) ;~ GUISetState(@SW_ENABLE) ;~ HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") ;~ $start = False ;~ EndIf If $start = True And _IsPressed('2C', $hDLL) Then $klawisz = "PRINT SCREEN" $klawisz_autoit = "{PRINTSCREEN}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('2D', $hDLL) Then $klawisz = "INS" $klawisz_autoit = "{INS}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('2E', $hDLL) Then $klawisz = "DEL" $klawisz_autoit = "{DEL}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('30', $hDLL) Then $klawisz = "0" $klawisz_autoit = "0" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('31', $hDLL) Then $klawisz = "1" $klawisz_autoit = "1" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('32', $hDLL) Then $klawisz = "2" $klawisz_autoit = "2" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('33', $hDLL) Then $klawisz = "3" $klawisz_autoit = "3" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('34', $hDLL) Then $klawisz = "4" $klawisz_autoit = "4" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('35', $hDLL) Then $klawisz = "5" $klawisz_autoit = "5" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('36', $hDLL) Then $klawisz = "6" $klawisz_autoit = "6" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('37', $hDLL) Then $klawisz = "7" $klawisz_autoit = "7" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('38', $hDLL) Then $klawisz = "8" $klawisz_autoit = "8" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('39', $hDLL) Then $klawisz = "9" $klawisz_autoit = "9" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('41', $hDLL) Then $klawisz = "a" $klawisz_autoit = "a" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('42', $hDLL) Then $klawisz = "b" $klawisz_autoit = "b" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('43', $hDLL) Then $klawisz = "c" $klawisz_autoit = "c" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('44', $hDLL) Then $klawisz = "d" $klawisz_autoit = "d" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('45', $hDLL) Then $klawisz = "e" $klawisz_autoit = "e" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('46', $hDLL) Then $klawisz = "f" $klawisz_autoit = "f" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('47', $hDLL) Then $klawisz = "g" $klawisz_autoit = "g" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('48', $hDLL) Then $klawisz = "h" $klawisz_autoit = "h" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('49', $hDLL) Then $klawisz = "i" $klawisz_autoit = "i" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('4A', $hDLL) Then $klawisz = "j" $klawisz_autoit = "j" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('4B', $hDLL) Then $klawisz = "k" $klawisz_autoit = "k" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('4C', $hDLL) Then $klawisz = "l" $klawisz_autoit = "l" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('4D', $hDLL) Then $klawisz = "m" $klawisz_autoit = "m" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('4E', $hDLL) Then $klawisz = "n" $klawisz_autoit = "n" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('4F', $hDLL) Then $klawisz = "o" $klawisz_autoit = "o" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('50', $hDLL) Then $klawisz = "p" $klawisz_autoit = "p" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('51', $hDLL) Then $klawisz = "q" $klawisz_autoit = "q" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('52', $hDLL) Then $klawisz = "r" $klawisz_autoit = "r" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('53', $hDLL) Then $klawisz = "s" $klawisz_autoit = "s" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('54', $hDLL) Then $klawisz = "t" $klawisz_autoit = "t" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('55', $hDLL) Then $klawisz = "u" $klawisz_autoit = "u" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('56', $hDLL) Then $klawisz = "v" $klawisz_autoit = "v" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('57', $hDLL) Then $klawisz = "w" $klawisz_autoit = "w" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('58', $hDLL) Then $klawisz = "x" $klawisz_autoit = "x" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('59', $hDLL) Then $klawisz = "y" $klawisz_autoit = "y" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('5A', $hDLL) Then $klawisz = "z" $klawisz_autoit = "z" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('60', $hDLL) Then $klawisz = "KP 0" $klawisz_autoit = "{NUMPAD0}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('61', $hDLL) Then $klawisz = "KP 1" $klawisz_autoit = "{NUMPAD1}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('62', $hDLL) Then $klawisz = "KP 2" $klawisz_autoit = "{NUMPAD2}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('63', $hDLL) Then $klawisz = "KP 3" $klawisz_autoit = "{NUMPAD3}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('64', $hDLL) Then $klawisz = "KP 4" $klawisz_autoit = "{NUMPAD4}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('65', $hDLL) Then $klawisz = "KP 5" $klawisz_autoit = "{NUMPAD5}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('66', $hDLL) Then $klawisz = "KP 6" $klawisz_autoit = "{NUMPAD6}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('67', $hDLL) Then $klawisz = "KP 7" $klawisz_autoit = "{NUMPAD7}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('68', $hDLL) Then $klawisz = "KP 8" $klawisz_autoit = "{NUMPAD8}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('69', $hDLL) Then $klawisz = "KP 9" $klawisz_autoit = "{NUMPAD9}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('6A', $hDLL) Then $klawisz = "KP Multiply" $klawisz_autoit = "{NUMPADMULT}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('6B', $hDLL) Then $klawisz = "KP Add" $klawisz_autoit = "{NUMPADADD}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('6C', $hDLL) Then $klawisz = "Separator" $klawisz_autoit = "??" ;///////////////////////// GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('6D', $hDLL) Then $klawisz = "KP Subtract" $klawisz_autoit = "{NUMPADSUB}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('6E', $hDLL) Then $klawisz = "KP dot" $klawisz_autoit = "{NUMPADDOT}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('6F', $hDLL) Then $klawisz = "KP slash" $klawisz_autoit = "{NUMPADDIV}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('70', $hDLL) Then $klawisz = "F1" $klawisz_autoit = "{F1}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('71', $hDLL) Then $klawisz = "F2" $klawisz_autoit = "{F2}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('72', $hDLL) Then $klawisz = "F3" $klawisz_autoit = "{F3}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('73', $hDLL) Then $klawisz = "F4" $klawisz_autoit = "{F4}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('74', $hDLL) Then $klawisz = "F5" $klawisz_autoit = "{F5}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('75', $hDLL) Then $klawisz = "F6" $klawisz_autoit = "{F6}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('76', $hDLL) Then $klawisz = "F7" $klawisz_autoit = "{F7}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('77', $hDLL) Then $klawisz = "F8" $klawisz_autoit = "{F8}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('78', $hDLL) Then $klawisz = "F9" $klawisz_autoit = "{F9}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('79', $hDLL) Then $klawisz = "F10" $klawisz_autoit = "{F10}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('7A', $hDLL) Then $klawisz = "F11" $klawisz_autoit = "{F11}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('7B', $hDLL) Then $klawisz = "F12" $klawisz_autoit = "{F12}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('90', $hDLL) Then $klawisz = "NUM LOCK" $klawisz_autoit = "{NUMLOCK}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('91', $hDLL) Then $klawisz = "SCROLL LOCK" $klawisz_autoit = "{SCROLLLOCK}" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf ;~ If $start = True And _IsPressed('A5', $hDLL) Then ;~ $klawisz = "Right MENU " ;~ $klawisz_autoit = "{RWIN}" ;~ GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) ;~ GUISetState(@SW_ENABLE) ;~ HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") ;~ $start = False ;~ EndIf If $start = True And _IsPressed('BA', $hDLL) Then $klawisz = ";" $klawisz_autoit = ";" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('BB', $hDLL) Then $klawisz = "=" $klawisz_autoit = "=" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('BC', $hDLL) Then $klawisz = "," $klawisz_autoit = "," GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('BD', $hDLL) Then $klawisz = "-" $klawisz_autoit = "-" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('BE', $hDLL) Then $klawisz = "." $klawisz_autoit = "." GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('BF', $hDLL) Then $klawisz = "/" $klawisz_autoit = "/" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('C0', $hDLL) Then $klawisz = "`" $klawisz_autoit = "`" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('DB', $hDLL) Then $klawisz = "[" $klawisz_autoit = "[" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('DC', $hDLL) Then $klawisz = "\" $klawisz_autoit = "\" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf If $start = True And _IsPressed('DD', $hDLL) Then $klawisz = "]" $klawisz_autoit = "]" GUICtrlSetData($button_hotkey, $klawisz_shift&$klawisz_ctrl&$klawisz_alt&$klawisz) GUISetState(@SW_ENABLE) HotKeySet ($klawisz_shift_autoit&$klawisz_ctrl_autoit&$klawisz_alt_autoit&$klawisz_autoit, "_beep") $start = False EndIf WEnd EndFunc Func _beep() Beep(500,200) EndFunc ;==>_quit just one thing i dont discover yet is how disable quit program by press ESC while $button_hotkey is already pressed
  7. I want to be able to press one of the many extra buttons on my mouse to execute an autoit script function. To do this I have bound weird key combinations to to each button that would otherwise never be pressed, like shift+alt+ctrl+/ (see linked image and the following code.) Unfortunately this has a few annoying side effects, such as interfering with whatever I'm doing or one of the modifier keys occasionally getting 'stuck' down. I have been compling each version of this script directly into my startup folder(win7) and have been using it for years. But surely there is a better way of doing this, thanks for help in advance. http://prnt.sc/dquyar ;^ Ctrl ! Alt + Shift # Win HotKeySet("!{/}", "Back_Btn") ; spamclickoff HotKeySet("+!^{.}", "Forw_Btn") ; ___/Speakers/HeadPhones HotkeySet("+!^{,}", "Midd_Btn") ;MouseLock/InputStuff HotkeySet("+!^{\}", "Gs_Back_Btn") ;ScreenBrightness 100/60/20 HotkeySet("+!^{=}", "Gs_Forw_Btn") ;Vlc/CloseVlc Recent/Touhou HotkeySet("+!^{-}", "Gs_Midd_Btn") ;ScreenSwaper ToMain/ToSecond HotkeySet("+!^{]}", "Gs_M3") ;VlcTogglePlay HotkeySet("+!^{[}", "Gs_MW_Left") ;F11/!Enter
  8. I would like that if you press the ENTER key is to simulate the pressure of a button in the GUI. I have no idea how to do it. THX $BTENTER = GUICtrlCreateButton("ENTER", 260, 160, 20, 25) EX. HotKeySet("{ENTER}",$BTENTER )
  9. This script sends SPACE key when you press Middle Click of your mouse. The function "_IsPressed" dont work like "HotKeySet", you can easily send 5 spaces or more while you keep pressing Middle Click and I want to send only one time the space key, not spamming/looping it. #include <misc.au3> While 1 If _IsPressed(04) Then ;04 is Middle Click Send("{SPACE}") EndIf Sleep(10) WEnd
  10. So currently I have some code waiting for a status to change(there is different indicators to check if this status has changed) Func oneRow($count) $globaltimer = _Timer_SetTimer($gui, 60000*10, "reset") $errTimer = TimerInit() While (1)         If PixelGetColor(1117, 326) = 0xC6C6C6 Then ExitLoop (1)         Sleep(500)         MouseClick("right")         Sleep(600)         If PixelGetColor(1117, 326) = 0xC6C6C6 Then ExitLoop (1)         If TimerDiff($errTimer) > 5000 Then             If PixelGetColor(1100, 310) = 0x707070 Or PixelGetColor(901, 305) = 0xE0E0E0 Or PixelGetColor(1043, 383) = 0xC6C6C6 Then                 Sleep(100)                 Send("{esc}")                 Sleep(1000)             EndIf         EndIf     WEnd .... EndFunc   ;==>oneRow The two timers is for error checking. This works just fine the problem comes when I go into the while 1 loop, my hotkeys at the top of the program seems to stop working, for an example HotKeySet("{f1}", "stop") Func stop() Exit EndFunc ;==>stop Does not work at all after the while loop. The globaltimer is never called even though i tried setting the delay all the way down to 3 seconds. So I thought that maybe one of the function I use is blocking so the timer would never be called/the hotkey wouldn't work? if i make an delay just before the while loop the hotkey works just fine. Oh and the errTimer is supossed to not reset after 5 seconds but should keep making the check it does if five seconds have passed
  11. Hi, I have written a programm offering me a lot of hotkeys to work with windows. All in all there are 40 hotkeys defined now. Now I made a portable version of it. But in this there are a lot of hotkeys useless. So I had to change some things. But that's not my point. Because of all these many hotkeys I sometimes know I made a hotkey but what were the keys I have to press. So I want to make a little help GUI or html or whatever. Now I'm interested to automate my own list of hotkeys. How can I collect all my hotkeys and necessary keys for this in a list? Regard, Conrad
  12. Hi guys. I am trying to make a soundboard app. Here is the code I have so far #include "Misc.au3" #RequireAdmin;needed to work in some games. #include "array.au3" Opt("WinTitleMatchMode", -2) If @OSArch = "x64" Then Global $VLC_Path = "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" Global $VLC_WorkingDir = "C:\Program Files (x86)\VideoLAN\VLC\" Else Global $VLC_Path = "C:\Program Files\VideoLAN\VLC\vlc.exe" Global $VLC_WorkingDir = "C:\Program Files\VideoLAN\VLC\" EndIf Global $sectionData = IniReadSectionNames(@ScriptDir & "\SoundBoard.ini") If @error Then IniWriteSection(@ScriptDir & "\SoundBoard.ini", "Sound1", 'File="' & @UserProfileDir & '\Music\SampleTrack.mp3"' & @CRLF & 'StartTime="12"' & @CRLF & 'EndTime="34"' & @CRLF & 'PlaybackDevice="Microsoft Soundmapper"' & @CRLF & 'Hotkey="+{numpad9}"') MsgBox(16, "SoundBoard", "SoundBoard.ini is missing. It has been created for you.") ShellExecute(@ScriptDir & "\SoundBoard.ini", "", "", "edit") InputBox("SoundBoard", "Notes:" & @CRLF & "StartTime and EndTime are in seconds. Available Hotkeys can be found at the following url:", "https://www.autoitscript.com/autoit3/docs/functions/Send.htm") Exit EndIf For $i = 1 To $sectionData[0] Local $iArray = IniReadSection(@ScriptDir & "\SoundBoard.ini", $sectionData[$i]) For $j = 1 To UBound($iArray) - 1 Local $result = Assign("SoundBoard" & $i & "_" & $j, IniRead(@ScriptDir & "\SoundBoard.ini", $sectionData[$i], $iArray[$j][0], $iArray[$j][1]), 2) If $result = 1 Then Consolewrite("Variable Assigned: SoundBoard" & $i & "_" & $j & @CRLF & "Data=" & $iArray[$j][1]&@CRLF) Else Consolewrite("Variable was not assigned: SoundBoard" & $i & "_" & $j & @CRLF & "Data=" & $iArray[$j][1]&@CRLF) EndIf Next Next For $i = 1 To $sectionData[0] Local $Hotkey = Eval("SoundBoard"&$i&"_5") ConsoleWrite("Processing Hotkey "&$Hotkey&@CRLF) ;NEED HELP HERE ; HotKeySet($Hotkey,"") Next While 1 Sleep(500);idle to prevent unnecessary work. 10 is the minimal we can set this value to. WEnd Func LoadVLC($iPlayFile, $iPlayFileStartTime, $iPlayFileEndTime, $iPlayAudioDevice = "Microsoft Soundmapper") ShellExecuteWait($VLC_Path, '--qt-start-minimized --play-and-exit --start-time="' & $iPlayFileStartTime & '" --stop-time="' & $iPlayFileEndTime & '" --aout=waveout --waveout-audio-device="' & $iPlayAudioDevice & '" "' & $iPlayFile & '"', $VLC_WorkingDir, "", @SW_HIDE) Beep(500, 200) EndFunc ;==>LoadVLC For example, I have a song called "MoonlightSonata.mp3" and I want to activate it with hotkey !{numpad9}. However, hotkeyset does not allow sending of flags so I cannot use LoadVLC as it is now. I need to create a function that stores the flags using the data from the earlier Inireads. Ik how to use the data but not how to create the function to store that data. I looked at IsFunc() second example but I do not understand. Sorry if I am not being clear on what I am trying to do. My brain is fried right now after trying various things for an hour. Any help would be appreciated. The idea is to be able to have a dedicated hotkey for each sound I want to play so I will need to have my script create a new function by itself using the data from the INI. hotkeyset("$hotkey1","MySoundBoard1") hotkeyset("$hotkey2","MySoundBoard2") func MySoundBoard1() LoadVLC("MoonlightSonata.mp3") ;the other flags are optional and will not be set for simplicity. endfunc func MySoundBoard1() LoadVLC("TheBananaSong.mp3") endfunc Honestly I don't care how it is done as long as I have a dedicated hotkey for each entry in my ini. An example of such an entry looks like [Sound1] File="C:\Users\BetaL\Music\SampleTrack1.mp3" StartTime="12" EndTime="34" PlaybackDevice="Microsoft Soundmapper" Hotkey="!{numpad8}" [Sound2] File="C:\Users\BetaL\Music\SampleTrack2.mp3" StartTime="24" EndTime="43" PlaybackDevice="Microsoft Soundmapper" Hotkey="!{numpad9}" Am I making any sense? Please let me know. Edit: Huge thanks to @Melba23 for the learning experience, his time, and help.
  13. How do I chain letters in a HotKeySet? This works: HotKeySet("+!d", "function")I tried this but does not work HotKeySet("abc", "function")Just reacts to the a, how to accomplish this?
  14. Hi, I am using ini files wich can set different (variable) key combinations in the script. i have a settings button wich opens a gui where the ini file can be editted and only the key that combines with the CTRL in the HotkeySet But the problem i have is that the hotkeyset does nothing when i use the variable, when i hardcode a letter to the combination it does work. What am i doing wrong. $GUI = GUICreate("Hotkey", 207, 121, -1, -1) $Combo = GUICtrlCreateCombo("", 16, 40, 161, 25, BitOR($CBS_DROPDOWNLIST, $WS_VSCROLL)) If FileExists(@ScriptDir & "\INI\Namen\names.ini") Then $var = IniReadSection(@ScriptDir & "\INI\Namen\names.ini", "Names") If @error <> 1 Then GUICtrlSetData($COMBO, "") For $x = 1 To $var[0][0] GUICtrlSetData($COMBO, $var[$x][0]) Next EndIf EndIf GUICtrlCreateLabel("Naam:", 16, 16) $SETTINGS = GUICtrlCreateButton("Instellingen", 16, 72, 75, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $SETTINGS SETTINGS() Case $GUI_EVENT_CLOSE Exit Case $COMBO SETHOTKEY() EndSwitch WEnd Func SETHOTKEY() $NAME = GUICtrlRead($COMBO) $VARDEFAULT = IniRead(@Scriptdir & "\INI\Namen\" & $NAME & ".ini", "standaard", "Q", "") MsgBox(4096, "Test", $VARDEFAULT) HotKeySet("^" & $VARDEFAULT, "TIMESTAMP") EndFunc ;==================================================================================================================================================================================== Func TIMESTAMP() $NAME = GUICtrlRead($COMBO) $var = IniRead(@ScriptDir & "\names.ini", "names", $NAME, "") ControlSend("", "", "", $var & " | " & @MDAY & "-" & @MON & "-" & @YEAR & " | " & @HOUR & ":" & @MIN & " | ", 0) Sleep(50) EndFunc
  15. Hello I am trying to store the last 5 clipboard contents to a array. When i run my code, autoit is jumping in front of the system control +c and it is not copying anything to the clipboard. I am stumped, any ideas? Global $x=0 Global $arr[5] HotKeySet("^c","_stepper") #cs******************************************************************************************************* ////////////////////////////////////////////////////////////////////////////////////////////////////////// \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ #ce******************************************************************************************************* func _stepper() MsgBox(0, "Just message", "stepper is called") $arr[$x]=ClipGet() $x=$x+1 if $x=5 then $x=0 MsgBox(0, "Just message",$x) EndFunc #cs******************************************************************************************************* ////////////////////////////////////////////////////////////////////////////////////////////////////////// \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ #ce******************************************************************************************************* While 1 Sleep(500) WEnd
  16. Respected programmers, tell me how to get the arguments in the correct format for the function HotKeySet () from the results function _IsPressed ()? I need to allow the user to choose the key(eg left/right arrow), when pressed, will be called the desired function through HotKeySet (). Thanks!
  17. Hi all, I want use more than one key in HotKeySet or _IsPressed functions. This is my code. It is working. But i would like to know if there is any better way to do this. Local $flag1 = False Local $flag2 = False While 1 Sleep(10) if _IsPressed("4D") Then $flag1 = True If _IsPressed("44") Then $flag2 = True if $flag1 = True And $flag2 = True And _IsPressed("41") Then TestSend() WEnd Func TestSend() Send("{BS 3}My Dear Alan{TAB}:{SPACE}") EndFunc ;==>WordSendKeyALT_W
  18. Hello everyone, Have a tricky question: How i manage to exit from loop, but not from script? (ExitLoop it is ok, but runned out of ways, how to use it in my script ) With this i have a problem: If i unpause (F2) the script, it will continue the loop. While scrip is paused (F2) i can restart it (F1), but: While script is paused (F2), and i open my form (F3), and try to press button on it, it will not work, cause active loop is paused at background. (I hope i understand right the method) #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> HotKeySet("{F1}", "RunScript") HotKeySet("{F2}", "Pause") HotKeySet("{F3}", "OpenForm") Global $Pause $GUI_Create_Form = GUICreate("Settings", 175, 95) $Button_Save = GUICtrlCreateButton("Save", 10, 60, 75, 25) $Button_Cancel = GUICtrlCreateButton("Cancel", 90, 60, 75, 25) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $Button_Save MsgBox(0, "Notification", "Settings have been saved!", 1) GUISetState(@SW_HIDE) Case $Button_Cancel GUISetState(@SW_HIDE) EndSwitch WEnd Func RunScript() Local $Numbers = 1 While 1 $Numbers = $Numbers + 1 Sleep(250) ToolTip("Numbers:" & $Numbers, 0, 0) WEnd EndFunc ;==>RunScript Func Pause() $Pause = Not $Pause While $Pause Sleep(100) ToolTip('Scrpit is "Paused"', 0, 0) WEnd ToolTip("", 0, 0) EndFunc ;==>Pause Func OpenForm() GUISetState() EndFunc ;==>OpenForm All i want is, brake the counter loop with hotkey. Can anyone help me to give a logical answare? (I do need the form with buttons, to store data / save settings)
  19. Hello, I'm having some troubles using hotkeyset() in a console window.. Is it my fault or is it just not possible? (using the 'Console.au3' UDF here) #include <Console.au3> HotKeySet('{ESC}','stop') Global $input While True Cout("Enter your name: ") cin($input) system("pause") WEnd Func stop() exit EndFunc Thanks. TheAutomator.
  20. Greetings, Any help is greatly appreciated. I'm a bit new to AutoIT, I have the help file and some examples and started in on a little project with some success, but also having some ill effects which I'm sure is due to my lack of knowledge of AutoIT. Trying to send some key presses to another program from a Windowed AutoIT program. All is fine with the initial send of keys, but then that's it, I can't press my hotkey again, if I do, nothing happens. I fear that I'm not returning to my main func from the func for my hotkey. Or I'm just completely mucking up the code. Could someone please look over my code and give me some hints as to what I'm possibly doing wrong? Thanks in advance, ~Garrett #include <GUIConstantsEx.au3> #include <Constants.au3> HotKeySet("!{F1}", "SendText1") _Main() Func _Main() Local $exitbutton GUICreate("FATE Hotkeys", 300, 200) $exitbutton = GUICtrlCreateButton("Exit", 220, 166, 70, 24) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $exitbutton ExitLoop EndSelect WEnd GUIDelete() Exit EndFunc Func SendText1() Local $hWnd = WinWait("[CLASS:FATE]", "", 0) If WinExists("[CLASS:FATE]") Then WinActivate($hWnd) Send("{LCTRL down}") Send("{LSHIFT down}") Send("{~ down}") Send("{LCTRL up}") Send("{LSHIFT up}") Send("{~ up}") Send("fame") sleep(10) Send("{ENTER down}") Send("{ENTER up}") EndIf EndFunc
  21. Hi, been searching for a way to Pause a HotKeySet and it would seem that the Help File has one beautifully prepared. But it turns out that Pause does not stop the HotKeySet from working. Anyone know why? And/Or how to fix it? Thanks, Bill
  22. hi all i'am using hotkeyset("a", "a") in my script it is working well when i press "a" but the problem is when i press shift + a or ctrl + a or any two keys with "a" it will not work i want my function to run even if i pressed "a" with other key i tried HotKeySet("{LSHIFT}a")for example.. but the problem is this only works if shift + a are presses at the same second it won't work if i pressed shift the i waited 1 second the i presses "a" then i released shift any ideas ?
  23. Hello, why this code doesn't work in some versions of windows 7? HotkeySet(Chr(0x27),"func1") Func func1() MsgBox(0,"test","hello") EndFunc While True Sleep(10) WEnd When I press ' i should get a messagebox window but i don't.
  24. In my GUI window I'm trying to on hitting F1 in a case statement with HotKeySet() bring up a word document using a function called Word().. Am I using this wrong? everytime I try it won't open the file I have tried opening just opens a blank document and it doesn't wait till I hit F1 it just opens when my GUI is run. here is my Word() function... Func Word() Local $name = _WordAttach(@ScriptDir & "example.docx", "FileName") Local $word = _WordDocOpen($name, @ScriptDir & "example.docx" , 1, 1) return $word EndFunc
  25. Hello all, is possible to create a script that sets the key to be pressed from information taken from an ini file? AutoIt.au3 HotKeySet( IniRead("file.ini", "Section", "Key", "Hotkey"), "Function" ) file.ini [Section] Key=F5 So the result would be: HotKeySet( "F5", "Function" )
×
×
  • Create New...