Re: can't make alias into type text
Re: can't make alias into type text
- Subject: Re: can't make alias into type text
- From: Shane Stanley <email@hidden>
- Date: Wed, 17 Sep 2014 22:15:35 +1000
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/>
_______________________________________________
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