Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save appleneko2001/c9e46e6983ddece419138847e71125f1 to your computer and use it in GitHub Desktop.

Select an option

Save appleneko2001/c9e46e6983ddece419138847e71125f1 to your computer and use it in GitHub Desktop.
AutoKey script : used to against the fucking result screen delay of osulazer after 2023.1026.0, also sudden back to the song select screen. Recommend bind F10 key, unbind F10 key from the game
{
"type": "script",
"description": "quick back to song select after 2023.1026.0 update",
"store": {},
"modes": [
3
],
"usageCount": 21,
"prompt": false,
"omitTrigger": false,
"showInTrayMenu": false,
"abbreviation": {
"abbreviations": [],
"backspace": true,
"ignoreCase": false,
"immediate": false,
"triggerInside": false,
"wordChars": "[\\w]"
},
"hotkey": {
"modifiers": [],
"hotKey": "<f10>"
},
"filter": {
"regex": "osu!.osu!",
"isRecursive": false
}
}
#Enter script code
import time
import os
def runonce():
if store.get_global_value("foo"):
return 0
store.set_global_value("foo","bar")
time.sleep(0.3)
keyboard.release_key("<f10>")
os.system("/usr/bin/wmctrl -a osu!")
keyboard.send_keys('<escape>')
os.system("/usr/bin/wmctrl -a osu!")
keyboard.press_key("<escape>")
os.system("/usr/bin/wmctrl -a osu!")
time.sleep(0.2)
keyboard.release_key("<escape>")
os.system("/usr/bin/wmctrl -a osu!")
os.system("/usr/bin/wmctrl -c osu!")
#dont use this, it will call out linux tty mode
#use wmctrl -c :ACTIVE:
#keyboard.fake_keypress('<alt>+<f4>')
time.sleep(0.1)
keyboard.send_keys('<escape>')
os.system("/usr/bin/wmctrl -a osu!")
time.sleep(0.1)
keyboard.send_keys(' ')
os.system("/usr/bin/wmctrl -a osu!")
time.sleep(0.1)
keyboard.send_keys(' ')
os.system("/usr/bin/wmctrl -a osu!")
store.remove_global_value("foo")
runonce()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment