FAQ

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

FAQ.How to get the list of the current selected files in the Finder?

Answer:
Use the AppleScript like this one:

tell application "finder"
return selection
end tell

Which translates into this AppleEvent:

Process("Finder").SendAE "core,getd,'----':obj {form:prop, want:type(prop), seld:type(sele), from:'null'()}"

and as Xojo code it looks like this:
Example
dim ae as appleevent
dim o1 as appleeventObjectSpecifier
dim f as folderItem
dim aList as appleeventdescList
dim i as Integer
dim dateiname as string

// setup the AppleEvent
o1=getpropertyObjectDescriptor( nil, "sele")
ae= newappleEvent("core", "getd", "MACS")
ae.objectSpecifierParam("----")=o1

// send it
if ae.send then
// got the list
alist=ae.replyDescList

// now show the list of filename into an editfield:

for i=1 to alist.count
f=alist.folderItemItem(i)

dateiname=f.name
// editfield1 with property "mulitline=true"!
editfield1.text=editfield1.text + dateiname + chr(13)
next
end if

💬 Ask a question or report a problem