tabnation

intro 10

Feb 25th, 2021
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. f1:: ;get gui button pressed id
  2. WhichButton := DllCall("MessageBox", "Int", 0, "Str", "Press Yes or No", "Str", "Title of box", "Int", 4)
  3. MsgBox You pressed button #%WhichButton%.
  4. return
  5.  
  6.  
  7. F2:: ;mouse speed
  8. SPI_GETMOUSESPEED := 0x70
  9. SPI_SETMOUSESPEED := 0x71
  10. ; Retrieve the current speed so that it can be restored later:
  11. DllCall("SystemParametersInfo", "UInt", SPI_GETMOUSESPEED, "UInt", 0, "UIntP", OrigMouseSpeed, "UInt", 0)
  12. ; Now set the mouse to the slower speed specified in the next-to-last parameter (the range is 1-20, 10 is default):
  13. DllCall("SystemParametersInfo", "UInt", SPI_SETMOUSESPEED, "UInt", 0, "Ptr", 1, "UInt", 0)
  14. KeyWait F2 ; This prevents keyboard auto-repeat from doing the DllCall repeatedly.
  15. return
  16.  
  17. F2 up::DllCall("SystemParametersInfo", "UInt", SPI_SETMOUSESPEED, "UInt", 0, "Ptr", OrigMouseSpeed, "UInt", 0) ; Restore the original speed.
  18. return
  19.  
  20.  
  21. f3:: ;display a MsgBox
  22.  
  23. DllCall("user32\MessageBox", "Ptr",0, "Str","hello world", "Str","title", "UInt",0)
  24.  
  25. ;using variables
  26. vPrompt := "hello world 2"
  27. vTitle := "title"
  28. DllCall("user32\MessageBox", "Ptr",0, "Str",vPrompt, "Str",vTitle, "UInt",0)
  29.  
  30.  
  31.  
  32. f1::
  33. SetTimer, stuffhere, 5000
  34. Return
  35.  
  36. f2::
  37. SetTimer, stuffhere, off
  38. Return
  39.  
  40. stuffhere:
  41. msgbox, hi
  42. return
  43.  
  44. f3::
  45. Random, rand, 1000, 10000
  46. msgbox,%rand%
  47. sleep, % rand
  48. msgbox, %rand% Later
  49.  
  50.  
  51. ;msgbox % rand
  52. ;sleep, % rand(5000,15000)
  53.  
  54. f1::
  55. SetTimer, stuffhere, 5000
  56. Return
  57.  
  58. f2::
  59. SetTimer, stuffhere, off
  60. Return
  61.  
  62. stuffhere:
  63. msgbox, hi
  64. return
  65.  
  66. f3::
  67. Random, rand, 1000, 10000
  68. msgbox,%rand%
  69. sleep, % rand
  70. msgbox, %rand% Later
  71.  
  72.  
  73. ;msgbox % rand
  74. ;sleep, % rand(5000,15000)
Advertisement
Add Comment
Please, Sign In to add comment