Advertisement
DevTricks

Ввод текста из GUI по горячей клавише с динамическим изменением клавиши

Mar 10th, 2023
1,177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CoordMode, Mouse, Screen
  2. Gui, +AlwaysOnTop
  3. Gui, Add, Text,   x2 y15 w250 h30 , Горячая клавиша (можно динамически менять)
  4. Gui, Add, HotKey, x2 y30 w100 h20 vkey1 gApply, F11
  5. Gui, Add, Text,   x2 y65 w170 h30 , Вводимый текст
  6. Gui, Add, ComboBox, x2 y80 w150 h90 vText , yandex.ru|vk.com|google.com|
  7.  
  8. Gui, Show,x718 y273 w261 h185, Writer
  9.  
  10. GuiControlGet, keyWrite,, key1
  11. Hotkey, %keyWrite%, keyWrite
  12. return
  13.  
  14. keyWrite:
  15. MouseGetPos, xpos, ypos
  16. GuiControlGet, Text,, Text
  17. Send, %Text%
  18. Return
  19.  
  20.  
  21. GuiClose:
  22. ExitApp
  23.  
  24. Apply:
  25. Hotkey, %keyWrite%, Off
  26. GuiControlGet, keyWrite,, key1
  27. Hotkey, %keyWrite%, keyWrite, On
  28. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement