Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How to Show Info Panel from AppleScript

How to Show Info Panel from AppleScript
Thread Tools
Grizzled Veteran
Join Date: Dec 2000
Location: Málaga, Spain, Europe, Earth, Solar System
Status: Offline
Reply With Quote
Feb 1, 2002, 06:33 PM
 
This one is easy, but I cannot figure it alone.

How do I make the Finder show the "Show Info" panel from AppleScript?

I know it is a little useless but I wanted to write a script that showed it up and put it in the Finder toolbar.

Thanks,
     
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
Feb 1, 2002, 08:42 PM
 
Originally posted by eevyl:
<STRONG>This one is easy, but I cannot figure it alone.

How do I make the Finder show the "Show Info" panel from AppleScript?

I know it is a little useless but I wanted to write a script that showed it up and put it in the Finder toolbar.

Thanks,</STRONG>
AppleScript is not a macro language. You can't just access a menu or do a key command. :/
     
eevyl  (op)
Grizzled Veteran
Join Date: Dec 2000
Location: Málaga, Spain, Europe, Earth, Solar System
Status: Offline
Reply With Quote
Feb 2, 2002, 04:11 AM
 
I know, but it may be a workaround or a class method or call I am missing.

Emtpying the trash is also a menu and it can be invoked from AppleScript
     
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
Feb 2, 2002, 11:10 AM
 
Originally posted by eevyl:
<STRONG>I know, but it may be a workaround or a class method or call I am missing.

Emtpying the trash is also a menu and it can be invoked from AppleScript </STRONG>
I sure hope you are rolling your eyes at the irony of it.. not at me.. I'm just trying to help

Anyways, Apple chose to include a command for emptying the trash, they aren't just letting you access the Empty Trash command, they are letting you empty the trash directly. So there is a difference. The fact that there is a menu and a command is simply coincidental. I suppose Apple didn't figure many people would need to have a show info type command.

I have a pretty lame work around that really doesn't do what you want but basically displays the data you want...

tell application "Finder"
set theSelection to item 1 of (selection as list)
tell me to display dialog "Name: " & name of theSelection & return & "Modification date: " & modification date of theSelection & return & "Creator type: " & creator type of theSelection buttons {"Radical!"} default button 1
end tell


You can add more info as needed.
     
eevyl  (op)
Grizzled Veteran
Join Date: Dec 2000
Location: Málaga, Spain, Europe, Earth, Solar System
Status: Offline
Reply With Quote
Feb 2, 2002, 05:01 PM
 
I already knew that workaround, but thanks anyway Synotic.

One of the things I want to use the info panel is for calculating the size of the selected items. As the info panel do this all alone, I was searching for a way to invoke it directly.

I also do not want a dialog, because it has to be dismissed to continue to use the Finder, I want the behaviour of the info panel, always there and switching info as you select items.

Mmm, I think I will try to write a script to calculate the size of the selected items. It seems easier than showing the info panel, but that sounds a little weird. The show info could be a Finder Toolbar button...

Thanks again for the help Synotic
     
Fresh-Faced Recruit
Join Date: Feb 2002
Location: Germany
Status: Offline
Reply With Quote
Feb 2, 2002, 07:32 PM
 
Hi eevyl,

is this what you want?

set oneFile to choose file

tell application "Finder"
activate
open information window of oneFile
end tell

[ 02-02-2002: Message edited by: Fischer-Bayern ]
best regards
Peter
     
eevyl  (op)
Grizzled Veteran
Join Date: Dec 2000
Location: Málaga, Spain, Europe, Earth, Solar System
Status: Offline
Reply With Quote
Feb 2, 2002, 08:20 PM
 
Ten points over ten to Fischer-Bayern!!!

Thanks!
     
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
Feb 3, 2002, 12:57 AM
 
Originally posted by eevyl:
<STRONG>Ten points over ten to Fischer-Bayern!!!

Thanks!</STRONG>
Okay thanks for making an idiot out of me I figured it was a command, not a property of a finder item.
Oh well, it is good to know anyways

[ 02-03-2002: Message edited by: Synotic ]
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:37 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2