Difference between revisions of "AppleEventDescList"

From Xojo Documentation

m
 
Line 15: Line 15:
 
{{Property | name=StringItem | type=String | platform=all| parameters=Index as [[Integer]] | description=( String)  A String to be passed with the AppleEvent. }}
 
{{Property | name=StringItem | type=String | platform=all| parameters=Index as [[Integer]] | description=( String)  A String to be passed with the AppleEvent. }}
 
</dynamicTable>
 
</dynamicTable>
 
  
 
<dynamicTable id="Methods" class="methodTable" title="Methods" columns="3">
 
<dynamicTable id="Methods" class="methodTable" title="Methods" columns="3">
{{Method | name=AppendBoolean | params=Value as [[Boolean]] | description=AppendBoolean(Value as Boolean)&#x0D;Adds a new Boolean value to the array. }}
+
{{Method | name=AppendBoolean | params=Value as [[Boolean]] | description=AppendBoolean(Value as Boolean)&#10;Adds a new Boolean value to the array. }}
{{Method | name=AppendDescList | params=Value as '''AppleEventDescList''' | description=AppendDescList(Value as AppleEventDescList)&#x0D;Adds a new AppleEventDescList value to the array. }}
+
{{Method | name=AppendDescList | params=Value as '''AppleEventDescList''' | description=AppendDescList(Value as AppleEventDescList)&#10;Adds a new AppleEventDescList value to the array. }}
{{Method | name=AppendFolderItem | params=Value as [[FolderItem]] | description=AppendFolderItem(Value as FolderItem)&#x0D;Adds a new FolderItem to the FolderItemItem array property. }}
+
{{Method | name=AppendFolderItem | params=Value as [[FolderItem]] | description=AppendFolderItem(Value as FolderItem)&#10;Adds a new FolderItem to the FolderItemItem array property. }}
{{Method | name=AppendInteger | params=Value as [[Integer]] | description=AppendInteger(Value as Integer)&#x0D;Adds a new Integer to the IntegerItem array property. }}
+
{{Method | name=AppendInteger | params=Value as [[Integer]] | description=AppendInteger(Value as Integer)&#10;Adds a new Integer to the IntegerItem array property. }}
{{Method | name=AppendObjectSpecifier | params=Value as [[AppleEventObjectSpecifier]] | description=AppendObjectSpecifier(Value as AppleEventObjectSpecifier)&#x0D;Adds a new AppleEventObjectSpecifier object to the array. }}
+
{{Method | name=AppendObjectSpecifier | params=Value as [[AppleEventObjectSpecifier]] | description=AppendObjectSpecifier(Value as AppleEventObjectSpecifier)&#10;Adds a new AppleEventObjectSpecifier object to the array. }}
{{Method | name=AppendRecord | params=Value as [[AppleEventRecord]] | description=AppendRecord(Value as AppleEventRecord)&#x0D;Adds a new AppleEventRecord to the RecordItem array property. }}
+
{{Method | name=AppendRecord | params=Value as [[AppleEventRecord]] | description=AppendRecord(Value as AppleEventRecord)&#10;Adds a new AppleEventRecord to the RecordItem array property. }}
{{Method | name=AppendString | params=Value as [[String]] | description=AppendString(Value as String)&#x0D;Adds a new String to the StringItem array property. }}
+
{{Method | name=AppendString | params=Value as [[String]] | description=AppendString(Value as String)&#10;Adds a new String to the StringItem array property. }}
{{Method | name=BooleanItem | params=Index as [[Integer]] | returntype=[[Boolean]] | description=BooleanItem(Index as Integer) as Boolean&#x0D;Returns the Index item as a Boolean. }}
+
{{Method | name=BooleanItem | params=Index as [[Integer]] | returntype=[[Boolean]] | description=BooleanItem(Index as Integer) as Boolean&#10;Returns the Index item as a Boolean. }}
{{Method | name=DescListItem | params=Index as [[Integer]] | returntype='''AppleEventDescList''' | description=DescListItem(Index as Integer) as AppleEventDescList&#x0D;Returns the Index item as a AppleEventDescList. }}
+
{{Method | name=DescListItem | params=Index as [[Integer]] | returntype='''AppleEventDescList''' | description=DescListItem(Index as Integer) as AppleEventDescList&#10;Returns the Index item as a AppleEventDescList. }}
{{Method | name=ObjectSpecifierItem | params=Index as [[Integer]] | returntype=[[AppleEventObjectSpecifier|AppleEventObject]]Specifier | description=ObjectSpecifierItem(Index as Integer) as AppleEventObjectSpecifier&#x0D;Returns the Index item as an AppleEventObjectSpecifier. }}
+
{{Method | name=ObjectSpecifierItem | params=Index as [[Integer]] | returntype=[[AppleEventObjectSpecifier|AppleEventObject]]Specifier | description=ObjectSpecifierItem(Index as Integer) as AppleEventObjectSpecifier&#10;Returns the Index item as an AppleEventObjectSpecifier. }}
 
</dynamicTable>
 
</dynamicTable>
  
==Examples==
+
== Sample Code ==
In this example, the TextEdit application (which must be running for this example to work) is instructed to open two documents ("My Document" and "My Other Document") that are located in the folder with the default folder:
+
In this code, the TextEdit application (which must be running for this example to work) is instructed to open two documents ("My Document" and "My Other Document") that are located in the folder with the default folder:
 
 
 
<rbcode>
 
<rbcode>
 
Dim a As AppleEvent
 
Dim a As AppleEvent

Latest revision as of 21:23, 21 January 2019

Class (inherits from Object)


Used to send complex information to other applications via AppleEvents.

Properties
Count fa-lock-32.png IntegerItem StringItem
FolderItemItem fa-lock-32.png RecordItem
Methods
AppendBoolean AppendObjectSpecifier DescListItem
AppendDescList AppendRecord ObjectSpecifierItem
AppendFolderItem AppendString
AppendInteger BooleanItem

Sample Code

In this code, the TextEdit application (which must be running for this example to work) is instructed to open two documents ("My Document" and "My Other Document") that are located in the folder with the default folder:

Dim a As AppleEvent
Dim list As AppleEventDescList
a = New AppleEvent("aevt", "odoc", "com.apple.textedit")
list = New AppleEventDescList
list.AppendFolderItem(GetFolderItem("My Document"))
list.AppendFolderItem(GetFolderItem("My Other Document"))
a.DescListParam("----") = list
If Not a.Send Then
MsgBox("The AppleEvent could not be sent.")
End If

See Also

AppleEvent, AppleEventRecord classes.