• 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
Missing value
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Missing value


  • Subject: Missing value
  • From: Robert Poland <email@hidden>
  • Date: Sun, 28 Aug 2011 12:07:02 -0600

Hi,

This script gets strange (to me) results.

Is there a simple way to get the short name of Skype without having to parsing it out.

The first approach works for all programs I have tested it with except Skype.

The command; if applicationName = ""... doesn't deal with missing value.

tell application "Skype" to activate
set applicationName to (info for (path to frontmost application))'s short name --> missing value
tell application "System Events"
activate
display dialog applicationName as text giving up after 3
quit
end tell
set clipboard to applicationName -->

tell application "Skype" to activate
set applicationName to (info for (path to frontmost application))'s name -->Skype.app
tell application "System Events"
activate
display dialog applicationName as text giving up after 3
quit
end tell
set clipboard to -->Skype.app

TIA,


Robert Poland - Fort Collins, CO



 _______________________________________________
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: Missing value
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Re: posix path error
  • Next by Date: Re: posix path error
  • Previous by thread: Re: posix path error
  • Next by thread: Re: Missing value
  • Index(es):
    • Date
    • Thread