Created
November 10, 2018 17:37
-
-
Save mrk21/e278f166d7a37815bba89248597fe0a4 to your computer and use it in GitHub Desktop.
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
on run | |
repeat | |
set pid to executeAutoClicker() | |
log pid | |
delay 5 | |
activateMinecraft() | |
delay 1 | |
toggleAutoClick() | |
delay 60 | |
killAutoClicker(pid) | |
delay 5 | |
end repeat | |
end run | |
on activateMinecraft() | |
tell application "System Events" | |
tell (first process whose name is "java") | |
set frontmost to true | |
delay 1 | |
key code 53 -- escape | |
end tell | |
end tell | |
end activateMinecraft | |
on executeAutoClicker() | |
set appPath to "~/Downloads/RenderFX-3.0.0/RenderFX-3.0.0.jar" | |
set pid to do shell script "java -jar " & appPath & " &> /dev/null & echo $!" | |
return pid | |
end executeAutoClicker | |
on toggleAutoClick() | |
tell application "System Events" | |
key code 100 -- F8 | |
end tell | |
end toggleAutoClick | |
on killAutoClicker(pid) | |
do shell script "kill " & pid | |
end killAutoClicker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's this
This script is in order to execute/exit Render(fx) on Minecraft automatically. The reason that I implement this script is Render(fx) hang up when it executed long time.
How to use
Refer to
Render(fx)