setUserName for AppleScript
Posted: Thu Oct 29, 2015 4:03 pm
Hi,
I would like to use AppleScript for associating Switch Client User to a job. The JavaScript looks like following code:
I cannot find any Switch AppleScript API reference. I would like to use the AppleScript variant of
How are the AppleScript classes and methods looks like?
Regards, Sjoerd
I would like to use AppleScript for associating Switch Client User to a job. The JavaScript looks like following code:
Code: Select all
function jobArrived( s : Switch, job : Job )
{
// Get the value of the username property
var theUserName = job.getVariableAsString('[Metadata.Text:Path="/Root/Usr",Dataset="Upload-XML",Model="XML"]');
// And set that as username in the job ticket
job.setUserName(theUserName);
// End by moving the job to the next step
job.sendToSingle( job.getPath() );
}
Code: Select all
job.setUserName(theUserName);
Regards, Sjoerd