Scripting Build and Licence Details

Power Manager Version

Get Power Manager's version details. i.e. powermanagerd v3.6.0

Line  
1
tell application "Power Manager Scripting"
2
    set myVersion to version of build
3
end tell

Open in Script Editor

Licenced Copy

Displays a thank you dialog box if the user has licensed Power Manager.

Line  
1
tell application "Power Manager Scripting"
2
    if the state of the licence of build is licensed then
3
     display dialog "Thank you " & name of licence of build
4
    end if
5
end tell

Open in Script Editor

Demonstration Expiry Date

Displays a dialog box showing the demonstration expiry date.

Line  
1
tell application "Power Manager Scripting"
2
    if the state of the licence of build is demonstration then
3
     display dialog "Your demo expires " & expires of licence of build
4
    end if
5
end tell

Open in Script Editor

Apply Licence Code

Set the licence details and code for Power Manager.

Line  
1
tell application "Power Manager Scripting"
2
    tell build
3
     setlicence name "Graham Miln" organisation "Personal" code "PM3-..."
4
    end tell
5
end tell

Open in Script Editor

Useful for automating installations and avoiding typographical mistakes.