• 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 fails with El Capitan
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Old script fails with El Capitan


  • Subject: Re: Old script fails with El Capitan
  • From: Christopher Stone <email@hidden>
  • Date: Mon, 11 Apr 2016 00:12:22 -0500

On Apr 10, 2016, at 15:51, Robert Poland <email@hidden> wrote:
This Old script fails with El Capitan. Says it can't set file "01 test" to "test".
______________________________________________________________________

Hey Bob,

I'm surprised your script ever worked, since you demolish the file path early on:

set droppedItem to item_name

Since you're using the Satimage.osax anyway, let's clean that up a little:

-------------------------------------------------------------------------------------------
property searchStrings : {"01 "} -- comma,apostrophe, space, Ampersand and double underscore
property replaceStrings : {""} -- underline, null, underline, _and_

on run
  set chosenItem to choose file
  open {chosenItem}
  return
end run

on open (droppedItemList)
  tell application "Finder"
    repeat with theItem in droppedItemList
      set new_item_name to change searchStrings into replaceStrings in (get name of theItem)
      set new_item_name to lowercase new_item_name
      set name of theItem to new_item_name
    end repeat
  end tell
end open
-------------------------------------------------------------------------------------------

--
Best Regards,
Chris

 _______________________________________________
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

References: 
 >Old script fails with El Capitan (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Simple applescriptable diagram maker
  • Next by Date: Error -10000 for one user
  • Previous by thread: Old script fails with El Capitan
  • Next by thread: Error -10000 for one user
  • Index(es):
    • Date
    • Thread