At 8:17 am -0800 7/11/02, Matthew Galaher wrote:
The following example was graciously posted to this list in answer to my request for help getting started with DropScript on 10.2 I writing to the list again because after following these instructions on three different machines I've found that while it creates a droplet, when the droplet is used it launches and crashes....It was I that posted the example and have never had any such trouble. I can only guess that you have not saved a valid file. Create the file with this AppleScript script and drop it on DropScript. Then let us know if it works.
Save this text in BBEdit with UNIX line breaks as"_numbered_list.pl" ____________________ #!/usr/bin/perl $report = 'report.txt' ; open REPORT, ">$report" ; for (@ARGV) { ++$i ; print REPORT "$i. $_\n"; } `open $report` ; # shell command Drop the file on Dropscript and an applet named "Drop_numbered_list" will be created. You can change the name to whatever you want. If you now drop a handful of files on "Drop_numbered_list", a report will open giving a numbered list of the paths to the dropped files.
set f to "" & (path to current user folder) & "numbered_list.pl"
set s to "
#!/usr/bin/perl
$report = 'report.txt' ;
open REPORT, \">$report\" ;
for (@ARGV) {
++$i ;
print REPORT \"$i. $_\\n\";
}
`open $report` ; # shell command"
set text item delimiters to ASCII character 10
set script_ to "" & paragraphs of s
set AppleScript's text item delimiters to ""
open for access file f with write permission
set eof file f to 0
write script_ to file f
close access file f
tell application "Finder"
activate
reveal file f
end tell
