• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Old script now fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Old script now fails
      • From: Robert Poland <email@hidden>
References: 
 >Old script now fails (From: Robert Poland <email@hidden>)

  • Prev by Date: 1-
  • Next by Date: Re: Old script now fails
  • Previous by thread: Re: Old script now fails
  • Next by thread: Re: Old script now fails
  • Index(es):
    • Date
    • Thread