Created
November 7, 2020 01:27
-
-
Save sl5net/4a12df9fc3d5e6fbcb2e3edf4d1434b9 to your computer and use it in GitHub Desktop.
AutoKey Script
AutoKey Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from autopilot.input import Mouse | |
doOnlyPreview = True | |
doOnlyPreview = False | |
# winTitle = window.get_active_title() | |
# winClass = window.get_active_class() | |
# if winTitle != "0 A.D." or winClass != 'pyrogenesis.pyrogenesis': | |
# keyboard.send_keys("ü") # ü | |
# quit() | |
# üüü über ioüopü opü opü püpüpüpü püpüpü üüüüp ppppü püpüpüpüpüpüpüpüp ü | |
# üüüüüüüüüü | |
# | |
mouseObj = Mouse.create() | |
x, y = mouseObj.position() | |
xMenue = 3565 | |
yMenue = 50 | |
y2plus = 35 | |
sleepBehindClick = 0.05 | |
for i in range(2): | |
# select 2 speed | |
mouse.click_relative_self(xMenue-x , yMenue-y, 1) # open menu | |
time.sleep(sleepBehindClick) | |
# mouse.click_relative_self(xMenue-x , yMenue-y, 1) | |
#time.sleep(.1) | |
mouse.click_relative_self(xMenue-x , yMenue-y + y2plus, 1) # open next menu | |
time.sleep(sleepBehindClick) | |
# time.sleep(.01) | |
mouse.click_relative_self(xMenue-x , yMenue-y + y2plus + 10 + 22*8, 1) # select 2 speed | |
time.sleep(sleepBehindClick) | |
# mouse.click_relative_self(xMenue-x , yMenue-y + y2plus + 10 + 22*8, 1) # select 2 speed | |
# mouseObj.move(xMenue, yMenue) | |
# mouse.click_absolute(x, y, 1) | |
if not doOnlyPreview: | |
mouse.click_absolute(x, y, 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment