The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

LaunchParam

This Perl hash maps onto the fields of a Launch Parameter Block.

The fields are:

    launchFileFlags
    launchControlFlags
    launchAppSpec
    launchAvailableSize
    launchProcessSN
    launchPreferredSize
    launchMinimumSize
new LaunchParam [ARGUMENTS]

Returns LaunchParam.

    $launch = 
        new LaunchParam(launchAppSpec =E<gt> "hd:apps:myapp", launchMinimumSize => 32000);
DESTROY LPB

ProcessInfo

This Perl hash allows access to the ProcessInfo structure.

The field names are:

    processName
    processNumber
    processType
    processSignature
    processSize
    processMode
    processLocation
    processLauncher
    processLaunchDate
    processActiveTime
    processAppSpec
DESTROY PI

Functions

LaunchApplication LAUNCHPARAMS

The LaunchApplication function launches the application from the specified file and returns the process serial number if the application is successfully launched. Returns undef on failure.

LaunchDeskAccessory PFILESPEC, PDANAME

Mac OS only.

The LaunchDeskAccessory function searches the resource fork of the file specified by the pFileSpec parameter for the desk accessory with the 'DRVR' resource name specified in the pDAName parameter. If the 'DRVR' resource name is found, LaunchDeskAccessory launches the corresponding desk accessory. If the desk accessory is already open, it is brought to the front. Returns zero on failure.

GetCurrentProcess

The GetCurrentProcess function returns the process serial number of the process that is currently running, that is, the one currently accessing the CPU. Return undef if an error was detected.

GetFrontProcess

The GetFrontProcess function returns the process serial number of the process running in the foreground. Return undef if an error was detected.

GetNextProcess PSN

Get information about the next process, if any, in the Process ManagerÕs internal list of open processes. Return undef if an error was detected.

GetProcessInformation PSN

The GetProcessInformation function returns, in a process information record, information about the specified process. The information returned in the info parameter includes the applicationÕs name as it appears in the Application menu, the type and signature of the application, the address of the application partition, the number of bytes in the application partition, the number of free bytes in the application heap, the application that launched the application, the time at which the application was launched, and the location of the application file. Return undef if an error was detected.

SetFrontProcess PSN

The SetFrontProcess function schedules the specified process to move to the foreground. The specified process moves to the foreground after the current foreground process makes a subsequent call to WaitNextEvent or EventAvail. Returns zero on failure.

WakeUpProcess PSN

The WakeUpProcess function makes a process suspended by WaitNextEvent() eligible to receive CPU time. A process is suspended when the value of the sleep parameter in the WaitNextEvent() function is not 0 and no events for that process are pending in the event queue. This process remains suspended until the time specified in the sleep parameter expires or an event becomes available for that process. You can use WakeUpProcess to make the process eligible for execution before the time specified in the sleep parameter expires. Returns zero on failure.

SameProcess PSN1, PSN2

The SameProcess function compares two process serial numbers and determines whether they refer to the same process. Return undef if an error was detected.

ExitToShell

This function is not implemented: ExitToShell() unsupported. Use exit.

GetProcessPID(PSN)

Mac OS X only.

Get the UNIX process ID corresponding to a process serial number.

GetProcessForPID(PID)

Mac OS X only.

Get the process serial number corresponding to a UNIX process ID.

LSFindApplicationForInfo(creator, bundleID=NULL, name=NULL)

Mac OS X only.

Return the path to the application matching one or more of creator, bundleID, and name. Pass undef or empty string for unused parameters.

        $path = LSFindApplicationForInfo("R*ch");
        $path = LSFindApplicationForInfo(undef, "com.barebones.bbedit");
        $path = LSFindApplicationForInfo(undef, undef, "BBEdit.app");
        $path = LSFindApplicationForInfo("R*ch", "com.barebones.bbedit", "BBEdit.app");

1 POD Error

The following errors were encountered while parsing the POD:

Around line 297:

Non-ASCII character seen before =encoding in 'ManagerÕs'. Assuming CP1252