Advertisement
SameDayLate

Untitled

Dec 15th, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. 1)Download AHK script - http://ahkscript.org/
  2. 2)Install
  3. 3)Right-click on desktop to create new AHK script file
  4. 3)Use text editor like Notepad++ to copy and paste this code into it(until including line 30):
  5.  
  6. y:: ; When this("y") button is pressed on keyboard loop will start
  7. loop 30 ; 30 is number of cycles code in brackets will be repeated
  8. {
  9. MouseGetPos, xpos, ypos ; The cursor is at X%xpos% Y%ypos%.
  10. Click 110, 445 ; 110 is X coordinate, 445 is Y coordinate; You'll need to find your own coordinate to press "NEJ"
  11. Click 150, 540 ; This is to press Submit button
  12. sleep 1000 ; This is to wait until submit buttons loads, because internet 1000 = 1 second, you can change this to less or more
  13. Click 240, 685 ; This presses "Tillbaka till omröstningen," which AFAIK is "go back" to vote again.
  14. MouseMove, %xpos%, %ypos% ; move the cursor back
  15. }
  16. return
  17.  
  18. !r:: ; Press ALT+r to STOP script, or alternaitvely delete brackets and 2nd line, where it says loop 30
  19. reload
  20.  
  21. !s::
  22. suspend
  23.  
  24. u:: ; USE THIS TO TEST COORDINATES
  25. Click 110, 445 ; CHANGE THESE X AND Y NUMBERS TO TEST
  26. return
  27.  
  28. l:: ; IMPORANT! EXIT SCRIPT BY PRESSING "l" or any other button you changed script to.
  29. ExitApp
  30. Return
  31.  
  32. 5)
  33. If you want to find coordinates for 1. Nej 2. Submit and 3.Go back use this script, press CAPSLOCK upper left corner you'll have coordinates, they may not be precise, but tinker a bit.
  34. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
  35.  
  36. #Warn ; Recommended for catching common errors.
  37.  
  38. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  39.  
  40. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  41.  
  42.  
  43.  
  44. ; While CapsLock is toggled On
  45.  
  46. ; Script will display Mouse Position (coordinates) as a tooltip at Top-Left corner of screen.
  47.  
  48. ; Also allows to copy them (to clipboard) with a PrintScreen button.
  49.  
  50.  
  51.  
  52. #SingleInstance force ; only one instance of script can run
  53.  
  54.  
  55.  
  56. #Persistent ; to make it run indefinitely
  57.  
  58. settimer start1, 0 ; "0" to make it update position instantly
  59.  
  60. return
  61.  
  62.  
  63.  
  64. start1:
  65.  
  66. if !GetKeyState("capslock","T") ; whether capslock is on or off
  67.  
  68. {
  69.  
  70. tooltip ; if off, don't show tooltip at all.
  71.  
  72. }
  73.  
  74. else
  75.  
  76. { ; if on
  77.  
  78. CoordMode, ToolTip, Screen ; makes tooltip to appear at position, relative to screen.
  79.  
  80. CoordMode, Mouse, Screen ; makes mouse coordinates to be relative to screen.
  81.  
  82. MouseGetPos xx, yy ; get mouse x and y position, store as %xx% and %yy%
  83.  
  84. tooltip %xx% %yy%, 0, 0 ; display tooltip of %xx% %yy% at coordinates x0 y0.
  85.  
  86. PrintScreen:: ; assign new function to PrintScreen. If pressed...
  87.  
  88. clipboard == %xx% %yy% ; ...store %xx% %yy% to clipboard.
  89.  
  90. return
  91.  
  92. }
  93.  
  94. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement