info("processidentifier")

The info(“processidentifier”) function returns the process id number that Panorama is running under.


Description

This function returns the process id number that Panorama is running under. This is the name that you will see if you look in Activity Monitor under PID.

Here is an example that uses the process identifier to force Panorama to quit (and then immediately relaunch). (Panorama uses a variation of this code to install updates.)

let executablePath = posixpath(replace(bundleresourcepath(),".app/Contents/Resources",".app"))
let relaunchScript =
    // force Panorama to quit
    "kill -9 "+info("processidentifier")+lf()+
    // wait for Panorama to stop
    "while ps -p "+info("processidentifier")+"; do sleep 1;done;"+lf()+
    // re-open Panorama
    "open "+ executablePath
let pid = blindposixscript(relaunchScript)

See Also


History

VersionStatusNotes
10.2NewNew in this version.