Error reading Arguments

Hi,

I have the following script saved at my desktop with filename “test.scpt”


on run argv
	-- get arguments
	set arg1 to ""
	try
		set arg1 to (item 1 of argv) as string
	end try
	
	if arg1 is "" or "help" then
		set theReturn to "This is the help"
	else if arg1 is "status" then
		set theReturn to "statusmessage"
	end if
	
	return theReturn
end run

I get the following error when running the “osascript ~/Desktop/test.scpt status” command in Terminal:
/Users/jonasyde/Desktop/test.scpt: execution error: Can’t make “help” into type boolean. (-1700)

Does anybody know the cause of this problem and a solution?
Any help is appreciated.

Hi,

the boolean or operator accepts only boolean values ([result of comparison1] or [result of comparison2])


.
if arg1 is "" or arg1 is "help" then
.