AppleScript Tutorial : Alias, HFS & POSIX - OH MY!

ClickingKeys
ClickingKeys
1.9 هزار بار بازدید - 3 سال پیش - Learn how to AppleScript, Apple's
Learn how to AppleScript, Apple's built in automation platform. In this video we'll dig deeper into file references, file aliases, HFS file paths and POSIX file paths. You'll see what the differences are as well as how to convert from one form to another.

HFS = Hierarchical File System, Apple's file system
POSIX = Portable Operating System Interface, Unix based file path



-- -- -- -- -- -- -- START EXAMPLE SCRIPT CODE -- -- -- -- -- -- --
on run
set posixPath to "/Users/clickingkeys/Desktop/Demo_1.jpg" # EXAMPLE OF A POSIX PATH
log "Example POSIX path"
log posixPath

set hfsFilePath to POSIX file posixPath # CONVERTS A POSIX PATH TO AN HFS FILE REFERENCE
log "Example HFS file reference"
log hfsFilePath

set hfsPath to POSIX file posixPath as string # CONVERTS A POSIX PATH TO AN HFS FILE PATH
log "Example HFS path"
log hfsPath

set aliasExample to hfsPath as alias
log "Example Alias"
log aliasExample

set backToPosix to POSIX path of hfsPath # THIS WILL CONVERT AN HFS PATH TO A POSIX PATH
log "Example POSIX path 2"
log backToPosix
end run
-- -- -- -- -- -- -- END EXAMPLE SCRIPT CODE -- -- -- -- -- -- --



For more AppleScript tutorial videos, check out this play list.
Learn to AppleScript (for beginners/n...

If you're interested in watching full scripts being written, have a look at this play list.
AppleScript Project Examples
3 سال پیش در تاریخ 1400/10/16 منتشر شده است.
1,996 بـار بازدید شده
... بیشتر