Copy link to clipboard
Copied
I'm doing script for produsing some sound:
var mString = "tell application \"Play Sound\"\rplay \"Mac:Users:a.ivanov:Sounds:" + "copied.wav" + "\"\rend tell"
app.doScript(mStrtest, ScriptLanguage.applescriptLanguage);
This work well.
Now, i'd like to call this script from other script with any desired wav-file (not only "copied.wav" )). How to write down correctly calling other script with param.
Thanks
Copy link to clipboard
Copied
Hi;
indesign cs 6 scriptingguide page 16 😉
P.S: you may also use MacOs builtIn afplay to play soundfiles 😉
Copy link to clipboard
Copied
Page 16, as i understand, says about using doscript, but not calling other file. More over - i can't get worked this ScriptingGuide-example (pure copy-pasted in ESTK and don't work)
And "afplay" my Mac doesn't have (spotligth don't see it).
Copy link to clipboard
Copied
Hi,
var myParameters = ["Mac:Users:a.ivanov:Sounds:", "copied.wav"];
var myAppleScript = "tell application \"Play Sound\" to play ((item 1 of arguments) & item 2 of arguments)";
app.doScript(myAppleScript, ScriptLanguage.applescriptLanguage, myParameters);
doScript also excepts file, so if wanted save the line myAppleScript as *.jsx and insert the Filereference in the doScript
P.S. Assume MacOsx prior 10.5 may not include afplay
Copy link to clipboard
Copied
thanks, now, with this way it workes! )