• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Finderpop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Finderpop


  • Subject: Finderpop
  • From: Andy Wylie <email@hidden>
  • Date: Sun, 25 Nov 2001 11:40:23 +1300

on 25/11/01 10:21 AM, Andy Wylie at email@hidden wrote:

> on 25/11/01 3:39 AM, Gnarlodious at email@hidden wrote:
>
>> Entity Andy Wylie spoke thus:
>>> Finderpop script...
>> What is that?
>>
> http://www.finderpop.com/
>
I imagine any Finderpop user would find this useful...
---------------------
property bla1 : "Select the Item you'd like to add Finderpop's menu:"
property bla2 : "Select the Folder you'd like to add Finderpop's menu:"
property bla3 : "Add A File Or Folder to the Menu?"
property bla4 : "Is this name OK? Edit if you wish:"
property bla5 : "\" has been placed in the Finderpop Items Folder and will
appear in "
property butA : {"Edit", " Folder ", " File "}
property butB : {"View heirachy", " Edit Item ", "OK"}
property fpop_items : (("" & (path to system folder)) & "FinderPop Items
Folder")

try
tell application "Finder" to ,
set apz to every process whose frontmost = true
if (count of apz) > 0 then
set thiZapp to (item 1 of apz)
set {apzSig, apzName} to {(creator type of thiZapp & "!!!!"), name
of thiZapp}
else
set {apzSig, apzName} to {"MACS!!!!", "der Finder"}
end if
display dialog bla3 buttons butA default button 2
set the reeZult to the button returned of the result

if the reeZult = "Edit" then
set menuName to ""
editMenuItem(apzSig, apzName, menuName)
else
if the reeZult = " File " then
set newItem to (choose file with prompt bla1)
makeNewItem(newItem, apzSig, apzName)
else
set newItem to (choose folder with prompt bla2)
makeNewItem(newItem, apzSig, apzName)
end if
end if
on error m number n
error {m, n}
end try

on makeNewItem(newItem, apzSig, apzName)
set rawName to (info for newItem)'s name
if length of rawName > 19 then
set menuName to text 1 thru 19 of rawName
else
set menuName to rawName
end if
set menuName to text returned of (display dialog bla4 default answer
"aa)" & menuName & " " & apzSig)
set menuItem to fpop_items & ":" & menuName
tell application "Finder" to ,
make alias to newItem at folder fpop_items with properties
{name:menuName}
set flyBla1 to "An Alias of \"" & {rawName, "\" named \"", menuName,
bla5, apzName, "'s Finderpop Menu."}
display dialog flyBla1 buttons butB default button 3 with icon -20010
set reeZult to the button returned of the result
if reeZult = " Edit Item " then
showMe(menuItem)
else if reeZult = "View heirachy" then
editMenuItem(apzSig, apzName, menuName)
end if
end makeNewItem

on editMenuItem(apzSig, apzName, menuName)
set rawList to list folder alias fpop_items
set apzList to {}
repeat with i in rawList
if ("" & i) contains apzSig then set apzList to (apzList & i)
end repeat
set flyBla2 to "Edit which of " & apzName & "'s Menu Aliases?"
set newItem to choose from list apzList default items menuName with
prompt flyBla2 OK button name "Edit"
if result = false then return
if character -1 of ("" & newItem) is not ":" then
set menuItem to fpop_items & ":" & newItem
else
set menuItem to fpop_items & newItem
end if
showMe(menuItem)
end editMenuItem

to showMe(menuItem)
tell application "Finder" to (reveal alias menuItem) activate
end showMe

_____________________________ Andy


References: 
 >Re: Scripting Date and Time Control Panel (From: Andy Wylie <email@hidden>)

  • Prev by Date: Re: Scripting Date and Time Control Panel
  • Next by Date: RA OSAX error: missing file
  • Previous by thread: Re: Scripting Date and Time Control Panel
  • Next by thread: RA OSAX error: missing file
  • Index(es):
    • Date
    • Thread