• 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: can't make alias into type text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can't make alias into type text


  • Subject: Re: can't make alias into type text
  • From: KOENIG Yvan <email@hidden>
  • Date: Wed, 17 Sep 2014 14:54:28 +0200


Le 17 sept. 2014 à 14:15, Shane Stanley <email@hidden> a écrit :

On 16 Sep 2014, at 3:50 pm, Donald Hall <email@hidden> wrote:

This works in Mavericks:

tell application "System Events" to set __frontApp to (file of every process whose frontmost is true) as text

In Yosemite I get this error:

Can't make alias "disk1s3 2:Applications:Script Timer.app" of application "System Events" into type text. Number=-1700

My understanding is that this sort of thing is possibly still covered by NDA, so developer forums might be the place to discuss it.

However, it looks to me that such a problem might be the result of System Events defining its own alias class. Why it would choose to use its own class in one place and AppleScript's elsewhere is beyond me, but then I'm not sure having a class called alias in System Events is particularly helpful anyway.

My suggestion is that your first stop should be bugreport.apple.com ASAP.

My second suggestion would be to try this:

tell application "System Events" to set __frontApp to (file of process 1 whose frontmost is true) as alias as text

--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

Thanks Shane.
It works.

tell application "System Events" to set __frontApp to (file of process 1 whose frontmost is true)
returns : alias "Western Caviar:Applications:Utilities:Script Editor.app:" of application "System Events"

while

tell application "System Events" to set __frontApp to (file of process 1 whose frontmost is true) as alias
returns : alias "Western Caviar:Applications:Utilities:Script Editor.app:"

and at last, converting a standard alias into text behaves flawlessly.

Yvan KOENIG (VALLAURIS, France) mercredi 17 septembre 2014 14:54:23






 _______________________________________________
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: 
 >can't make alias into type text (From: Donald Hall <email@hidden>)
 >Re: can't make alias into type text (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: can't make alias into type text
  • Next by Date: sudo permission in a script
  • Previous by thread: Re: can't make alias into type text
  • Next by thread: Re: can't make alias into type text
  • Index(es):
    • Date
    • Thread