I am trying to expand a zipped file from applescript using stuffit expander. It expands fine when I do it manually. The expand command is in stuffit’s dictionary. However, when I execute the script below, the run error says that stuffit expander does not understand the expand message.
Have you any ideas, please?
tell application “Finder”
tell application “Stuffit Expander” of folder “Stuffit Expander 6.0” of folder “Aladdin Folder” of folder “Internet Utilities” of folder “Applications (Mac OS 9)” of startup disk
expand(file “reno_test2_results.tar.gz 1” of folder “stuffitest” of desktop)
Yes, it works.
I just needed to add a couple of parentheses to force string concatenation before the path to the file was evaluated.
I did not need a “tell finder” block.
Thank you very much.
set pathToDesktop to path to desktop
tell application "StuffIt Expander"
Expand file ((pathToDesktop as text) & "stuffitest:reno_test2_results.tar.gz")