Re: Old script now fails
Re: Old script now fails
- Subject: Re: Old script now fails
- From: Yvan KOENIG <email@hidden>
- Date: Wed, 21 Mar 2018 12:19:09 +0100
I tested only the run entry point.
Enabling « tell application "Finder" » was required.
Your instruction
open {chosenItem}
pass a list of lists to the handler so, when this one extract theItem it get
the list when it is supposed to get an alias.
Edit the code using parenthesis.
open (chosenItem)
Yvan KOENIG running High Sierra 10.13.3 in French (VALLAURIS, France) mercredi
21 mars 2018 12:15:57
> Le 19 mars 2018 à 15:55, Robert Poland <email@hidden> a écrit :
>
> Hi,
>
> I have this script from 2005 that no longer runs…
>
> Any what’s changed?
>
> property searchStrings : {"t"}
> property replaceStrings : {""}
>
> on run
> set chosenItem to choose file with multiple selections allowed
> open {chosenItem}
> return
> end run
>
> on open (droppedItemList)
> tell application "Finder"
>
> repeat with theItem in droppedItemList
> # repeat from 1 to (count of theItem in droppedItemList)
> log theItem
> set fileName to the name of theItem
>
> set new_item_name to changeLiteralStrings(fileName,
> searchStrings, replaceStrings) of me
>
> if (get name of theItem) ≠ new_item_name then
> set name of theItem to new_item_name
> end if
>
> end repeat
>
> end tell
> end open
>
> -------------------------------------------------------------------------------------
> --» HANDLERS
> --------------------------------------------------------------------------------------
> on changeLiteralStrings(_text, searchStrings, replaceStrings)
> change searchStrings into replaceStrings in _text
> end changeLiteralStrings
>
>
>
> Robert Poland
> iMac, Late 2013, 14,2
> 3.2 GHz Intel Core I5, 27”
> 16 GB Ram, 1TB Fusion HD
> OS X 10.13.3 (High Sierra)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden