Re: Unwanted font style transfers
Re: Unwanted font style transfers
- Subject: Re: Unwanted font style transfers
- From: Kai <email@hidden>
- Date: Mon, 10 Feb 2003 21:33:08 +0000
on Mon, 10 Feb 2003 10:41:15 -0600, "John Tuttle" <email@hidden>
wrote:
>
I'm having a curious issue that I can't seem to get resolved. I'm
>
grabbing basic file information and loading it into a FileMaker
>
database. All is well except for the filename. When I transfer the
>
filename to a cell in FileMaker Pro the font style is different from
>
all of the rest of the information gathered from the same Finder action.
>
>
OS 10.2
>
FileMaker Pro 6
>
>
I'm using the following:
>
>
tell application "Finder"
>
set vfile to (choose file with prompt "Choose an image to import")
>
set mypath to vfile as string
>
set mysize to physical size of vfile
>
end tell
>
tell application "FileMaker Pro"
>
create new record
>
set cell "path" of last record to mypath
>
set cell "filesize" of last record to mysize
>
end tell
>
>
Both FMP cells are formatted as Helvetica 10 point. Running the script
>
puts the file size in correctly but the path ends up being placed as
>
Geneva 12 point. I've tried turning off the Text Drag and Drop feature
>
in FMP but it doesn't seem to matter.
>
>
Any suggestions?
I can't replicate your problem, John - but then my system/FMP versions
differ from yours. I could be wrong, but I suspect that 'mypath' is somehow
being returned as Unicode text.
Since it's not really necessary to use the Finder for the 'choose file'
command - or the coercion to a string path - it might be worth trying
something like this instead:
=====================================
set vfile to (choose file with prompt "Choose an image to import")
set mypath to vfile as string
tell application "Finder" to set mysize to physical size of vfile
-- (continue with rest of script...)
=====================================
If that doesn't improve matters, try this:
=====================================
set vfile to (choose file with prompt "Choose an image to import")
set {text:mypath} to vfile as string
tell application "Finder" to set mysize to physical size of vfile
-- (continue with rest of script...)
=====================================
...and if that doesn't help, I'm probably barking up the wrong tree.
--
Kai
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.