Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1)Download AHK script - http://ahkscript.org/
- 2)Install
- 3)Right-click on desktop to create new AHK script file
- 3)Use text editor like Notepad++ to copy and paste this code into it(until including line 30):
- y:: ; When this("y") button is pressed on keyboard loop will start
- loop 30 ; 30 is number of cycles code in brackets will be repeated
- {
- MouseGetPos, xpos, ypos ; The cursor is at X%xpos% Y%ypos%.
- Click 110, 445 ; 110 is X coordinate, 445 is Y coordinate; You'll need to find your own coordinate to press "NEJ"
- Click 150, 540 ; This is to press Submit button
- sleep 1000 ; This is to wait until submit buttons loads, because internet 1000 = 1 second, you can change this to less or more
- Click 240, 685 ; This presses "Tillbaka till omröstningen," which AFAIK is "go back" to vote again.
- MouseMove, %xpos%, %ypos% ; move the cursor back
- }
- return
- !r:: ; Press ALT+r to STOP script, or alternaitvely delete brackets and 2nd line, where it says loop 30
- reload
- !s::
- suspend
- u:: ; USE THIS TO TEST COORDINATES
- Click 110, 445 ; CHANGE THESE X AND Y NUMBERS TO TEST
- return
- l:: ; IMPORANT! EXIT SCRIPT BY PRESSING "l" or any other button you changed script to.
- ExitApp
- Return
- 5)
- 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.
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- #Warn ; Recommended for catching common errors.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- ; While CapsLock is toggled On
- ; Script will display Mouse Position (coordinates) as a tooltip at Top-Left corner of screen.
- ; Also allows to copy them (to clipboard) with a PrintScreen button.
- #SingleInstance force ; only one instance of script can run
- #Persistent ; to make it run indefinitely
- settimer start1, 0 ; "0" to make it update position instantly
- return
- start1:
- if !GetKeyState("capslock","T") ; whether capslock is on or off
- {
- tooltip ; if off, don't show tooltip at all.
- }
- else
- { ; if on
- CoordMode, ToolTip, Screen ; makes tooltip to appear at position, relative to screen.
- CoordMode, Mouse, Screen ; makes mouse coordinates to be relative to screen.
- MouseGetPos xx, yy ; get mouse x and y position, store as %xx% and %yy%
- tooltip %xx% %yy%, 0, 0 ; display tooltip of %xx% %yy% at coordinates x0 y0.
- PrintScreen:: ; assign new function to PrintScreen. If pressed...
- clipboard == %xx% %yy% ; ...store %xx% %yy% to clipboard.
- return
- }
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement