A2
M8
-- a simple script to cancel animations in stardew valley -- edit the second to last line of this script to change the keybind local event_sender = require('event_sender') local event_handler = require('event_handler') local shortcuts = require('shortcuts') local u = require('utils') local function cancel_animation() event_sender.down("ShiftRight") event_sender.down("Delete") event_sender.down("KeyR") u.sleep(0.1) event_sender.up("KeyR") event_sender.up("Delete") event_sender.up("ShiftRight") end shortcuts.addShortcut("F8", cancel_animation) event_handler.startHandler()
A2M8 allows you to write lua scripts that automate things for any platform
Alternative downloads
local shortcuts = require("shortcuts") local e = require("event_handler") local notify = require("notify") shortcuts.addShortcut("f12", function() local notif = notify:new() :appname("Discord") :summary("dm from dad") :body("we got the milk son!") :icon("discord") -- makes it so it doesnt crash when you do too many notifactions at once pcall(function() return notif:show() end); end) shortcuts.addShortcut("ControlLeft.keyl", function() print("Omg the legendary keyl is here!") end) while true do local event = e.internal.read() -- uncomment this to see what keys are being pressed -- print(event.key) e.eventHandler:invoke(event.name, event) end
local network = require("network") local json = require("json") local r = network.request("https://ipinfo.io", { headers = { ["User-Agent"] = "curl/7.64.1", ["Accept"] = "application/json" } }) local table = json.parse(r.text) print("Your IP is: " .. table["ip"])
local u = require("utils") local d = require("displays") local o = require("open") local SCREENSHOT_TIME = 5 local DO_OPEN = true local num = 0 while true do u.sleep(SCREENSHOT_TIME) for i, screen in pairs(d:screens()) do local path = string.format("/tmp/screenshot-%d.png", num) screen:capture(path) if DO_OPEN then o.open(path) end num = num + 1 end end
local u = require("utils") local APP = "discord" local dpath = u.find_app(APP) print(APP .. " is at " .. dpath) print("opening " .. APP) u.open_app(APP)