Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
Queries name of property with given index.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
AppleScript | 4.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ❌ No |
Parameter | Description | Example |
---|---|---|
Script ID | The Id of the script you want to execute. This ID returned by the AppleScript.Compile function. | 1 |
Index | The index of the property from 0 to AppleScript.PropertyCount-1. | 0 |
Returns name or error.
List properties by name:
Set Variable [ $scriptID; Value:MBS( "AppleScript.Compile"; AppleScript Properties::AppleScriptCode ) ]
If [ MBS("isError") ]
Show Custom Dialog [ Message: MBS("AppleScript.LastErrorMessage"); Buttons: “OK”, “Cancel” ]
Exit Script [ ]
End If
Set Variable [ $count; Value:MBS( "AppleScript.PropertyCount"; $scriptID) ]
Set Variable [ $list; Value:"" ]
Set Variable [ $i; Value:0 ]
If [ GetAsNumber($count) > 0 ]
Loop
Set Variable [ $n; Value:MBS( "AppleScript.GetPropertyName"; $ScriptID; $i ) ]
Set Variable [ $list; Value:$list & $n & ¶ ]
Set Variable [ $i; Value:$i+1 ]
Exit Loop If [ $count = $i ]
End Loop
Show Custom Dialog [ Title: $count & " Properties"; Message: $list; Buttons: “OK”, “Cancel” ]
End If
Set Variable [ $r; Value:MBS( "AppleScript.Close"; $scriptID) ]
Created 18th August 2014, last changed 31st October 2016
AppleScript.Execute - AppleScript.GetPropertyValue
Feedback: Report problem or ask question.