Use string variable as Applescript command argument
问题 I'm trying to do the following: on cleanup(x) tell application "Finder" clean up window 1 by x end tell end cleanup cleanup("name") However since x variable is a string, the clean up command doesn't accept it and exits with error. Is there a way to convert the string to something that the commands accepts or some other solution to unquote the variable without using if, else statements like this: on cleanup(x) tell application "Finder" if x is "name" then clean up window 1 by name end if end