• 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: Trying to get image dimensions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to get image dimensions


  • Subject: Re: Trying to get image dimensions
  • From: Deivy Petrescu via AppleScript-Users <email@hidden>
  • Date: Wed, 3 Jun 2020 18:47:26 -0400

Actually, apparently it works with aliases if the alias is declared inside the
tell block
In the OP there was an error because choose file return an alias.

The script works if you sent a string to it without converting to file as in

set k to alias "some path” as string
or
set k to( choose file) as string

tell application "Image Events"
        set im to open k
       ….
end tell
works.
So if it is just open k it works, if it is open file k it works and if it is
open alias k it works.

However sending an actual “file” or “alias” it doesn’t the script fails
although the first line works, i.e., it opens the file
I tried the Finder and System Events.

> On Jun 2, 2020, at 21:07 , Shane Stanley via AppleScript-Users
> <email@hidden> wrote:
>
> On 3 Jun 2020, at 10:54 am, Deivy Petrescu via AppleScript-Users
> <email@hidden> wrote:
>>
>> Actually I just tried and it works both with file or alias:
>
> It works with alias -- *sometimes*. It doesn't work in the form the OP posted
> originally, and it doesn't work like this:
>
> set k to alias "some path"
>
> tell application "Image Events"
>       set im to open k
>
> I take that as a pretty good hint to look for a different approach. (And
> aliases are also causing problems in other apps under Catalina, including
> some Adobe apps.)
>
>
> --
> Shane Stanley <email@hidden>
> <www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
>
> _______________________________________________
> 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

Deivy Petrescu
email@hidden



 _______________________________________________
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: Trying to get image dimensions
      • From: Yvan KOENIG via AppleScript-Users <email@hidden>
    • Re: Trying to get image dimensions
      • From: Shane Stanley via AppleScript-Users <email@hidden>
References: 
 >Trying to get image dimensions (From: Jenni via AppleScript-Users <email@hidden>)
 >Re: Trying to get image dimensions (From: Shane Stanley via AppleScript-Users <email@hidden>)
 >Re: Trying to get image dimensions (From: Jenni via AppleScript-Users <email@hidden>)
 >Re: Trying to get image dimensions (From: Deivy Petrescu via AppleScript-Users <email@hidden>)
 >Re: Trying to get image dimensions (From: Shane Stanley via AppleScript-Users <email@hidden>)

  • Prev by Date: Re: Trying to get image dimensions
  • Next by Date: Re: Trying to get image dimensions
  • Previous by thread: Re: Trying to get image dimensions
  • Next by thread: Re: Trying to get image dimensions
  • Index(es):
    • Date
    • Thread