Hi, I am using ScriptEditor with javascript.
var app = Application('Terminal');
app.doScript("cd ~/Downloads;clear;");
app.activate();
It is work fine.
but i want to open the command to exist Terminal window's tab. so i put the code this:
var app = Application('Terminal'),
frontWin = app.windows[0],
frontTab = frontWin.tabs[-1];
frontTab.push(new app.Tab())
// Error -1700: Can't convert types.
frontTab.doScript("cd ~/Downloads;clear;");
// Error on line 8: Error: Named parameters must be passed as an object
app.activate();
But it is not work. please help me fix the problem.
Thanks.