• 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: Windows properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows properties


  • Subject: Re: Windows properties
  • From: Shane Stanley <email@hidden>
  • Date: Mon, 13 Feb 2012 09:45:27 +1100

It's also pretty easy in AppleScriptObjC:

set x to "file://localhost/Users/yvankoenig/Library/Containers/com.apple.Preview/Data/Desktop/Hȁussermȃn.pdf"

tell current application's NSURL to set theURL to URLWithString_(x)
return theURL's |path|() as text

0000.000 -- Start --
0000.001 Result
--> /Users/yvankoenig/Library/Containers/com.apple.Preview/Data/Desktop/Hȁussermȃn.pdf

Or via ASObjC Runner:

script thePath
set aString to current application's NSApp's convertedValue()
tell current application's NSURL to set theURL to URLWithString_(aString)
return theURL's |path|()
end script

set x to "file://localhost/Users/yvankoenig/Library/Containers/com.apple.Preview/Data/Desktop/Hȁussermȃn.pdf"

tell application "ASObjC Runner" to set theResult to run the script {thePath} converting x with result returned
display dialog theResult


-- 
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <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

  • Follow-Ups:
    • Rép: Windows properties
      • From: KOENIG Yvan <email@hidden>
References: 
 >Rép: Windows properties (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Rép: Windows properties
  • Next by Date: Re: Windows properties
  • Previous by thread: Rép: Windows properties
  • Next by thread: Rép: Windows properties
  • Index(es):
    • Date
    • Thread