Advertisement
Guest User

Untitled

a guest
Oct 13th, 2018
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; 建立視窗, 以下的 Input: 開頭即是指名名字為 Input
  2. Gui, Input:New
  3. Gui, Input:Add, Text, x12 y20 w120 h20, 按'Alt+F5'鍵要貼上的字串
  4. Gui, Input:Add, Text, x12 y50 w120 h20, 按'Alt+F6'鍵要貼上的字串
  5. Gui, Input:Add, Text, x12 y80 w120 h20, 按'Alt+F7'鍵要貼上的字串
  6. Gui, Input:Add, Text, x12 y110 w120 h20, 按'Alt+F8'鍵要貼上的字串
  7. Gui, Input:Add, Edit, x142 y20 w100 h20 vEdit1,
  8. Gui, Input:Add, Edit, x142 y50 w100 h20 vEdit2,
  9. Gui, Input:Add, Edit, x142 y80 w100 h20 vEdit3,
  10. Gui, Input:Add, Edit, x142 y110 w100 h20 vEdit4,
  11. Gui, Input:Add, Button, Default, OK
  12.  
  13. ; Alt-F11 叫出視窗
  14. !F11::
  15. Gui, Input:Show, x168 y148 h180 w300,
  16. Return
  17. ; 其實這裡可以不用費事計算位置和長寬, 可以直接使用 AutoSize 計算長寬, Center 自動置中
  18.  
  19. ; 送出
  20. ; 這裡的前綴字即是你的視窗名, 可以看到原來寫 GuiClose 的變成 InputClose, ButtonOK 也多了 Input 前綴
  21. InputClose:
  22. InputButtonOK:
  23. ; 這裡不一定要指定名字, 因為既然是這個視窗的動作那操作的自然是這個視窗
  24. Gui, Input:Submit
  25. Return
  26.  
  27. ; Alt-F5 ~ Alt-F8 叫出快鍵
  28. !F5::
  29. Send %Edit1%
  30. Return
  31. !F6::
  32. Send %Edit2%
  33. Return
  34. !F7::
  35. Send %Edit3%
  36. Return
  37. !F8::
  38. Send %Edit4%
  39. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement