|
iTunes Utilities:
General Notes/Warnings:
Written under OS 9.x & AppleScript v1.6; compatible with
iTunes 2.0x (may or may not be compatible with other
versions of iTunes or the Apple OS or other versions of
AppleScript).
All files listed are Mac binhex (.hqx) archeives
and require stuff-it expander (free!) to open. To
download Stuff-It Expander for free, please visit Aladdin
System's Expander Page (or try:
http://www.stuffit.com/expander/ )
• iTunes script: Enter_New_Artists-each_song.hqx
This script steps the user through entering new artist
names for each track on the CD in order -- it was
designed for situations where the artists are simply
listed as "various artists" or "unknown" and you have the actual
artist name available. When run, it brings up a dialog
box with the song title, the track number and in a dialog box,
the current contents of the artist field (which can be
over-written), along with three buttons: cancel (the
process), skip (to the next song without making a
change), and OK (accept new entry).
Note: Effects only current Audio CD in the computer.
• iTunes script: Enter_Artist-all_songs.hqx
This script steps allows the user to change the artist entry
for every song on the CD to a single new entry via a dialog box.
Unlike the script above (Enter_New_Artists-each_song.hqx), it does not
step through each song, but only asks once and the replaces all
the Artist entries for the current audio CD.
Note: Effects only current Audio CD in the computer.
• iTunes script: Change_Album_Name.hqx
Asks the user for a new album name via a dialog box,
then renames the Album entry for all the songs on the
currently installed CD. Does not directly affect any
entries the library, except in that the newly edited
Album name will be retained if the songs are imported
after using this script.
Note: Effects only current Audio CD in the computer.
• iTunes script: Reset_Genre_for_Album.hqx
Asks the user for a new Genre via a dialog
box, then renames the Genre entry for all the songs on
the currently installed CD. Does not directly affect any
entries the library, except in that the newly edited
Genre name will be retained if the songs are imported
after using this script.
Note: Effects only current Audio CD in the computer.
• iTunes script: Get_Artist_from_SongTitle.hqx
Sometimes entries retrieved from the CDDB (cd database,
where iTunes pulls the song & album names) are
co-mingled, with the artist name appearing along with
the song title in the Song field (and either the album
name or 'various' appearing in the Artist field). This
script is designed to correct those kind of entries for
the current audio CD in the machine (does not alter
already existing library entries). It prompts the user
to tell it (via a dialog box) whether the artist's name
is first or last -- before the song title or after it;
then it prompts the user to tell it (via another dialog
box) what the delimiter is that sets the song title and
artist apart, such as a slash, a parenthesis, or dash.
Using this information, it cycles through each song
title and looks for the delimiter -- when it finds it,
it uses it to separate the artist's name out of the song
title and moves it to the Artist name field, plus puts
the corrected Song title into the Song field.
It also looks for closing parenthesis as a closing
delimiter and deletes it (if found) on entries using the
open parenthesis as their delimiter, and it cleans house
a bit by deleting blank spaces at the beginnning and end
of both the artist name and the song title if the name &
title were co-mingled.
Note: Effects only current Audio CD in the computer.
• iTunes script: Remove_Artist_from_Songs.hqx
Does the same as the previous script, but it deletes the
Artist name from the song field rather than reassigning it
to the Artist field. &bnsp;
Sometimes entries retrieved from the CDDB (cd database,
where iTunes pulls the song & album names) are comingled,
with the artist name appearing along with the song title in
the Song field (as well as appearing in the Artist field).
This script is designed to correct those kind of entries
for the current CD in the machine (not for already existing
library entries). It prompts the user to tell it (via a
dialog box) whether the artist's name is first or last --
before the song title or after it; then it prompts the user
to tell it (via another dialog box) what the delimiter is
that sets the song title and artist apart, such as a slash,
a parenthesis, or dash. Using this information, it cycles
through each song title and looks for the delimiter -- when
it finds it, it uses it to separate the artist's name out
of the song title and remove it, then puts the corrected
Song title (sans the artist name) back into the Song field.
Note: Effects only current Audio CD in the computer.
• iTunes script: Remove_start&end_spaces.hqx
This goes through each song on the current CD in the
machine (but not the main library) and finds and removes
opening spaces and trailing spaces in the song title and
artist name fields. Only deletes spaces (does not alter
field if no beginning or trailing space is found), and only
deletes a single space each pass.
Note: Effects only current Audio CD in the computer.
• iTunes script: Sample-get_sample_data.hqx
This script changes no information within iTunes, but is
designed to illustrate to new iTunes scripters how to
access various iTunes song data within the main library,
including features not documented by the iTunes help
file and/or user interface (such as comment fields, and
the ability to adjust the volume for each individual
song entry). It opens the library, then steps through
various data, displaying dialog boxes of what it
returns. The script is well commented and shows some
important notes, such as how the database references
individual songs internally.
Note: Does not make any changes to iTunes, only demonstrates how to access certain library song data.
File Renaming Utilities:
General
Notes/Warnings:
Written under OS 8.6 through 9.2.2 under AppleScript
v1.3 through 1.6 (may or may not be compatible with
other versions of AppleScript or the Apple OS).
Note that most or all of the file renaming scripts
require Jon's Commands, an AppleScript Addition, which
is available for free (for non-commercial usage) at Jon Pugh's Home
Page. Sidenote: this is the most useful addition I have
ever stumbled across for any scripter -- thanx Jon!
All files listed are Mac binhex (.hqx) archeives and
require stuff-it expander (free!) to open. To download
Stuff-It Expander for free, please visit Aladdin
System's Expander Page (or try:
http://www.stuffit.com/expander/ )
• Recursive_Renamer_v1.21.hqx
The grand renamer, ultimately capable, ideal for anyone who
needs to rename thousands of files in a single pass. This script is
rather complex, but very well commented, if you want to follow
along with what is happening as an advanced programming example. One
of the core techniques that it uses is recursion -- the calling of a
handler (called a subroutine in most programming languages) by same handler,
thus spawning another copy of itself.
RELEASE NOTES: Recursive_Renamer_v1.21: File Renamer with recursion through handlers
WHAT IT DOES:
Takes a target folder selected by the user, AND grabs all
the files in that folder, as well as the folder's name, AND
renames all the files to a temporary name (semi-randomly
generated), AND then renames them again to the name of the
folder, plus the file count, plus a suffix. Whenever it
stumbles across a folder within the target folder, it
spawns the same process over again, renaming everything
within that folder using that folder's name, file count and
suffix.
THREE SAFETY CHECKS:
- Checks each folder for the presence of
a system file or the name system folder, and stops if it
encounters one (generates a message to the user);
- Checks each folder to see if the
maximum number of files permitted under the HFS filing
system has been exceeded, stops if it has (generates a
message to the user);
- Checks each folder name to see if it
will exceed the filename length limit, and if it will
truncates the filename with an ellipse (...) before the index
count.
WHISTLES AND BELLS:
- Tracks how long it takes to complete the process and
how many files & folders it processed, then displays this
information at the end of the run, OR...
- Tests for an option press right at the beginning of the
script; if the user is holding down the option key, the
script will tell the finder to shutdown when it finishes
the renaming process (rather than displaying the statistics
on files/folders/time; useful if you want to start the
renaming and walk away for the night).
REQUIRES:
- Jon's Commands, an AppleScript Addition, available for free (for non-commercial usage)
from:
http://www.seanet.com/~jonpugh/
Jon's Commands must be installed and the system restarted before
this script will work (required for the actual file rename
command, as well as to catch the option key at the start).
REVISION HISTORY
- 2 June 2002 - v1.2 - rewrote ZeroPadding Handler to execute significantly quicker (reduced calls to
NumberOfCharsInChount to 1 call from 2 calls, removed a loop).
- 20 May 2002 - v1.1 - added test for option key if present, shut down computer after completion.
- Other mods (pre version 1):
- Fixed: redundent file renaming error (by changing the file names to a temp name, then to the new name);
- Fixed: nested folders now get renamed as well based on their own folder name;
- Fixed: situations where the folder name length would generate too long a filename; automatically parses it down to a useful length;
- Fixed: examines folder about to be renamed and verifies folder is skipped if contains or is System Folder (as handler), and informs the user.
NOTES: Requires Jon's Commands, an AppleScript Addition,
to work; available for free (non-commerical usage) from: Jon Pugh's Home
Page.
• Add_Suffix_to_files.hqx
This script will add a suffix to all the
files names within a folder. Note that this is a very
rudimentary script, good for beginners to look at, but
does not deal with such issues as folders within the
specified folder, nor with cases where the file name
after adding the suffix will suddenly be too long (and
thus generate an error). Good for quickly adding .jpg or
.txt to a bunch of files you want to email to a WinDoze
users...
Note: If user responds with
blank entry, all files will have .txt added to their
endings.
NOTES: Requires Jon's Commands, an AppleScript Addition,
to work; available for free (non-commerical usage) from: Jon Pugh's Home
Page.
• Direct_Renamer_v0.9.hqx
A very quick, clean way to rename everything within a
folder to your choice of name and suffix, along with a
count #. I.e. - rename everything in this folder to
CyberPoet###.gif would result in CyberPoet001.gif,
CyberPoet002.gif, etc).
This simple script will prompt the user for a name to use
for the files within a folder (via a dialog box), as well
as for a suffix (via another dialog box), and then proceed
to rename each file within the folder using the prefix
(filename) given, a file index count (starting at 1), and
the suffix. Note that this is a very rudimentary script,
good for beginners to look at, and does not deal with such
issues as folders within the specified folder; however, it
does deal with situations where the resulting filename will
exceed the 32 character limit from Apple under OS 8.6 - 9.x
by generating an error message.
NOTES: Requires Jon's Commands, an AppleScript Addition,
to work; available for free (non-commerical usage) from: Jon Pugh's Home
Page.
NowContact v4.2.x & FaxSTF X for OS X:
General
Notes/Warnings:
All files listed are Mac binhex (.hqx) archeives
and require stuff-it expander (free!) to open. To
download Stuff-It Expander for free, please visit Aladdin
System's Expander Page (or try:
http://www.stuffit.com/expander/ )
• NowContact to Address Book Utility (Application/ReadMe)
Duplicates every entry in NowContact version 4.2.x (idealized for 4.2.5)
to Apple Address Book v3.0.x (idealized for v3.0.1). Requires OS X v10.2.x
as of this writing. Consists of a RTF-formatted Read Me file and an Application
that was written in AppleScript 1.9 (166Kb download). Contact me for the source
code if desired (thecyberpoet@cyberpoet.net).
MISCELLANEOUS Utilities:
General
Notes/Warnings:
All files listed are Mac binhex (.hqx) archeives
and require stuff-it expander (free!) to open. To
download Stuff-It Expander for free, please visit Aladdin
System's Expander Page (or try:
http://www.stuffit.com/expander/ )
• Do_The_Count(script).hqx
Prompts user with a file dialog box to point it at a folder
or hard drive partion, then recursively counts the number
of files and folders contained within an user-specified
folder/drive and displays that information...
• Generate_ASCII_from_Char.hqx
The simplest AppleScript ever -- asks the user to type
in a character (if you type in more than one, it only
takes the first character of whatever you type in) and
then generates the ASCII code for that character which
is displayed in a second dialog box. Useful for quickly
determining the ASCII code for any character you can
type. Total of 4 lines.
• Convert_Spaces_2_Underscore.hqx
Some file servers don't handle spaces in file names real
well; this script takes the files within a folder and
replaces all the spaces in the filenames with
underscores instead. E.G,: This File Is
Here. becomes This_File_Is_Here.
NOTES: Requires Jon's Commands, an AppleScript Addition,
to work; available for free (non-commerical usage) from: Jon Pugh's Home
Page.
• Wind_Chill.AppleScript_1.6.hqx
This nifty little script was written for an aquaintance
who wanted to be able to quickly generate the wind chill
factor. Prompts user for current temp, and current wind
speed, does a little range checking to validate the
data, then generates responses for the wind chill factor
using the American standard Wind Chill formula (from
NOAA), and recalculates it for the Canadian standard
(from Environment Canada) and displays that.
• Handler_SearchNReplace
This handler (if you don't know what handlers are, please visit my applescript
primer page) takes three parameters passed in (text to be searched, text to
find within the main text, and text to substitute it with). Simple, modular
search & replace.
NOTES: This script is 'exact' search specific. If you tell it to find three
returns in a row and replace them with a space, when it encounters five
returns, it will change the first three of the five into a space and retain
the two returns (rather than replacing all 5).
• SuperPrivacy v5c2 for OS X/Jaguar & Tiger (application)
Copyright 1996 - 2005, All Rights Reserved.
This application is the latest OS X specific update to an extensive 'cleaner' script whose purpose is
to scavage off cache files and temp files of various kinds from the following browsers: AOL for OS X, Netscape Communicator for OS X (v7.0.x),
MS InterNet Explorer for OS X (v 5.x), and Apple's Safari Browser, FireFox (1.0 - 1.03), iTunes
temp and scrap files, and RealMedia cookies.
NOTES: This version is a stand-alone OS X application and is suitable for non-programmers, such
as consulting clients and general users. It requires nothing other than what ships with the operating
system and can not be modified as is. Your browser may not be set up to download ".app" files, in which
case you will want to add the extension to your browser's preferences (with instructions to download to
disk). Only one bit of instruction: quit your browser(s) before running, or you will get an error message
that the trash can not be emptied. If you need the script version, it is the next item...
• SuperPrivacy v5c2 for OS X/Jaguar & Tiger (script version)
Copyright 1996 - 2005, All Rights Reserved.
This applescript is the latest OS X specific update to an extensive 'cleaner'
script whose purpose is to scavage off cache files and temp files of various
kinds from the following browsers: AOL for OS X, Netscape Communicator for OS X
(v7.0.x), MS InterNet Explorer for OS X (v 5.x), and Apple's Safari Browser,
FireFox (1.0 - 1.03), iTunes temp and scrap files, and RealMedia cookies.
NOTES: This version is a applescript script and is suitable for applescript programmers who want to follow
the actual operational logic and/or customize the process for themselves. Your browser may not be set up to download ".scpt" files, in which
case you will want to add the extension to your browser's preferences (with instructions to download to
disk). Only one bit of instruction: quit your browser(s) before running, or you will get an error message
that the trash can not be emptied (applies to all browsers except Safari).
• SuperPrivacy v5A1 (5.1) for OS X/Jaguar (Application)
• same as above, sans .app extension
Copyright 1996 - 2004, All Rights Reserved.
This application is an OS X specific update to an extensive 'cleaner' script whose purpose is
to scavage off cache files and temp files of various
kinds from the following browsers: AOL for OS X, Netscape Communicator for OS X (v7.0.x, v6.x),
MS InterNet Explorer for OS X (v 5.x), Apple's Safari Browser (GM and versions 1 through 1.0.3),
FireFix (v1.0), as well as iTunes Temp Files and Sherlock Temp Files. Note current version is 5C2, and
is listed separately...
NOTES: This version is a compiled script application and is suitable
specifically for AppleScript programmers -- to glean how
such things are accomplished; it is not intended for
typical consulting clients and general users. This script
does not require any OSAXEN, but does require OS X's
ScriptEditor (v1.8.1 or later). Your browser may not be set
up to download ".scpt" files, in which case you will want
to add the extension to your browser's preferences (with
instructions to download to disk). Only one bit of
instruction: quit your browser(s) before running, or you
may get an error message that the trash can not be
emptied (applies specifically to Explorer & FireFox browsers -- Safari doesn't
generate this error).
• SuperPrivacy v5A1 (5.1) for OS X/Jaguar (Script)
Copyright 1996 - 2004, All Rights Reserved.
This script is an OS X specific update to an extensive 'cleaner' script whose purpose is
to scavage off cache files and temp files of various
kinds from the following browsers: AOL for OS X, Netscape Communicator for OS X (v7.0.x, v6.x),
MS InterNet Explorer for OS X (v 5.x), Apple's Safari Browser (GM and versions 1 through 1.0.3),
FireFix (v1.0), as well as iTunes Temp Files and Sherlock Temp Files. Note current version is 5C2, and
is listed separately...
NOTES: This version is a stand-alone OS X application and is suitable for non-programmers, such
as consulting clients and general users. It requires nothing other than what ships with the operating
system and can not be modified as is. Your browser may not be set up to download ".app" or ".scpt" files, in which
case you will want to add the extension to your browser's preferences (with instructions to download to
disk). Only one bit of instruction: quit your browser(s) before running, or you will get an error message
that the trash can not be emptied.
• SuperPrivacy v5.02 for OS X/Jaguar (Application)
Copyright 1996 - 2003, All Rights Reserved.
This application is an OS X specific update to an extensive 'cleaner' script whose purpose is
to scavage off cache files and temp files of various
kinds from the following browsers: AOL for OS X, Netscape Communicator for OS X (v7.0.x),
MS InterNet Explorer for OS X (v 5.x), and Apple's Safari Browser. Note current version is 5C2, and
is listed separately...
NOTES: This version is a stand-alone OS X application and is suitable for non-programmers, such
as consulting clients and general users. It requires nothing other than what ships with the operating
system and can not be modified as is. Your browser may not be set up to download ".app" files, in which
case you will want to add the extension to your browser's preferences (with instructions to download to
disk). Only one bit of instruction: quit your browser(s) before running, or you will get an error message
that the trash can not be emptied.
• SuperPrivacy v5.02 for OS X/Jaguar (Script)
Copyright 1996 - 2003, All Rights Reserved.
This is the compiled script of the above application. It is
an OS X specific update to an extensive 'cleaner' script
whose purpose is to scavage off cache files and temp files
of various kinds from the following browsers: AOL for OS X,
Netscape Communicator for OS X (v7.0.x), MS InterNet
Explorer for OS X (v 5.x), and Apple's Safari Browser.
Because it is a script, all the code can be read and
modified. Please do not redistribute this file without
permission; we request that if you want to distribute
SuperPrivacy v5 and later, that you link directly to the
applicable page on our website (we want traffic!). Note current version is 5C2, and
is listed separately...
NOTES: This version is a compilable script and is suitable
specifically for AppleScript programmers -- to glean how
such things are accomplished; it is not intended for
typical consulting clients and general users. This script
does not require any OSAXEN, but does require OS X's
ScriptEditor (v1.8.1 or later). Your browser may not be set
up to download ".scpt" files, in which case you will want
to add the extension to your browser's preferences (with
instructions to download to disk). Only one bit of
instruction: quit your browser(s) before running, or you
will get an error message that the trash can not be
emptied.
• Super_Privacy_v4.92.hqx
Copyright 1996 - 2002, All Rights Reserved.
This is an extensive OS 9.x 'cleaner' script whose purpose is
to scavage off cache files and temp files of various
kinds from the following programs: AOL versions 2.x
through 5.0x, Netscape 2.x - 4.7x, Netscape 6.0x, MS
InterNet Explorer 2.x - 3.x and 5.x, and MRJ (Macintosh
Runtime Java - temp caches). As newer broswers become
available, I update this file for any browser that I
have installed.
The script locates the system folder, verifies that the
appropriate folders exist within it for each program,
then move the cache, history and cookie files to the
trash. After moving all the files it finds of those
types to the trash, it empties the trash (caution:
including anything else that might be in the
trash).
SPECIAL FEATURE: If you hold down the option key when
you first run this script (until you hear a beep), it
will move the files to the trash, but skip emptying the
trash, so you can examine the files that were
moved.
WORKS WITH: Tested with Mac OS 7.6.1 - 9.2.2 under
AppleScript versions 1.0 through 1.6.x. This script is not
compatible with AppleScript version 1.7 (due to changes
in the way file are referenced in version 1.7 -- a bug
in my opinion), and probably is NOT compatible with OS X
(be warned). Has not been tested with 1.8.x, but should
work based on field reports.
REQUIRES: Requires Jon's Commands, an AppleScript
Addition, to work; available for free (non-commerical
usage) from: Jon Pugh's Home
Page.
ALSO REQUIRES: the editing of two lines of code to
support your particular installation of NetScape 6.x (if
you have this browser installed -- if not, you need not
change anything). Before editing, please read the
Description (header) of the file in your script editor
(the places to make the changes are clearly noted both
there and within the code).
UPDATES: As you can tell by the version number, I update
this script fairly regularly. One of these days I will
get around to making it search for NetScape 6.x's custom
named folders on it's own, but haven't yet (check back
in a couple months). I'll also make the move to OS X as
my default operating system (I'm not there yet because I
have too much software that is mission critical that
doesn't like OS X).
RECOMMENDED USAGE: I have turned this file into a
stand-alone application (the version listed here is still
editable), and have slipped it into the start-up items
folder of the system folder. Each time the system starts
up or restarts, it clears all the cache files, which is
a God-send in terms of stability and privacy.
SPECIAL NOTE (A): Requires Jon's Commands, an
AppleScript Addition, to work; available for free
(non-commerical usage) from: Jon Pugh's Home
Page.
SPECIAL NOTE (B): Many web sites permit you to retain
your User ID and/or Password so you don't have to enter
them again (examples: ebay, paypal, fed ex, etc). When
they do this, these sites save that information into your
browser's cookie file(s). Super Privacy (this script) will delete
those same files, so do NOT use if you do not have
these user id's and passwords saved elsewhere! [if you
don't have them saved elsewhere, start doing it now,
because sooner or later your cookie file(s) will become
corrupt and you'll end up throwing them away anyway].
|