Send finder event

Command group Flag affected Reversible Execute on client Platform(s)
Apple events NO NO NO macOS

Syntax

Send finder event {message (parameters)}

Messages

Show About
Get File Info
Duplicate Files
Make Alias For Files
Open Files
Print Files
Reveal Files
Share Files
Empty Trash
Restart Macintosh
Show Clipboard
Shutdown Macintosh
Sleep Macintosh

Description

This command sends one of the Finder events to the standard MacOSX Finder. With the exception of the Open Files and Print Files messages, events in this group can only be sent to the local Finder.

The Finder event suite lets you manipulate files on your hard disk. If the events are accepted, the flag is set to true.

Example

; You may be familiar with the following events that act directly on the local Finder,
; since you can find them on the Finder's pull-down menus.
Send finder event {Get File Info}
Send finder event {Make Alias For Files}
Send finder event {Reveal Files}
Send finder event {Share Files}
Send finder event {Duplicate Files}
; If run without parameters, they bring up a standard dialog window, allowing one or more
; files or folders to be selected. Pathname parameters can also be entered from the keyboard, using Apple syntax;
; see the appropriate Apple reference manuals
Send finder event {Get File Info ('MyHD:Desktop folder:Microsoft Word')}
; The other four events above behave in a similar way

; The following messages are self-explanatory and take no parameters
Send finder event {Empty Trash} ;; permanently removes deleted files
Send finder event {Show About} ;; shows the 'About' information for this computer
Send finder event {Restart Macintosh}
Send finder event {Show Clipboard}
Send finder event {Shutdown Macintosh}
Send finder event {Sleep Macintosh}
Send finder event {Open Files}
Send finder event {Print Files}
; you can use these last two events to launch and print files under MacOSX eg:
Send finder event {Open Files ('MyMac:MyHD:Apps:AnApp:Doc2')}
Send finder event {Print Files ('MacNum:MyHD:Apps:AnApp:MyDoc')}