For my script, I'm getting an argument from user input on the command line, and I want to make sure the user doesn't forget to input the argument. So basically, I want to make my script do something like this:
on run argv
if (item 1 of argv exists) then
return "defined"
else
return "undefined"
end if
end run
Right now the part that says (item 1 of argv exists) does not work, but I hope someone can help me out. Thanks!
on run argv
if (count of argv) > 0 then
return "defined"
else
return "undefined"
end if
end run
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With