• 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: Donald Hall <email@hidden>
  • Date: Tue, 16 Sep 2014 23:55:16 -0600

Thank you, Yvan.

It was a good suggestion, and more proper as the every clause returns a list. Unfortunately I still get the same error. So I am still looking for how to convert an alias into text in Yosemite. Has anyone else done this?

Don

------------
Don Hall
Apps & More Software Design, Inc.
http://www.appsandmore.com
email@hidden

On Sep 16, 2014, at 1:00 PM, "koenig.yvan" <email@hidden> wrote:



Le 16/sept./2014 à 07:50, Donald Hall <email@hidden> a écrit :

Hi all,

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

(Script Timer was the frontmost app when the script ran.)

Does anyone have a work around for Yosemite? Is there another way to convert an alias into text?

When the script is done I want to be able to reactivate the previously frontmost application with

tell application __frontApp to activate

so I need the file path as text.

Thanks for any pointers. Googling didn’t seem to help.

Don

------------
Don Hall

Hello Don

(file of every process whose frontmost is true)
returns a list of aliases.

Try to use :

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


Yvan KOENIG (VALLAURIS, France) mardi 16 septembre 2014 10:01:21


 _______________________________________________
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: can't make alias into type text
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Re: Count word's occurences
  • Next by Date: Re: can't make alias into type text
  • 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