Ask a Question related to Mac Applications & Software, Design and Development.
-
Martin Crisp #1
Re: Finder macros in OSX
On Sat, 12 Jul 2003 14:26:04 +1000, heron stone wrote
(in message
<heronstone-9F4049.21260411072003@news-central.giganews.com>):
Presumably you want the user to do this before running the script> I want to automate a simple finder procedure that I do several times
> almost every day and a friend tells me that Apple Script won't do it.
>
> Here's what I want to do...
>
> in the finder
>
> select several files in a folder
[IMNSHO a script should _never_ change the Finder selection, unless
that is part of the main function of the script - e.g. 'reveal this
item to the user']
If not then you could put a 'choose files' dialog in the script
below...
You only need to do this if you want to see what's there. The> Get Info
script doesn't need to. [Applescript isn't a 'macro' language, UI
manipulation should be seen as an 'approach of last resort']
Same as above comment.> expand Names & Extension panel
>
> check the Hide extension box
>
> close the Get Info window
set theItems to {}> This seems like such a simple thing but I've been unable to get
> Apple Script to do it.
>
> How can I do this?
tell application "Finder"
set theItems to selection
repeat with i in theItems
set extension hidden of i to true
end repeat
end tell
You might want to tell the finder to 'update' the enclosing folder
after the repeat loop finishes.
No.> Do I need a 3rd-party app?
Have Fun
Martin
Martin Crisp Guest
-
Macros in Illustrator?
Is it possible to record a text box in a macro and/or action? I read through the action help file, but had a hard time understanding it. I want to... -
macros
has anyone given any thought to having macros in ruby? perhaps there's another way to do what i want, but i'm not sure. i keep reusing the same... -
macros in Photoshop?
I have a Mavica camera that stores photos on floppies. I have to resize each photo to place them on one 8 x 10 sheet. Is there any way to memorize... -
[PHP-DEV] userland macros
Is possible to implement userland macros in a PHP extension or it can only be implemented in the core? I know that macros is a preprocessor task... -
macros in perl
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, I'm new to perl. How it's possible to write macros in perl? C-like macros would be... -
Jerry Kindall #2
Re: Finder macros in OSX
In article
<heronstone-9F4049.21260411072003@news-central.giganews.com>, heron
stone <heronstone@attbi.com> wrote:
Files have a property called "extension hidden" that can be set to true> I want to automate a simple finder procedure that I do several times
> almost every day and a friend tells me that Apple Script won't do it.
>
> Here's what I want to do...
>
> in the finder
>
> select several files in a folder
>
> Get Info
>
> expand Names & Extension panel
>
> check the Hide extension box
>
> close the Get Info window
>
> This seems like such a simple thing but I've been unable to get
> Apple Script to do it.
>
> How can I do this?
> Do I need a 3rd-party app?
or false. Driving the interface is the long and hard (and, in an
application as scriptable as the Finder, basically wrong) way to do it.
Assuming you want your script to operate on the current selection, you
could just write something like this:
tell application "Finder"
set s to the selection
repeat with i in s
set i's extension hidden to true
end repeat
end tell
--
Jerry Kindall, Seattle, WA <http://www.jerrykindall.com/>
When replying by e-mail, use plain text ONLY to make sure I read it.
Due to spam and viruses, I filter all mail with HTML or attachments.
Jerry Kindall Guest
-
heron stone #3
Re: Finder macros in OSX
Two very helpful replies... thanks
The problem is that I don't know what to do with the script
that i created with script editor.
There must be a better way of running it than opening it in
the editor and selecting RUN.
Is there a way to activate it from a contextual menu.
I've seen that some apps have a SCRIPT menu item, but i don't
see that in the finder.
What's the easiest way to invoke the new script
thanks
heron
--
Nature, heron stone
to be commanded, [email]heronstone@attbi.com[/email]
must be obeyed. [url]http://home.attbi.com/~heronstone/[/url]
heron stone Guest
-
Jerry Kindall #4
Re: Finder macros in OSX
In article
<heronstone-5CE692.22195712072003@news-central.giganews.com>, heron
stone <heronstone@attbi.com> wrote:
Add a script menu to your menu bar.> Two very helpful replies... thanks
>
> The problem is that I don't know what to do with the script
> that i created with script editor.
>
> There must be a better way of running it than opening it in
> the editor and selecting RUN.
>
> Is there a way to activate it from a contextual menu.
>
> I've seen that some apps have a SCRIPT menu item, but i don't
> see that in the finder.
>
> What's the easiest way to invoke the new script
/Applications/AppleScript/Script Menu.menu
Read more about it here: [url]http://www.apple.com/applescript/script_menu/[/url]
--
Jerry Kindall, Seattle, WA <http://www.jerrykindall.com/>
When replying by e-mail, use plain text ONLY to make sure I read it.
Due to spam and viruses, I filter all mail with HTML or attachments.
Jerry Kindall Guest
-
heron stone #5
Re: Finder macros in OSX
> > What's the easiest way to invoke the new script
>
> Add a script menu to your menu bar.
>
> /Applications/AppleScript/Script Menu.menu
>
> Read more about it here: [url]http://www.apple.com/applescript/script_menu/[/url]
that is soooo cool
thank you
heron
--
Nature, heron stone
to be commanded, [email]heronstone@attbi.com[/email]
must be obeyed. [url]http://home.attbi.com/~heronstone/[/url]
heron stone Guest
-
heron stone #6
Re: Finder macros in OSX
Hey Jerry and Martin, thanks you for helping me with Apple Script.
You guys were so nice that i figured that i'd prevail upoon you
again to go a little further into this.
Hiding the extension is only the last of several parts of this
procedure and it became clear to me after seeing the script you
guys provided that the whole process lends itself to automation.
So maybe one of you would be kind enough to show me a script that
would do the whole thing.
Here's what i have been doing...
I'm moving WAV files off my handheld onto my Mac and archiving them.
All the files from a day are trasnsferred into a folder labelled with
today's date (in lunar calendar format).
They are named in the handheld thusly... 030715000.WAV, 001.WAV,
002.WAV, etc. (year, month, day and 3-digit index)
So i drag these files into a folder named 218.17 (corresponding to
030715)
I use A Better Finder Rename to create a numbered list of 3 digits.
eg. 001.WAV, 002.WAV, etc.
Then i again use ABFR to add the date to the beginning resulting in
files named 218.17.001.WAV, 218.17.002.WAV, etc.
Finally, i hide the extension.
The main points:
1. rename files as 3-digit numbered list
2. add the name of the folder in which they reside (plus a period)
to the beginning of every file resulting in 218.17.001.WAV
3. hide extension (which you have already kindly provided)
And finally, can you direct me to learning resources for Apple Script?
Are there tutorials available, urls, etc.?
Any help will be much appreciated.
thanks
heron
--
Nature, heron stone
to be commanded, [email]heronstone@attbi.com[/email]
must be obeyed. [url]http://home.attbi.com/~heronstone/[/url]
heron stone Guest



Reply With Quote

