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 > Applescript Question

Applescript Question
Thread Tools
dave007
Guest
Status:
Reply With Quote
Dec 1, 2000, 10:35 AM
 
I was wondering if there is an Applescript I can use to make all my folders viewable as lists. If anyone knows about one could you please tell me or if you know how to make it, could you either e-mail or post it for me here. Thanks.

dave007
     
Blobby
Guest
Status:
Reply With Quote
Dec 1, 2000, 03:08 PM
 
--here yer go, save as applet
on open theList
my SetView(theList)
end open

on SetView(theViewList)
tell application "Finder"
try
repeat with theItem in theViewList
if the kind of theItem is "folder" then
open theItem
set view of theItem to name
set shows modification date of theItem to false
set shows creation date of theItem to false
set shows size of theItem to false
set shows kind of theItem to false
set shows label of theItem to false
set shows comments of theItem to false
set shows version of theItem to false
set zoomed of container window of theItem to true
close theItem
set theFolderContents to the contents of theItem
my SetView(theFolderContents)
end if
end repeat
on error errMsg number errNum
end try
end tell
end SetView
     
dave007
Guest
Status:
Reply With Quote
Dec 1, 2000, 05:14 PM
 
Thanks for the prompt reply.

When you say, "save as applet", I am assuming that means application. When I went to save it it gave me the following options: Save As... and Save As Run-Only. Under Save As... it had these choices: Application (with 2 check boxes named Stay Open and Never Show Startup Screen), Compiled Script and Text. Under the Save As Run Only... it gave the same options with the exception of Text. Which do I save it as?

Also, to run it do I just double click or is their something fancy I need to do. Sorry I am dumb on this AppleScript stuff. It was suggested to me that it could do what I wanted it to and that I should ask for help on this forum.

Thanks again,

dave007
     
Junior Member
Join Date: Oct 1999
Location: Edmonton, Alberta, Canada
Status: Offline
Reply With Quote
Dec 1, 2000, 06:34 PM
 
> When I went to save it it gave me the following options: Save As...
> and Save As Run-Only. Under Save As... it had these choices:
> Application (with 2 check boxes named Stay Open and Never Show
> Startup Screen), Compiled Script and Text. Under the Save As Run
> Only... it gave the same options with the exception of Text. Which do
> I save it as?

the options you saw were:

Save As Run Only

Saves your Applescript as a "run only" application,
meaning that you won't be able to "edit" the appl/escript
code later if you so need to, this option is use ful, for say
sending your scripts around, and feel confident that no one
will be able to "modify" your script, how ever that meens that
youyour self in the future, will not be able to edit the script again,
in thiscase I keep a copy of the script as "source code"
(a compiled script, or as text)


Never Show Startup Screen

the Startup screen, is a a dialog box presented to the user
that opened the script "applet", usually tells the user what the
script will do, and gives the user the option to run the script or
quit the script, with out the script doing anything

to create the startup screen, Add comments in the "description"
area of the script window, in Apple's Script Editor. any text placed
in this description "box" will be displayed in the startup screen.

Stay Open

The Stay Open option is use ful for "server applets" or soultions
where one needs the script applet to be constantly running,
a example of this would be a "egg timer"


Compiled Script

This Saves the Script as source code that is essence has been
checked for errors, and is ready to be run, or useful for applications
that can run applescripts (OSA Menu, Outlook Express, Ircle ...)

Text

This saves the script as text, the script cannot be used in applications (OSA Menu, Outlook Express, Ircle ...) is is useful if you
are working on a script, but need to quit, but want to save your work,
and come back to it later, or perhaps your applescript wont compile
as a "compiled Script" due to some syntax error, or because your script is incomplete


> Also, to run it do I just double click or is their something fancy I need
> to do.

an this script contains a "on open" line ( what's called a handler)

the script will work like a "droplet", ie, you would drag and drop the folders that you want to have viewed as lists on to the script icon

> It was suggested to me that it could do what I wanted it to
> and that I should ask for help on this forum.


hope this helps
Matt


------------------
-- An idea is salvation by imagination.
-- Frank Lloyd Wright
-- 30 --
-- An idea is salvation by imagination.
-- Frank Lloyd Wright
-- 30 --
     
   
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 11:04 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