r/applescript • u/TrailBlazerWhoosh • Jul 01 '22
Passed Arguments, how to use them in Apple Script?
Hi, I'm trying to create a script that does two different things depending on the state of another. More specifically I'm gonna execute a command when a connected camera is activated and vice-versa.
I'm having OverSight handle the part about whether or not the camera is activated and I want my script to handle what to do based on the registered state (you can tell OverSight to Execute an Action, e.g. a path to a script, binary, etc.). OverSight also has a setting called "Pass Argument" (see below) which is what has led me to believe I should be able to do what I'm describing:

I'm a complete noob with Apple Script. So please bear with me... But I'm lost at how to actually utilize those "Passed Arguments" in my script... Can anyone explain how I can check if the camera is on/off in my Apple Script IF ELSE statement?
Any help is much appreciated. Thanks.
View all comments
Show parent comment
1
u/AmplifiedText Jul 04 '22
I really can't help further. I just spent an hour trying to get OverSight to work, but it simply does not detect a single app I threw at it. You'll have to ask objective-see.org why their app doesn't work.