MACSCRPT Archives

April 2009

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bill Steele <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 3 Apr 2009 18:48:06 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (53 lines)
This works:
set oneImage to choose file --> alias "Bill'sHD:images:filename.jpg"


tell application "GraphicConverter"
	open oneImage
	set theInfo to get file imageinfo oneImage
end tell

This doesn't:


-->"File someobject wasn't found.

OK,. this works:

set oneFolder to  "Bill'sHD:images:"
set oneFile to "filename.jpg"
set oneImage to oneFolder & oneFile as string
tell application "GraphicConverter"
       open alias oneIImage
end tell

But this doesn't:
tell application "GraphicConverter"
     open alias oneImage
     set theInfo to get file imageinfo oneImage
end tell
-->"System error "File not found; Folder not found;(-[43)"

Putting an alias in front of the imageinfo call also doesn't work.

The dictionary says

get file imageinfo?v : get some information about the file content 
from the file reference
get file imageinfo
? list of string : returns the info as an array {"width", "height", 
"x-resolution", "y-resolution", "mode", "bit depth", "format"}

Not really clear about where the file reference is supposed to go.

I'm sure this is one of those stupid arcane things about how the 
filename is presented, but you'd think Graphic Converter would at 
least be consistent within itself.

I can get what I want with "image dimension of window 1" but I want 
to know what's going on here.
-- 

Bill Steele
[log in to unmask]

ATOM RSS1 RSS2