Guest User

Untitled

a guest
Jul 24th, 2021
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn ; Enable warnings to assist with detecting common errors.
  3. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  5.  
  6. Difference = 50
  7. playDuration = 1500
  8.  
  9. InputBox, minValue, Min number,,,150, 125
  10. If ErrorLevel {
  11. ExitApp
  12. }
  13. else if (minValue == "") {
  14. Msgbox, no min value variable
  15. Reload
  16. }
  17. else {
  18. ;Sleep, 500
  19. ;Msgbox, %value%\n %Range%
  20.  
  21.  
  22. InputBox, maxValue, Max number,,,150, 125
  23. If ErrorLevel {
  24. ExitApp
  25. }
  26. else if (maxValue == "") {
  27. Msgbox, no max value variable
  28. Reload
  29. }
  30. else {
  31. ;Msgbox, %minValue% `n%maxValue%
  32. }
  33. }
  34.  
  35.  
  36. Numpad7::
  37. Loop {
  38. if (minValue > maxValue)
  39. break
  40. if GetKeyState("F", "P")
  41. break
  42.  
  43. ; Double left click to select all then sends the new value
  44. Mousemove, %inputX%, %inputY%
  45. Click, 2
  46. Send, % minValue
  47. ; Moves the mouse to the play button, plays the tone for the playDuration, stops and move back up to input box then repeat.
  48. Mousemove, %playX%, %playY%
  49. Click
  50. sleep, %playDuration%
  51. Mousemove, %playX%, %playY%
  52. Click
  53.  
  54. minValue := minValue + Difference
  55. }
  56. return
  57.  
  58. ; If you don't want to repress Numpad8 and 9 everytime the script starts, you can hardcode the values.
  59. ; Remove the ; infront of the clipboard command for Numpad8 and 9. This will copy the X and Y values directly to your clipboard
  60. ; After the X and Y saved to your clipboard, simply remove the variable names with the values
  61. ; inputX/Y is the inputbox that accepts the Frequency. playX/Y is just the play tone button.
  62. ; Example: Mousemove, %playX%, %playY% will instead look something like this: Mousemove, 966, 639
  63.  
  64. Numpad8::
  65. MouseGetPos, inputX, inputY
  66. ;clipboard = %inputX%, %inputY%
  67. return
  68.  
  69. Numpad9::
  70. MouseGetPos, playX, playY
  71. ;clipboard = %playX%, %playY%
  72. return
  73.  
  74. `::Reload
  75. End::ExitApp
  76.  
Advertisement
Add Comment
Please, Sign In to add comment