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.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
AppleScript.GetPropertyName
Queries name of property with given index.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| AppleScript | 4.2 | Yes | No | No | Yes, macOS only | No |
Parameters
| 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 |
Result
Returns name or error.
Description
Queries name of property with given index.Lasterror is set.
Examples
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) ]
See also
- AppleScript.Close
- AppleScript.Compile
- AppleScript.GetPropertyValue
- AppleScript.LastError
- AppleScript.LastErrorMessage
- AppleScript.PropertyCount
- AppleScript.SetPropertyValue
- IsError
Created 18th August 2014, last changed 31st October 2016
AppleScript.Execute - AppleScript.GetPropertyValue
Feedback: Report problem or ask question.
Links
MBS Xojo blog