• 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: Chris Page <email@hidden>
  • Date: Wed, 17 Sep 2014 11:58:45 -0700

On Sep 15, 2014, at 10:50 PM, Donald Hall <email@hidden> wrote:

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

Please file a bug report at <http://bugreport.apple.com>.

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.

Why do you need the file path as text? Did you quit the frontmost application? If not, you can just ask for a reference to the process and set its frontmost property to true later:

tell application "System Events" to set frontProcess to the first item of (processes whose frontmost is true)
…
set the frontmost of frontProcess to true

-- 
Chris Page
The other, other AppleScript Chris

 _______________________________________________
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: "koenig.yvan" <email@hidden>
References: 
 >can't make alias into type text (From: Donald Hall <email@hidden>)

  • Prev by Date: Re: sudo permission in a script
  • 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