applescript - Selecting POSIX file based on file name -


i'm having trouble accessing file while trying select on beginning characters basis...

set location "/users/myuser/desktop/" set bom posix file (location & (first file of location name begins "thisfile")) tell application "preview" open bom 

is path/alias vs text type of thing?

only system events , finder know file in file system is.
finder has property desktop points desktop of current user.

tell application "finder" set bom first file of desktop name begins "thisfile" tell application "preview" open (bom alias) 

or arbitrary posix path

set location posix file "/users/myuser/desktop" text tell application "finder" set bom first file of folder location name begins "thisfile" tell application "preview" open (bom alias) 

the alias coercion needed because preview doesn't recognize finder file specifier objects.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -