• 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: Choose not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Choose not working


  • Subject: Re: Choose not working
  • From: Ron Hunsinger <email@hidden>
  • Date: Thu, 12 Jun 2014 13:24:16 -0700


On Jun 12, 2014, at 10:35 AM, Robert Poland <email@hidden> wrote:

At the beginning of a script I have this;

set nullPicture to "~/Pictures/APOD ƒ/nullPicture.jpg" # Temp blank image
set ThePicture to choose file
delay 1
tell application "System Events" to set the_size to size of disk item (ThePicture as text)


This has been working for ages, now I get errors…

Can't get «class  ditm» "/Users/rpoland/Pictures/ APOD f /140611-galaxies_mackivne n_2 000-1 ,jpg" of application "System Events", 

The file "140611-galaxies_mackivne n_2 000-1 ,jpg” was removed yesterday and no longer exists. AND is not the file I “Chose”.

Are you sure the error message is coming from the line you're looking at? You may have "1406110galaxies-mackiven n_2 000-1.jpg" somewhere else (perhaps as a property) and reference it further down in the script.

It's odd that you appear to have a folder "APOD ƒ", but the error message refers to folder "APOD f". I don't know if that's a clue or merely a transcription error.

I have not restarted the computer yet.

Why not? It's astonishing how often inscrutable errors are fixed by a simple restart.

Just as a matter of style (and not related to your problem):

tell application "System Events" to set the_size to size of disk item (ThePicture as text)

is unnecessarily roundabout. "ThePicture" is already an alias. No need to convert it to text and then back to a disk item. Just say:

tell application "System Events" to set the_size to size of ThePicture

-Ron Hunsinger

 _______________________________________________
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: Choose not working
      • From: Robert Poland <email@hidden>
References: 
 >Choose not working (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Choose not working
  • Next by Date: Re: Choose not working
  • Previous by thread: Re: Choose not working
  • Next by thread: Re: Choose not working
  • Index(es):
    • Date
    • Thread