Created
March 19, 2020 18:54
-
-
Save fuji246/61c1e03651958550b9da9754227f1def to your computer and use it in GitHub Desktop.
script to control camtwist
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
#!/usr/bin/osascript | |
on openCamTwist() | |
tell application "CamTwist" | |
activate | |
delay 1 | |
end tell | |
end openCamTwist | |
on loadCamTwist() | |
tell application "CamTwist" | |
activate | |
loadSetup("test") | |
end tell | |
tell application "System Events" to set visible of process "CamTwist" to false | |
end loadCamTwist | |
on closeCamTwist() | |
tell application "CamTwist" to quit | |
delay 1 | |
end closeCamTwist | |
on run argv | |
set helpStr to "Usage: camtwist.applescript[(open|load|close)]" | |
set action to "none" | |
if length of argv is not less than 1 then | |
set action to item 1 of argv | |
end if | |
if action is equal to "open" then | |
openCamTwist() | |
else if action is equal to "close" then | |
closeCamTwist() | |
else if action is equal to "load" then | |
loadCamTwist() | |
else | |
return helpStr | |
end if | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment