<script>on mouseUphide msgask "Zoom window to 7) user state or 8) smallest fit"if it is not in "0178" then exit mouseUpdoMenu "Finder"wait until the suspendedFinderEvents Zoom, folderPath(), itif the result Γëá "" then put the resultwait 2 secsdoMenu HyperAppName()end mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Move WindowΓÇ¥</name>
<script>on mouseUpgo cd "Move Window"end mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>264</top>
<right>496</right>
<bottom>278</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Resize WindowΓÇ¥</name>
<script>on mouseUpgo cd "Resize Window"end mouseUp</script>
</part>
<part>
<id>4</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>280</top>
<right>496</right>
<bottom>294</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Close WindowΓÇ¥</name>
<script>on mouseUpgo cd "Close Window"end mouseUp</script>
<text>This event zooms the window to the state specified. It is the same as clicking in the zoom box of the window except that this can control which way the zoom goes.The event id can be any one of "zoom", "ZoomWindow", or "Zoom Window".The window path is the full pathname of the windowΓÇÖs folder.The stateInteger is 7 for the user state and 8 for the smallest possible window.</text>
</content>
<name>Zoom Window</name>
<script></script>
</card>
card_4395.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgFinderEvents Sleepif the result Γëá "" then put the resultend mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>4</id>
<text>Sleep</text>
</content>
<content>
<layer>background</layer>
<id>5</id>
<text>This event puts the machine to sleep if it is capable of it. Sleep is a low power state provided for in the Macintosh portable line. This event does nothing on machines without this capability.The event id can be either "slep" or "Sleep".</text>
</content>
<content>
<layer>background</layer>
<id>7</id>
<text>FinderEvents "event ID"</text>
</content>
<name>Sleep</name>
<script></script>
</card>
card_5107.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msganswer "Are you sure you want to Shutdown your computer?" with "No" or "Yes"if it Γëá "Yes" then exit mouseUpFinderEvents Shutdownif the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£RestartΓÇ¥</name>
<script>on mouseUpgo cd "Restart"end mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>4</id>
<text>Shut Down</text>
</content>
<content>
<layer>background</layer>
<id>5</id>
<text>This event shuts down the machine as if the Shut Down menu item in the Finder were selected. The Finder shuts down all open applications while allowing them to save their files and then shuts down the machine and switches it off if possible.The event id can be either "shut" or "Shutdown".</text>
</content>
<content>
<layer>background</layer>
<id>7</id>
<text>FinderEvents "event ID"</text>
</content>
<name>Shut Down</name>
<script></script>
</card>
card_3926.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents ShowClipif the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Hide ClipboardΓÇ¥</name>
<script>on mouseUpgo cd "Hide Clipboard"end mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>4</id>
<text>Show Clipboard</text>
</content>
<content>
<layer>background</layer>
<id>5</id>
<text>This event causes the Finder to display its Clipboard window. This is the same as selecting the Show Clipboard menu item in the Finder.The event id can be any one of "shcl", "ShowClipboard", or "Show Clipboard".See the fake Hide Clipboard event to close the Clipboard window.</text>
</content>
<content>
<layer>background</layer>
<id>7</id>
<text>FinderEvents "event ID"</text>
</content>
<name>Show Clipboard</name>
<script></script>
</card>
card_6117.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents Sharing, folderParentPath(), folderName() & colonif the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>14</left>
<top>280</top>
<right>141</right>
<bottom>302</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Disk Privileges</name>
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents GetPrivilege, "", diskName()if the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>4</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>14</left>
<top>310</top>
<right>141</right>
<bottom>332</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Hypercard Privs</name>
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedget long name of Hypercardset itemDelimiter to colonget long name of Hypercarddelete last item of itFinderEvents Sharing, it, last item of long name of Hypercardif the result Γëá "" thenput the resultdoMenu HyperAppName()end ifset itemDelimiter to commaend mouseUp</script>
</part>
<part>
<id>5</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Close WindowΓÇ¥</name>
<script>on mouseUpgo cd "Close Window"end mouseUp</script>
<text>This event brings up the Sharing dialog for the specified application(s), disk(s) or folder(s). Since documents cannot be shared, they cannot be specified in this list. If an application is specified and linking is not on, the Finder will display a dialog asking if you want to turn linking on.The event id can be any one of "sprv", Sharing", "GetPrivilage", "Get Privilage", "GetPrivilegeSelection", or "Get Privilege Selection".The parent path is the pathname of the parent folder which holds all of the items in the item list.The item list is a single folder or application name (not a pathname) or a comma delimited list of folder and application names. If a folder is present, it must end in a colon.If you want to get sharing info on a disk, then the parent path should be empty and the folder list should be the diskΓÇÖs name.</text>
</content>
<name>Sharing</name>
<script></script>
</card>
card_9698.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgask "Set view to 0) Small Icon, 1) Icon, 2) Name, 3) Size, 4) Kind, " & ¬"5) Label, 6) Date, 7) Version, or 8) Comment"if it is not in "012345678" then exit mouseUpdoMenu "Finder"wait until the suspendedFinderEvents View, folderPath(), itif the result ≠ "" then put the resultend mouseUp</script>
<text>This event changes the view in the selected window to the state specified. If the window is not open then this will open it before changing the view.The event id can be any one of "view", "ChangeView", "Change View", "SetView", or "Set View".The window path is the full pathname of the windowΓÇÖs folder.The stateInteger is one of the following numbers:0) Small Icon1) Icon2) Name3) Size4) Kind5) Label6) Date7) Version8) Comment</text>
</content>
<name>Set View</name>
<script></script>
</card>
card_6296.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents Reveal, folderPath(), short name of this stackif the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>14</left>
<top>280</top>
<right>141</right>
<bottom>302</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Reveal Folder</name>
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents Reveal, folderParentPath(), folderName() & colonif the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>14</left>
<top>310</top>
<right>141</right>
<bottom>332</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Reveal Disk</name>
<script>on mouseUphide msgdoMenu "Hide" && HyperAppName()wait until the suspendeddoMenu "Finder"FinderEvents Reveal, "", diskName()if the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>4</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Close WindowΓÇ¥</name>
<script>on mouseUpgo cd "Close Window"end mouseUp</script>
<text>This will cause the specified folder window to be opened and the items listed to be selected and hilited. There is no corresponding menu command for this, but the Find command makes use of this event.The event id can be any one of "srev", "Reveal", "RevealSelection", or "Reveal Selection".The folder path is the pathname of the parent folder which holds all of the items in the item list.The item list is a single item name (not a pathname) or a comma delimited list of item names. If a folder is present, it must end in a colon.If you want to select a disk, then the folder path should be empty and the item list should be the diskΓÇÖs name. Unfortunately, this event also opens the diskΓÇÖs window. I call that a bug.</text>
</content>
<name>Reveal Selection</name>
<script></script>
</card>
card_4615.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msganswer "Are you sure you want to Restart your computer?" with "No" or "Yes"if it Γëá "Yes" then exit mouseUpFinderEvents Restartif the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Shut DownΓÇ¥</name>
<script>on mouseUpgo cd "Shut Down"end mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>4</id>
<text>Restart</text>
</content>
<content>
<layer>background</layer>
<id>5</id>
<text>This event restarts the machine as if the Restart menu item in the Finder were selected. The Finder shuts down all open applications while allowing them to save their files and then restarts the machine.The event id can be either "rest", or "Restart".</text>
</content>
<content>
<layer>background</layer>
<id>7</id>
<text>FinderEvents "event ID"</text>
</content>
<name>Restart</name>
<script></script>
</card>
card_10237.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents Grow, diskName(), "400,400"if the result Γëá "" then put the resultwait 5 secsFinderEvents Zoom, diskName(), 8if the result Γëá "" then put the resultdoMenu HyperAppName()end mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>14</left>
<top>280</top>
<right>141</right>
<bottom>302</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Animation</name>
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedput 50 into xrepeat until x > 400FinderEvents Grow, folderPath(), x & "," & xif the result Γëá "" then put the resultadd 50 to xend repeatFinderEvents Zoom, folderPath(), 8if the result Γëá "" then put the resultdoMenu HyperAppName()end mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Move WindowΓÇ¥</name>
<script>on mouseUpgo cd "Move Window"end mouseUp</script>
</part>
<part>
<id>4</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>264</top>
<right>496</right>
<bottom>278</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Zoom WindowΓÇ¥</name>
<script>on mouseUpgo cd "Zoom Window"end mouseUp</script>
</part>
<part>
<id>5</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>280</top>
<right>496</right>
<bottom>294</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Close WindowΓÇ¥</name>
<script>on mouseUpgo cd "Close Window"end mouseUp</script>
<text>This event sets the size of the window to the height and width specified. It does not move the window. It will open the window if it is not already open.The event id can be any one of "grow", "GrowWindow", "Grow Window", "Resize", "ResizeWindow", or "Resize Window".The window path is the full pathname of the windowΓÇÖs folder.The height does not include the title bar of the window.</text>
</content>
<name>Resize Window</name>
<script></script>
</card>
card_6732.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgput folderPath() into fpif "Desktop Folder" is not in fp and "Trash" is not in fp thenanswer "This only works if this stack is on the desktop or in the trash."elsedoMenu "Hide" && HyperAppName()wait until the suspendeddoMenu "Finder"FinderEvents PutAway, fp, short name of this stackif the result Γëá "" then put the resultdoMenu HyperAppName()end ifend mouseUp</script>
<text>This event puts the specified items back in their original folders if they are either on the desktop or in the trash. This is the same as selecting the items and choosing Put Away from the File menu.The event id can be any one of "sput", "PutAway", "Put Away", "Put Away Selection", or "PutAwaySelection".The folder path is the pathname of the parent folder which holds all of the items in the item list.The item list is a single item name (not a pathname) or a comma delimited list of item names. If a folder is present, it must end in a colon.</text>
</content>
<name>Put Away</name>
<script></script>
</card>
card_9197.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents PrintWindow, folderPath()if the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Page SetupΓÇ¥</name>
<script>on mouseUpgo cd "Page Setup"end mouseUp</script>
<text>This event brings up the Print dialog and then prints the current view of the specified window to the current printer.The event id can be any one of "pwin", "PrintWindow", or "Print Window".The window path is the full pathname of the windowΓÇÖs folder.</text>
</content>
<name>Print Window</name>
<script></script>
</card>
card_5378.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgFinderEvents Print, folderPath(), short name of this stackif the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>14</left>
<top>280</top>
<right>141</right>
<bottom>302</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Remote File</name>
<script>on mouseUphide msganswer program "Select a remote Macintosh"if it = "" then exit mouseUpput it into theMacset itemDelimiter to colondelete last item of theMacset itemDelimiter to commaask "What is the pathname of the file (not folder) you wish to open?"-- a folder would require another colonif it = "" then exit mouseUpset itemDelimiter to colonput last item of it into theFiledelete last item of itset itemDelimiter to commaFinderEvents Print, it, theFile, theMacif the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>14</left>
<top>310</top>
<right>141</right>
<bottom>332</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Remote via Alias</name>
<script>on mouseUphide msg-- change this sample to suit your local setup-- This next line assumes we are using a local alias to the folderFinderEvents Print, "Local:SomeAlias", "SomeFile", "RemoteMac"if the result Γëá "" then put the resultend mouseUp</script>
<text>This event causes the Finder to print the files(s) specified as if they were selected and then Print chosen from the File menu. It is one of the two events that works across the network (the other is Open Selection).The event id can be any one of "spri", "Print", "PrintSelection", "Print Selection".The folder path is the pathname of the parent folder which holds all of the items in the file list.The file list is a single file name (not a pathname) or a comma delimited list of file names.If you use the optional parameter to specify a remote Macintosh, then several more points need to be mentioned:ΓÇó The specified folder pathname can be an alias of the remote folder on a local disk (see the example buttons below).ΓÇó The zone and colon can be omitted and will default to the local zone.</text>
</content>
<name>Print Selection</name>
<script></script>
</card>
card_8865.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents PageSetup, folderPath()if the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Print WindowΓÇ¥</name>
<script>on mouseUpgo cd "Print Window"end mouseUp</script>
<text>This opens the specified window and brings up the Page Setup dialog as if you chose the Page Setup menu item from the File menu while the window was in front.The event id can be any one of "pgsu", "PageSetup", or "Page Setup".The window path is the full pathname of the windowΓÇÖs folder. </text>
</content>
<name>Page Setup</name>
<script></script>
</card>
card_5122.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents Open, "", diskName()if the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>18</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>14</left>
<top>280</top>
<right>141</right>
<bottom>302</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Open System</name>
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents Open, sysFolder(), "System"if the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>19</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>14</left>
<top>310</top>
<right>141</right>
<bottom>332</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>System Folder</name>
<script>on mouseUphide msgget sysFolder()set itemDelimiter to ":"put last item of it into folderNamedelete last item of itdoMenu "Finder"wait until the suspendedFinderEvents Open, it, folderNameif the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>20</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>149</left>
<top>250</top>
<right>276</right>
<bottom>272</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Open Sound Panel</name>
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents Open, sysFolder() & ":Control Panels", "Sound"if the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>21</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>149</left>
<top>280</top>
<right>276</right>
<bottom>302</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Remote File</name>
<script>on mouseUphide msganswer program "Select a remote Macintosh"if it = "" then exit mouseUpput it into theMacset itemDelimiter to colondelete last item of theMacset itemDelimiter to commaask "What is the pathname of the file (not folder) you wish to open?"-- a folder would require another colonif it = "" then exit mouseUpset itemDelimiter to colonput last item of it into theFiledelete last item of itset itemDelimiter to commaFinderEvents Open, it, theFile, theMacif the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>22</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>149</left>
<top>310</top>
<right>276</right>
<bottom>332</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Remote via Alias</name>
<script>on mouseUphide msg-- change this sample to suit your local setup-- This next line assumes we are using a local alias to the control panelFinderEvents Open, "Local:CPAlias", "Sound", "RemoteMac"if the result Γëá "" then put the resultend mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>4</id>
<text>Open Selection</text>
</content>
<content>
<layer>background</layer>
<id>5</id>
<text><span class="style1">his is </span><span class="style2">the</span><span class="style1"> most useful FinderEvent. It causes the Finder to open the item(s) specified as if they were double clicked. It is one of the two events that works across the network (the other is Print Selection).The event id can be any one of "sope", "Open", "OpenSelection", "Open Selection".The folder path is the pathname of the parent folder which holds all of the items in the item list.The item list is a single item name (not a pathname) or a comma delimited list of item names. If a folder is present, it must end in a colon.If you want to open a disk, then the folder path should be empty and the item list should be the diskΓÇÖs name.If you use the optional parameter to specify a remote Macintosh, then several more points need to be mentioned:ΓÇó The specified folder pathname can be an alias of the remote folder on a local disk (see the example buttons below).ΓÇó The zone and colon can be omitted and will default to the local zone.</span></text>
<script>on mouseUphide msgFinderEvents Reveal, folderPath(), short name of this stackif the result Γëá "" then put the resultput item 4 of the screenRect + 20 into vFinderEvents MoveWindow, folderPath(), "20," & vif the result Γëá "" then put the resultdoMenu "Finder"wait until the suspendedrepeat until v < 50FinderEvents MoveWindow, folderPath(), "20," & vif the result Γëá "" then put the resultsubtract 20 from vend repeatdoMenu HyperAppName()end mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Resize WindowΓÇ¥</name>
<script>on mouseUpgo cd "Resize Window"end mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>264</top>
<right>496</right>
<bottom>278</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Zoom WindowΓÇ¥</name>
<script>on mouseUpgo cd "Zoom Window"end mouseUp</script>
</part>
<part>
<id>4</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>280</top>
<right>496</right>
<bottom>294</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Close WindowΓÇ¥</name>
<script>on mouseUpgo cd "Close Window"end mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>4</id>
<text>Move Window</text>
</content>
<content>
<layer>background</layer>
<id>5</id>
<text>This event sets the top left corner of the specified window to the point specified.The event id can be any one of "posn", "Position", "MoveWindow", "Move Window".The window path is the full pathname of the windowΓÇÖs folder.The offset refers to the top left corner of the window, which is under the window title bar, but above the double line and disk statistics in the window. Remember that 0,20 is the top left corner of the screen under the menu bar (which is normally 20 pixels tall). To have a window completely on the screen (so that you can drag and zoom it) you must make v at least 38 since the window title bar is 18 pixels tall.</text>
<script>on mouseUphide msgdoMenu "Hide" && HyperAppName()wait until the suspendeddoMenu "Finder"FinderEvents Move, DiskName() & "Desktop Folder", stackPath(), "0,0"if the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>4</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>14</left>
<top>280</top>
<right>141</right>
<bottom>302</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Animated Icon</name>
<script>on mouseUphide msgFinderEvents Reveal, folderPath(), short name of this stackdoMenu "Finder"wait until the suspendedrepeat for 8FinderEvents Move, folderPath(), stackPath(), "8,0"if the result Γëá "" then answer the resultend repeatFinderEvents Move, folderPath(), stackPath(), "-64,0"if the result Γëá "" then put the resultdoMenu HyperAppName()end mouseUp</script>
</part>
<part>
<id>5</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>350</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Duplicate SelectionΓÇ¥</name>
<script>on mouseUpgo cd "Duplicate Selection"end mouseUp</script>
<text>This event drags a specified item from itΓÇÖs current location to the specified destination folder and adds the specified point to itΓÇÖs final location in the destination window. This ignores the snap to grid setting from the Views panel.The event id can be any one of "move", "MoveSelection", or "Move Selection".The destination folder is the pathname of the folder which the item in the item path will be moved into.The item path list is the full pathname of the item to be moved or a list of full pathnames. If these are folders, they must end in a colon.The position of the item in the destination window is determined by adding the specified offset to the itemΓÇÖs offset in itΓÇÖs current window. This current offset is impossible to determine programatically making the determination of the offset to specify a hit and miss proposition.</text>
</content>
<name>Move Selection</name>
<script></script>
</card>
card_2381.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents HideClipboardif the result Γëá "" then put the resultdoMenu HyperAppName()end mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Show ClipboardΓÇ¥</name>
<script>on mouseUpgo cd "Show Clipboard"end mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>4</id>
<text>Hide Clipboard</text>
</content>
<content>
<layer>background</layer>
<id>7</id>
<text>FinderEvents "event ID"</text>
</content>
<content>
<layer>background</layer>
<id>5</id>
<text>This is a fake event that closes the Clipboard window. This performs some black magic that I donΓÇÖt care to describe here. See the code if you have to know, but beware, it is very ugly.The event id can be any one of "hdcl", "HideClipboard", "Hide Clipboard", "HideClip", or "Hide Clip".</text>
</content>
<name>Hide Clipboard</name>
<script></script>
</card>
card_5834.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents GetInfo, folderPath(), short name of this stackif the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>14</left>
<top>280</top>
<right>141</right>
<bottom>302</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Disk Info</name>
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents GetInfo, "", diskName()if the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Close WindowΓÇ¥</name>
<script>on mouseUpgo cd "Close Window"end mouseUp</script>
<text>This event displays the Get Info window for the specified items. It is the same as selecting the items and choosing Get Info from the File menu.The event id can be any one of "sinf", "Info", "GetInfo", "Get Info", "Get Info Selection", or "GetInfoSelection".The folder path is the pathname of the parent folder which holds all of the items in the item list.The item list is a single item name (not a pathname) or a comma delimited list of item names. If a folder is present, it must end in a colon.If you want to get info on a disk, then the folder path should be empty and the item list should be the diskΓÇÖs name.</text>
</content>
<name>Get Info</name>
<script></script>
</card>
card_8065.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Hide" && HyperAppName()wait until the suspendeddoMenu "Finder"FinderEvents EmptyTrashif the result Γëá "" then put the resultend mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>4</id>
<text>Empty Trash</text>
</content>
<content>
<layer>background</layer>
<id>7</id>
<text>FinderEvent "event ID"</text>
</content>
<content>
<layer>background</layer>
<id>5</id>
<text>This event empties the trash without the dialog box and no warning.The event ID can be any of "empt", "Empty Trash", or "Empty Trash".</text>
</content>
<name>Empty Trash</name>
<script></script>
</card>
card_6622.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents Reveal, folderPath(), short name of this stackif the result Γëá "" then put the resultFinderEvents Duplicate, folderPath(), short name of this stackif the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>350</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Move SelectionΓÇ¥</name>
<script>on mouseUpgo cd "Move Selection"end mouseUp</script>
<text>This event duplicates the specified items in the specified folder. This event is the same as selecting the items and choosing Duplicate from the File menu.The event id can be any one of "sdup", "Duplicate", "DuplicateSelection", "Duplicate Selection".The folder path is the pathname of the parent folder which holds all of the items in the item list.The item list is a single item name (not a pathname) or a comma delimited list of item names. If a folder is present, it must end in a colon.</text>
</content>
<name>Duplicate Selection</name>
<script></script>
</card>
card_7757.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Hide" && HyperAppName()wait until the suspendeddoMenu "Finder"FinderEvents Drag, diskName() & "Desktop Folder", stackPath(), "0,0"if the result Γëá "" then put the resultend mouseUp</script>
<text>This is essentially the copy command. It is the same as dragging the item to the point h,v in the destination folder with the option key down in the Finder.The event ID can be any one of "drag", "Drag", "DragSelection", "Drag Selection", "Copy", "CopySelection", or "Copy Selection".The destination folder is the pathname of the folder which the item in the item path will be copied into.The item path list is the full pathname of the item to be copied or a list of full pathnames. If a folder is present, it must end in a colon.The position of the item in the destination window is determined by adding the specified offset to the itemΓÇÖs offset in itΓÇÖs current window. This current offset is impossible to determine programatically making the determination of the offset to specify a hit and miss proposition.</text>
</content>
<name>Drag Selection</name>
<script></script>
</card>
card_8243.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents Open, sysFolder(), "System"if the result Γëá "" then put the resultwait 2 secsFinderEvents Close, sysFolder() & ":System"if the result Γëá "" then put the resultdoMenu HyperAppName()end mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>14</left>
<top>280</top>
<right>141</right>
<bottom>302</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Close Info</name>
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents GetInfo, sysFolder(), "System"if the result Γëá "" then put the resultwait 2 secsFinderEvents Close, sysFolder() & ":System", 11if the result Γëá "" then put the resultdoMenu HyperAppName()end mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>14</left>
<top>310</top>
<right>141</right>
<bottom>332</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Close Sharing</name>
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents Sharing, "", diskName()if the result Γëá "" then put the resultwait 2 secsFinderEvents Close, diskName(), 13if the result Γëá "" then put the resultdoMenu HyperAppName()end mouseUp</script>
</part>
<part>
<id>5</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>264</top>
<right>496</right>
<bottom>278</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Resize WindowΓÇ¥</name>
<script>on mouseUpgo cd "Resize Window"end mouseUp</script>
</part>
<part>
<id>6</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Move WindowΓÇ¥</name>
<script>on mouseUpgo cd "Move Window"end mouseUp</script>
</part>
<part>
<id>7</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>280</top>
<right>496</right>
<bottom>294</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Zoom WindowΓÇ¥</name>
<script>on mouseUpgo cd "Zoom Window"end mouseUp</script>
<text>This event will close the window specified. This is the same as clicking in the close box of a window.The event id can be any one of "clos", "Close", "CloseWindow", or "Close Window".The window path is the pathname of the folder or file the window is based on. For example, a regular window has a folder pathname as itΓÇÖs window pathname, while a Get Info window has either a disk, a folder or a file as itΓÇÖs window pathname and a Sharing window has either a disk, a folder or an application as it's window pathname.The optional window type is an integer that specifies the type of window you want closed. Regular folder windows have type 0, which is the default. Get Info windows have a type of 11 while Sharing windows have a type of 13.There is no way to get a list of currently open windows.</text>
</content>
<name>Close Window</name>
<script></script>
</card>
card_2302.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents CloseAboutif the result Γëá "" then put the resultdoMenu HyperAppName()end mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£AboutΓÇ¥</name>
<script>on mouseUpgo cd "About"end mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>7</id>
<text>FinderEvents "event ID"</text>
</content>
<content>
<layer>background</layer>
<id>4</id>
<text>Close About</text>
</content>
<content>
<layer>background</layer>
<id>5</id>
<text>This is a fake event that closes the About window. This performs some black magic that I donΓÇÖt care to describe here. See the code if you have to know, but beware, it is very ugly.The event id can be any one of "hdab", "HideAbout", "Hide About", "Close About" or "CloseAbout".</text>
</content>
<name>Close About</name>
<script></script>
</card>
card_6935.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents Reveal, folderPath(), short name of this stackif the result Γëá "" then put the resultFinderEvents Alias, folderPath(), short name of this stackif the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>14</left>
<top>280</top>
<right>141</right>
<bottom>302</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Alias Disk</name>
<script>on mouseUphide msgFinderEvents Alias, "", diskName()if the result Γëá "" then put the resultdoMenu "Hide" && HyperAppName()wait until the suspendeddoMenu "Finder"end mouseUp</script>
<text>This event creates an alias of the items listed in the folder specified as if they were selected and the Make Alias menu item were chosen from the File menu.The event id can be any one of "sali", "Alias", "Make Alias", "Alias Selection", or "AliasSelection".The folder path is the pathname of the parent folder which holds all of the items in the item list.The item list is a single item name (not a pathname) or a comma delimited list of item names. If a folder is present, it must end in a colon.If you want to create an alias of a hard disk then pass empty for the folder path and the hard disk name as the item list.</text>
</content>
<name>Alias Selection</name>
<script></script>
</card>
card_4313.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUphide msgdoMenu "Finder"wait until the suspendedFinderEvents AboutMacintoshif the result Γëá "" then put the resultend mouseUp</script>
</part>
<part>
<id>2</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>369</left>
<top>248</top>
<right>496</right>
<bottom>262</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>See also ΓÇ£Close AboutΓÇ¥</name>
<script>on mouseUpgo cd "Close About"end mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>4</id>
<text>About</text>
</content>
<content>
<layer>background</layer>
<id>5</id>
<text>This event causes the Finder to display the dialog box which shows the amount of memory being used by each running program. This event is the same as pulling down the menu About This Macintosh.The event id can be any one of "abou", "About", "AboutMacintosh", or "About Macintosh"</text>
</content>
<content>
<layer>background</layer>
<id>7</id>
<text>FinderEvents "event ID"</text>
</content>
<name>About</name>
<script></script>
</card>
card_2978.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpif the optionKey is down or cd fld "Source" = "" thenanswer file "Where is the source code?" of type textif it = "" then exit mouseUpset cursor to watchput it into theFileopen file theFileread from file theFile until eofput it into cd fld "Source"close file theFileelseask file "Where would you like the code saved?" with "FinderEvents.p"if it = "" then exit mouseUpset cursor to watchput it into theFileopen file theFilewrite cd fld "Source" to file theFileclose file theFileend ifend mouseUp</script>
<script>on mouseUplock screenhide meunlock screen with dissolveend mouseUp</script>
</part>
<content>
<layer>card</layer>
<id>1</id>
<text><span class="style7">elcome to a demo of the currently available FinderEvents. These are a set of custom Apple events that the Finder in System 7.0 understands. Apple® will not support these events and warns you that they probably will change in the near future to conform to the standard Core suite of Apple events. In the meantime, here is an XCMD that will send FinderEvents and give you some degreee of control over the Finder from HyperTalk. The Finder is </span><span class="style8">not</span><span class="style7"> intended to be scriptable. This is version 1.2 </span><span class="style9">Click on the names below to see a description of that function and examples.</span><span class="style7">This stack brought to you by Jon Pugh and Apple Computer, Inc. © 1991-92 Apple Computer, Inc.</span></text>
</content>
<content>
<layer>card</layer>
<id>24</id>
<text>{$S FinderEvents }UNIT DummyUnit;(*This XCMD sends FinderEvents to the System 7 Finder. These events are designed todemonstrate some of the power of IAC on the Macintosh, but they are not meant asan end all scripting capability. This will be added to the Finder at a later date.The syntax of this command is convoluted and varies based on the values of the parameters. The instructions are in the accompanying stack, which you should havegotten.This code, the XCMD, and the stack are all © 1991 by Apple Computer.They were all written and directed by Jon Pugh.To compile with MPW, use commands similar to the following. These require Hypercard 2.1 and the sendAE tool from the Developer CD. This script alsoassumes that you are using MPW 3.3 or later and that Hypercard is on yourboot disk and running.save -asendAE -t Hypercard -e miscdosc -m 3 -----TEXT 'go home'pascal FinderEvents.plink -o FinderEvents -rt XCMD=9215 -sg FinderEvents -m ENTRYPOINT ∂ -sn Main=FinderEvents FinderEvents.p.o ∂ "{Libraries}"Interface.o ∂ "{Libraries}"HyperXLib.o ∂ "{PLibraries}"Paslib.osendAE -t Hypercard -e miscdosc -m 1 -----TEXT 'go FinderEvents'"{Boot}"Hypercard:Hypercard*)INTERFACEUSES MemTypes, QuickDraw, OSIntf, ToolIntf, Packages, Script, Aliases, AppleEvents, AERegistry, GestaltEqu, HyperXCmd;PROCEDURE EntryPoint (paramPtr : XCmdPtr);IMPLEMENTATIONCONST { Finder Types }{• keyMiscellaneous = 'fmsc';•}{• keySelection = 'fsel';•}{• typeFinderWindow = 'fwin';•} kFinderSignature = 'MACS'; { Application Events }{• kAEAbout = 'abou';•}{• kAEShowClipboard = 'shcl';•}{• kAEEmptyTrash = 'empt';•}{• kAESleep = 'slep';•}{• kAEShutdown = 'shut';•}{• kAERestart = 'rest';•} { Window Events }{• kAESetPosition = 'posn';•}{• kAEGrow = 'grow';•}{• kAEZoom = 'zoom';•}{• kAEClose = 'clos';•}{• kAEPageSetup = 'pgsu';•}{• kAEPrintWindow = 'pwin';•}{• kAEChangeView = 'view';•} { HFS Events }{• kAEOpenSelection = 'sope';•}{• kAEPrintSelection = 'spri';•}{• kAEGetInfoSelection = 'sinf';•}{• kAEGetPrivilegeSelection = 'sprv';•}{• kAEDuplicateSelection = 'sdup';•}{• kAEPutAwaySelection = 'sput';•}{• kAEAliasSelection = 'sali';•}{• kAERevealSelection = 'srev';•}{• kAEDrag = 'drag';•}{• kAEMove = 'move';•} { Fake Event Codes } kAEHideAbout = 'hdab'; kAEHideClipboard = 'hdcl'; kAboutCode = 'abot'; kClipCode = 'clip'; { Fake Event Parameter Counts } kHideAbout = -29999; kHideClipboard = -29998;PROCEDURE FinderEvents (paramPtr : XCmdPtr); FORWARD;PROCEDURE ENTRYPOINT(paramPtr: XCmdPtr);BEGINFinderEvents(paramPtr);END; { EntryPoint }FUNCTION PathName (theFSS : FSSpec) : Str255;VAR Block : CInfoPBRec; directoryName, FullPathName : Str255; err : OSErr;BEGINFullPathName := '';WITH block DO BEGIN ioNamePtr := @directoryName; ioDrParID := theFSS.parID; END;REPEAT WITH block DO BEGIN ioVRefNum := theFSS.vRefNum; ioFDirIndex := -1; ioDrDirID := block.ioDrParID; END; err := PBGetCatInfo(@Block, FALSE); directoryName := concat(directoryName,':'); fullPathName := concat(directoryName, fullPathName);UNTIL (block.ioDrDirID = 2);PathName := Concat(fullPathName, theFSS.name);END; { Pathname }FUNCTION ExpectedParams (t : Str255; VAR theEvent : ResType) : Integer;VAr i : Integer;BEGINFOR i := 1 TO Length(t) DO IF (t[i] >= 'A') AND (t[i] <= 'Z') THEN t[i] := chr(ord(t[i]) - ord('A') + ord('a'));IF (t = kAEAbout) | (t = 'about macintosh') | (t = 'about') | (t = 'aboutmacintosh') THEN BEGIN theEvent := kAEAbout; ExpectedParams := 1; ENDELSE IF (t = kAEHideAbout) | (t = 'hideabout') | (t = 'hide about') | (t = 'closeabout') | (t = 'close about') THEN BEGIN theEvent := kAEHideAbout; ExpectedParams := kHideAbout; ENDELSE IF (t = kAEShowClipboard) | (t = 'showclipboard') | (t = 'show clipboard') | (t = 'showclip') | (t = 'show clip') THEN BEGIN theEvent := kAEShowClipboard; ExpectedParams := 1; ENDELSE IF (t = kAEHideClipboard) | (t = 'hideclipboard') | (t = 'hide clipboard') | (t = 'hideclip') | (t = 'hide clip') THEN BEGIN theEvent := kAEHideClipboard; ExpectedParams := kHideClipboard; ENDELSE IF (t = kAEEmptyTrash) | (t = 'emptytrash') | (t = 'empty trash') THEN BEGIN theEvent := kAEEmptyTrash; ExpectedParams := 1; ENDELSE IF (t = kAERestart) | (t = 'restart') THEN BEGIN theEvent := kAERestart; ExpectedParams := 1; ENDELSE IF (t = kAEShutdown) | (t = 'shutdown') THEN BEGIN theEvent := kAEShutdown; ExpectedParams := 1; ENDELSE IF (t = kAESleep) | (t = 'sleep') THEN BEGIN theEvent := kAESleep; ExpectedParams := 1; ENDELSE IF (t = kAEClose) | (t = 'close') | (t = 'closewindow') | (t = 'close window') THEN BEGIN theEvent := kAEClose; ExpectedParams := 2; ENDELSE IF (t = kAEPageSetup) | (t = 'pagesetup') | (t = 'page setup') THEN BEGIN theEvent := kAEPageSetup; ExpectedParams := 2; ENDELSE IF (t = kAEPrintWindow) | (t = 'printwindow') | (t = 'print window') THEN BEGIN theEvent := kAEPrintWindow; ExpectedParams := 2; ENDELSE IF (t = kAEOpenSelection) | (t = 'open') | (t = 'openselection') | (t = 'open selection') THEN BEGIN theEvent := kAEOpenSelection; ExpectedParams := 3; ENDELSE IF (t = kAEPrintSelection) | (t = 'print') | (t = 'printselection') | (t = 'print selection') THEN BEGIN theEvent := kAEPrintSelection; ExpectedParams := 3; ENDELSE IF (t = kAEGetInfoSelection) | (t = 'info') | (t = 'getinfo') | (t = 'get info') | (t = 'getinfoselection') | (t = 'get info selection') THEN BEGIN theEvent := kAEGetInfoSelection; ExpectedParams := 3; ENDELSE IF (t = kAEGetPrivilegeSelection) | (t = 'sharing') | (t = 'getprivilege') | (t = 'getprivilegeselection') | (t = 'get privilege') | (t = 'get privilege selection') THEN BEGIN theEvent := kAEGetPrivilegeSelection; ExpectedParams := 3; ENDELSE IF (t = kAERevealSelection) | (t = 'reveal') | (t = 'revealselection') | (t = 'reveal selection') THEN BEGIN theEvent := kAERevealSelection; ExpectedParams := 3; ENDELSE IF (t = kAEDuplicateSelection) | (t = 'duplicate') | (t = 'duplicateselection') | (t = 'duplicate selection') THEN BEGIN theEvent := kAEDuplicateSelection; ExpectedParams := 3; ENDELSE IF (t = kAEPutAwaySelection) | (t = 'putaway') | (t = 'put away') | (t = 'putawayselection') | (t = 'put away selection') THEN BEGIN theEvent := kAEPutAwaySelection; ExpectedParams := 3; ENDELSE IF (t = kAEAliasSelection) | (t = 'alias') | (t = 'aliasselection') | (t = 'alias selection') | (t = 'make alias') THEN BEGIN theEvent := kAEAliasSelection; ExpectedParams := 3; ENDELSE IF (t = kAEZoom) | (t = 'zoomwindow') | (t = 'zoom window') THEN BEGIN theEvent := kAEZoom; ExpectedParams := 3; ENDELSE IF (t = kAEChangeView) | (t = 'changeview') | (t = 'change view') | (t = 'setview') | (t = 'set view') THEN BEGIN theEvent := kAEChangeView; ExpectedParams := 3; ENDELSE IF (t = kAESetPosition) | (t = 'movewindow') | (t = 'move window') | (t = 'position') THEN BEGIN theEvent := kAESetPosition; ExpectedParams := 3; ENDELSE IF (t = kAEGrow) | (t = 'growwindow') | (t = 'grow window') | (t = 'resize') | (t = 'resizewindow') | (t = 'resize window') THEN BEGIN theEvent := kAEGrow; ExpectedParams := 3; ENDELSE IF (t = kAEDrag) | (t = 'dragselection') | (t = 'drag selection') | (t = 'copy') | (t = 'copyselection') | (t = 'copy selection') THEN BEGIN theEvent := kAEDrag; ExpectedParams := 4; ENDELSE IF (t = kAEMove) | (t = 'moveselection') | (t = 'move selection') THEN BEGIN theEvent := kAEMove; ExpectedParams := 4; ENDELSE ExpectedParams := 0;END; { ExpectedParams }FUNCTION WindowEvent (eventID : ResType) : Boolean;BEGINIF (eventID = kAESetPosition) | (eventID = kAEGrow) | (eventID = kAEZoom) | (eventID = kAEChangeView) | (eventID = kAEClose) | (eventID = kAEPageSetup) | (eventID = kAEPrintWindow) THEN WindowEvent := TRUEELSE WindowEvent := FALSE;END; { WindowEvent }FUNCTION GetTargetID (theDude, theZone : Str31; VAR theTarget: TargetID) : OSErr;VAR err : OSErr; pb : IPCListPortsPBRec; theLoc : LocationNameRec; thePort : PPCPortRec; theBuffer : PortInfoRec;BEGINGetTargetID := noErr;WITH thePort DO BEGIN nameScript := smRoman; name := 'Finder'; portKindSelector := ppcByString; portTypeStr := '='; END;WITH theLoc DO BEGIN locationKindSelector := ppcNBPLocation; WITH nbpEntity DO BEGIN objStr := theDude; typeStr := 'PPCToolbox'; zoneStr := theZone; END; END;WITH pb DO BEGIN startIndex := 0; requestCount := 1; portName := @thePort; locationName := @theLoc; bufferPtr := @theBuffer; END;err := IPCListPorts(@pb, FALSE);GetTargetID := err;IF (pb.actualCount = 1) AND (err = noErr) THEN BEGIN theTarget.name := theBuffer.name; theTarget.location := theLoc; ENDELSE IF err = noErr THEN DebugStr('Multiple people with the same name?');END; { GetTargetID }PROCEDURE FinderEvents;TYPE FinderWindowPtr = ^FinderWindowRec; FinderWindowRec = RECORD WindowID : LongInt; theType : ResType; aliasLength : LongInt; alias : AliasRecord; END;VAR eventClass, eventID, aSig : ResType; folderAlias, fileAlias : AliasHandle; theWindow : FinderWindowPtr; theKey : AEKeyword; theType : DescType; l : LongInt; p : Point; h : Handle; fileList : AEDescList; finderAddress : AEAddressDesc; theEvent, reply : AppleEvent; i, j, pCount : Integer; err : OSErr; fileSpec : FSSpec; RemoteEvent, updated : Boolean; theTarget : TargetID; theZone, theServer : Str31; s, t, files : Str255; PROCEDURE Bomb (err : OSErr; message : Str255); VAR b : Str255; BEGIN IF err <> noErr THEN BEGIN b := ''; IF err <> maxInt THEN BEGIN NumToStr(paramPtr, err, t); b := Concat(', Error = ', t); END; paramPtr^.returnValue := PasToZero(paramPtr, Concat(message, b)); Exit(FinderEvents); END; END; { Bomb } PROCEDURE PutWait (t : Str255); BEGIN SendCardMessage(paramPtr, Concat('put "', t, '"')); SendCardMessage(paramPtr, 'wait until the mouseClick'); END; { PutWait } PROCEDURE CheckVersion(theVersion : Str31); VAR theResult : LongInt; h : Handle; err : OSErr; t : Str255; BEGIN h := EvalExpr(paramPtr, 'the short name of Hypercard'); ZeroToPas(paramPtr, h^, t); DisposeHandle(h); IF t = 'Hypercard' THEN BEGIN h := EvalExpr(paramPtr, Concat('the version < ', theVersion)); ZeroToPas(paramPtr, h^, t); DisposeHandle(h); IF StrToBool(paramPtr, t) THEN Bomb(maxInt, Concat('Version ', theVersion, ' of Hypercard is required')); END; err := Gestalt(gestaltAppleEventsAttr, theResult); IF err <> noErr THEN Bomb(err, 'Gestalt failed'); IF NOT BitTst(@theResult, 31-gestaltAppleEventsPresent) THEN Bomb(maxInt, 'A system with AppleEvents is required (7.0 or later).'); END; { CheckVersion } FUNCTION AliasPath (alias: AliasHandle) : Str255; VAR t : Str255; n : Str63; i, err : Integer; BEGIN i := 0; t := ''; REPEAT err := GetAliasInfo(alias, i, n); Bomb(err, 'Error: GetAliasInfo'); i := i + 1; IF n <> '' THEN t := Concat(n, ':', t); UNTIL n = ''; err := GetAliasInfo(alias, -1, n); t := Concat(n, ':', t); Delete(t, length(t), 1); AliasPath := t; END; { AliasPath } FUNCTION Before (source, subStr : Str255) : Str255; VAR i : Integer; BEGIN i := Pos(subStr, source); IF i = 0 THEN Before := '' ELSE Before := Copy(source, 1, i-1); END; { Before } FUNCTION After (source, subStr : Str255) : Str255; VAR i : Integer; BEGIN i := Pos(subStr, source); IF i = 0 THEN After := '' ELSE After := Copy(source, i+length(subStr), length(source)-i-length(subStr)+1); END; { After } BEGINtheWindow := NIL;folderAlias := NIL;fileAlias := NIL;h := NIL;CheckVersion('2.1');IF paramPtr^.paramCount = 0 THEN Bomb(maxInt, 'FinderEvents "event ID" ["folder pathname" ["file[,file...]"] {integer | point}]');ZeroToPas(paramPtr, paramPtr^.params[1]^, t);pCount := ExpectedParams(t, eventID);IF pCount = 0 THEN Bomb(maxInt, 'This XCMD does not recognize that event ID');IF (pCount = kHideAbout) OR (pCount = kHideClipboard) THEN eventID := kAEClose;RemoteEvent := (pCount+1 = paramPtr^.paramCount) AND ((eventID = kAEOpenSelection) OR (eventID = kAEPrintSelection));IF (pCount <> paramPtr^.paramCount) AND NOT RemoteEvent AND (pCount >= 0) AND (pCount+1 <> paramPtr^.paramCount) AND WindowEvent(eventID) THEN Bomb(maxInt, 'Bad Parameter List.'); { Put more error checking here later }IF (eventID = kAEAbout) THEN eventClass := kCoreEventClassELSE eventClass := 'FNDR';IF RemoteEvent THEN BEGIN ZeroToPas(paramPtr, paramPtr^.params[pCount+1]^, s); IF Pos(':', s) = 0 THEN BEGIN t := '*'; END ELSE BEGIN t := Copy(s, 1, Pos(':', s)-1); Delete(s, 1, Pos(':', s)); END; theServer := s; theZone := t; err := GetTargetID(theServer, theZone, theTarget); Bomb(err, 'Couldn’t find remote Finder on network'); err := AECreateDesc(typeTargetID, @theTarget, sizeOf(theTarget), finderAddress); Bomb(err, 'Couldn’t get address of remote Finder'); ENDELSE BEGIN aSig := kFinderSignature; err := AECreateDesc(typeApplSignature, @aSig, 4, finderAddress); Bomb(err, 'Couldn’t get address of Finder'); END;err := AECreateAppleEvent(eventClass, eventID, finderAddress, kAutogenerateReturnID, kAnyTransactionID, theEvent);Bomb(err, 'Failed to create AppleEvent');err := AEDisposeDesc(finderAddress);Bomb(err, 'Couldn’t dispose of target address descriptor');IF pCount < 0 THEN BEGIN { This is the place we convert the fake hide about and hide clip events } { into the weird close events that the Finder wants } l := 16; { We don't want the whole structure } theWindow := FinderWindowPtr(NewPtr(l)); IF theWindow = NIL THEN BEGIN Bomb(MemError, 'Couldn’t allocate finder window record'); Bomb(maxInt, 'NIL window ptr, but no MemError'); END; theWindow^.windowID := 0; theWindow^.aliasLength := 4; theWindow^.theType := 'find'; WITH theWindow^ DO { I use this point variable because it was a spare longword } { and I needed a temporary place for the constants } IF pCount = kHideAbout THEN BEGIN p := Point(kAboutCode); BlockMove(@p, @alias, 4); END ELSE IF pCount = kHideClipboard THEN BEGIN p := Point(kClipCode); BlockMove(@p, @alias, 4); END ELSE Bomb(maxInt, 'Bad pCount in fake close event'); err := AEPutParamPtr(theEvent, keyDirectObject, typeFinderWindow, Ptr(theWindow), l); Bomb(err, 'Couldn’t create fake window parameter'); DisposPtr(Ptr(theWindow)); ENDELSE IF pCount > 1 THEN BEGIN { Most events go through here } { Parameter 2 = Finder window pathName } ZeroToPas(paramPtr, paramPtr^.params[2]^, t); IF t = '' THEN BEGIN { If there is no second parameter then the third is a disk name } { You cannot open 2 disks in the same event - this will be a bad file spec } ZeroToPas(paramPtr, paramPtr^.params[3]^, t); IF t[length(t)] <> ':' THEN t := Concat(t, ':'); err := NewAliasMinimalFromFullPath(length(t), @t[1], '', '', folderAlias); Bomb(err, 'Couldn’t make disk alias'); END ELSE IF RemoteEvent THEN BEGIN { The path is a local alias file containing an alis resource } { or the pathname of the actual remote folder which is mounted } i := OpenResFile(t); IF i = -1 THEN BEGIN { It is not a file } RemoteEvent := False; IF t[length(t)] <> ':' THEN t := Concat(t, ':'); err := NewAliasMinimalFromFullPath(length(t), @t[1], '', '', folderAlias); END ELSE BEGIN { It is a file } folderAlias := AliasHandle(GetResource('alis', 0)); DetachResource(handle(folderAlias)); j := ResError; CloseResFile(i); IF folderAlias = NIL THEN Bomb(j, 'Couldn’t get alias resource out of local alias file'); END; END ELSE BEGIN IF (t[length(t)] <> ':') AND (eventID <> kAEClose) THEN t := Concat(t, ':'); err := NewAliasMinimalFromFullPath(length(t), @t[1], '', '', folderAlias); Bomb(err, 'Couldn’t make folder alias'); END; IF folderAlias = NIL THEN Bomb(maxInt, 'Failed to create folder alias'); IF WindowEvent(eventID) THEN BEGIN l := sizeOf(FinderWindowRec) + folderAlias^^.aliasSize - sizeOf(aliasRecord); theWindow := FinderWindowPtr(NewPtr(l)); IF theWindow = NIL THEN BEGIN Bomb(MemError, 'Couldn’t allocate finder window record'); Bomb(maxInt, 'NIL window ptr, but no MemError'); END; theWindow^.windowID := 0; { All window commands have an optional parameter on the end } { This is the window type where 0 = regular, 11 = Info, and 13 = Sharing } IF paramPtr^.params[pCount+1] <> NIL THEN BEGIN ZeroToPas(paramPtr, paramPtr^.params[pCount+1]^, t); theWindow^.windowID := StrToLong(paramPtr, t); END; theWindow^.aliasLength := folderAlias^^.aliasSize; WITH theWindow^ DO BlockMove(Ptr(folderAlias^), @alias, folderAlias^^.aliasSize); theWindow^.theType := typeAlias; err := AEPutParamPtr(theEvent, keyDirectObject, typeFinderWindow, Ptr(theWindow), l); Bomb(err, 'Couldn’t create finder window parameter'); DisposPtr(Ptr(theWindow)); END ELSE { HFS or Property Event } BEGIN HLock(handle(folderAlias)); err := AEPutParamPtr(theEvent, keyDirectObject, typeAlias, Ptr(folderAlias^), folderAlias^^.aliasSize); HUnlock(handle(folderAlias)); Bomb(err, 'Couldn’t create folder parameter'); END; IF NOT RemoteEvent THEN DisposHandle(handle(folderAlias)); { Parameter 3 varies depending on the event } IF (eventID = kAEZoom) OR (eventID = kAEChangeView) THEN BEGIN ZeroToPas(paramPtr, paramPtr^.params[3]^, t); l := StrToLong(paramPtr, t); err := AEPutParamPtr(theEvent, keyMiscellaneous, typeLongInteger, @l, 4); Bomb(err, 'Couldn’t add constant parameter'); END ELSE IF (eventID = kAESetPosition) OR (eventID = kAEGrow) THEN BEGIN ZeroToPas(paramPtr, paramPtr^.params[3]^, t); StrToPoint(paramPtr, t, p); err := AEPutParamPtr(theEvent, keyMiscellaneous, typeLongInteger, @p, 4); Bomb(err, 'Couldn’t add point parameter'); END ELSE IF (eventID <> kAEClose) AND (eventID <> kAEPrintWindow) AND (eventID <> kAEPageSetup) THEN BEGIN { pCount = 3 or 4, it’s not one of the parameterless window events, & it isn’t special cased } { A list of file names from the aforementioned folder } { Create aliases by concatenating the folder path to the file name } { Apparently the Finder has a 3K limit on the event that it can receive } { This doesn’t motivate me to extend the Str255 that I use for path names } err := AECreateList(NIL, 0, FALSE, fileList); Bomb(err, 'Couldn’t create file descriptor list'); ZeroToPas(paramPtr, paramPtr^.params[3]^, files); IF length(files) = 0 THEN Bomb(maxInt, 'No file list'); i := 0; WHILE files <> '' DO BEGIN i := i + 1; t := Before(files, ','); IF t = '' THEN BEGIN t := files; files := ''; END ELSE files := After(files, ','); IF RemoteEvent THEN BEGIN s := AliasPath(folderAlias); t := Concat(s, ':', t); err := NewAliasMinimalFromFullPath(length(t), @t[1], '', '', fileAlias); Bomb(err, 'Couldn’t create remote file alias'); END ELSE BEGIN ZeroToPas(paramPtr, paramPtr^.params[2]^, s); { Add the folder path to the item file name } IF (s <> '') AND (eventID <> kAEMove) AND (eventID <> kAEDrag) THEN IF s[length(s)] <> ':' THEN BEGIN IF length(s) + length(t) > 254 THEN Bomb(maxInt, 'A file’s path name is greater than 255 characters'); t := Concat(s, ':', t); END ELSE BEGIN IF length(s) + length(t) > 255 THEN Bomb(maxInt, 'A file’s path name is greater than 255 characters'); t := Concat(s, t); END; err := NewAliasMinimalFromFullPath(length(t), @t[1], '', '', fileAlias); Bomb(err, Concat('Bad filename: ', t)); END; Hlock(handle(fileAlias)); err := AEPutPtr(fileList, i, typeAlias, Ptr(fileAlias^), fileAlias^^.aliasSize); HUnlock(handle(fileAlias)); Bomb(err, 'Couldn’t add file alias to descriptor list'); DisposHandle(handle(fileAlias)); END; IF RemoteEvent THEN DisposHandle(handle(folderAlias)); err := AEPutParamDesc(theEvent, keySelection, fileList); Bomb(err, 'Couldn’t add descriptor list to AppleEvent'); FOR i := i DOWNTO 1 DO BEGIN err := AEDeleteItem(fileList, i); Bomb(err, 'AEDeleteItem'); END; err := AEDisposeDesc(fileList); Bomb(err, 'Failed to dispose of the file list'); IF pCount = 4 THEN BEGIN ZeroToPas(paramPtr, paramPtr^.params[4]^, t); StrToPoint(paramPtr, t, p); err := AEPutParamPtr(theEvent, keyMiscellaneous, typeLongInteger, @p, 4); Bomb(err, 'Couldn’t add point parameter'); END; END; END;err := AESend(theEvent, reply, kAENoReply+kAENeverInteract, kAENormalPriority, kAEDefaultTimeout, NIL, NIL);Bomb(err, 'AESend');err := AEDisposeDesc(theEvent);Bomb(err, 'Couldn’t dispose of the event');err := AEDisposeDesc(reply);Bomb(err, 'Couldn’t dispose of the reply');END; { FinderEvents }END.</text>
</content>
<content>
<layer>card</layer>
<id>27</id>
<text><span class="style1"> lot of people want the Finder to do some real basic things that it just doesnΓÇÖt do right now. This explains a few of the limitations that the Finder operates under.The most notable of these is the desire to get the current Finder selection. You canΓÇÖt. Yes, I know some people do, but they figured out how and know that it will break when the Finder gets changed. They have chosen to do that work and take that risk. You havenΓÇÖt. You want it handed to you. You canΓÇÖt have it that way. If you </span><span class="style10">really</span><span class="style1"> want to know then hop into Macsbug and find out. Save your notes because you will have to do it again when the Finder changes. Hopefully this situation will change when the Finder supports all Apple Events.The Finder does not use the Apple Event Manager. It does everything on the fly using only high level events. This means that common AE things wonΓÇÖt work. You canΓÇÖt patch PACK 8 for example, because the Finder doesnΓÇÖt call it. Ever.The early Registry makes claims to the effect that creating aliases, putting files away, and duplicating files returns a list of the new files. This XCMD doesnΓÇÖt. This is because the Finder doesnΓÇÖt either. Sorry, it lied.Finally, there are probably secret events that the Finder understands, but this XCMD doesnΓÇÖt.</span></text>
</content>
<content>
<layer>card</layer>
<id>30</id>
<text><span class="style2">pecial thanks to:</span><span class="style1">Dennis Gately who managed to find out how the Finder </span><span class="style10">really</span><span class="style1"> works.Frederic Rinaldi who tested this and whose GetSysFolder XFCN I am using.Frank Stanbach for being the FinderEvents scapegoat.Tim Enwall for not getting too upset that I was </span><span class="style10">still</span><span class="style1"> working on this.My beautiful and wonderful wife Cary for letting me hack.All the people who wrote all that other software I used to create this.A bunch of otters in Monterey Bay who did nothing productive.The crowd at DTS for making me feel like a part of the family.C.K. for </span><span class="style10">finally</span><span class="style1"> trying some of this crap himself.Clarus for inspiring ΓÇ£NotSoSirius - The Dogcow StarΓÇ¥.The Lake Tahoe area for being so darned pretty and incredibly steep in places.Lyle Sheldon for keeping Rare BearΓÇÖs title as the worldΓÇÖs fastest propeller driven aircraft.The astronauts of the Atlantis, even though they never did return my email.The Baby Princess for wanting to sit on my lap while I hack.And all the little people who sang those nifty songs in the Wizard of Oz.</span></text>
</content>
<name>Index</name>
<script>on toggleCaveats showOrHideget visible of cd fld "Caveats"if visible of cd fld "Credits" thenput "hide" into showOrHideget trueend ifif showOrHide = "" or (showOrHide = "show" and not it) or (showOrHide = "hide" and it) thenlock screenif the optionKey is down and not it thenput "dissolve" into theEffectshow cd fld "Credits"elseif visible of cd fld "Credits" then put "dissolve" into theEffectelse if it then put "barn door close" into theEffectelse put "barn door open" into theEffectset visible of cd fld "Caveats" to not ithide cd fld "Credits"end ifunlock screen with theEffectend ifend toggleCaveatson closeCardtoggleCaveats "Hide"pass closeCardend closeCardon poopsort by field "Event"repeat with i = 3 to number of cds + 1set cursor to busyif there is not a btn i then doMenu "New Button"set name of btn i to short name of cd i-1set textFont of btn i to Genevaset textSize of btn i to 9set textStyle of btn i to boldset style of btn i to transparentset script of btn i to "on mouseUp" & return & ¬"go cd short name of me" & return & ¬"end mouseUp"set width of btn i to 150set height of btn i to 14set loc of btn i to 512 div 2 + ((i-3) div 9 - 1)*170,175+13*((i-3) mod 9)end repeatchoose browse toolend poopon newButtonsend newButton to Hypercardend newButton</script>