• 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
First run Finder selection problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

First run Finder selection problem


  • Subject: First run Finder selection problem
  • From: Lists <email@hidden>
  • Date: Thu, 25 Sep 2014 14:14:52 -0700

The following script is supposed to duplicate the selected folder in the Finder and resize all of the jpegs therein. The problem is the first time I run the script (Scripts Menu), the folder enclosing the selected folder is duplicated rather than the selected folder. The second time I run it everything is OK.

tell application "Finder"
set theSelected to the selection as alias
set duplicatedFolder to duplicate theSelected to path to desktop folder
set duplicatedFolder to duplicatedFolder as alias
end tell
set longSide to the text returned of (display dialog "Set a size in pixels for longest side of images." default answer "1920")
set foldPath to quoted form of POSIX path of duplicatedFolder
set finalPath to foldPath & "*.jpg"
set shellScpt to "sips -Z " & longSide & " " & finalPath
do shell script shellScpt

TheAny Ideas?

Thanks
J
 _______________________________________________
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: First run Finder selection problem
      • From: Brian Christmas <email@hidden>
    • Re: First run Finder selection problem
      • From: Christopher Stone <email@hidden>
    • Re: First run Finder selection problem
      • From: Brian Christmas <email@hidden>
  • Prev by Date: "set default application of..." no longer works! Any workaround?
  • Next by Date: Re: First run Finder selection problem
  • Previous by thread: "set default application of..." no longer works! Any workaround?
  • Next by thread: Re: First run Finder selection problem
  • Index(es):
    • Date
    • Thread