• 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
FileMaker oddity ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FileMaker oddity ?


  • Subject: FileMaker oddity ?
  • From: Yvan KOENIG <email@hidden>
  • Date: Fri, 12 Jun 2009 15:47:26 +0200

Hello

I wrote a script passing styled datas from AppleWorks to FileMaker Pro.

--[SCRIPT]
tell application "AppleWorks 6"
activate
tell document 1
select menu item 7 of menu 3 (* Select All *)
select menu item 4 of menu 3 (* Copy *)
end tell
end tell
tell application "FileMaker Pro"
activate
go to field 1 of last record of document 1
do menu menu item 7 of menu 3 (* Paste *)
end tell -- FileMaker
--[/SCRIPT]

It behaves well on my G5 under 10.4.11

but, on macIntel machines, the fonts aren't passed.

I found a workaround:

I first paste in a TextEdit document
copy from this TextEdit document
then paste in FileMaker.

For the same chunk of text,
azertyu

on PPC, the clipboard's record is:

styled Clipboard text:«data styl
0003
00000000 001B 0014 0015 0000 0018 0000 0000 0000
00000003 001B 0014 0016 0000 0018 EEEE 0000 0000
00000005 001B 0014 0015 0000 0018 0000 0000 0000
», string:"azertyu"

on Intel, the clipboard's record is:

string:"azertyu",
scrap styles:«data styl
0300
00000000 1B00 1400 1500 0000 0018 0000 0000 0000
03000000 1B00 1400 1600 0000 0018 EEEE 0000 0000
05000000 1B00 1400 1500 0000 0018 0000 0000 0000
»"

The difference is the way numbers are stored.

My guess is that the culprit is FileMaker which, on Intel machine fails to grab the string + scrap styles components of the clipboard.

I feel that this script demonstrates what I say:
The TextEdit's clipboard's record is:

{Unicode text:"azertyu", 
styled Clipboard text:«data styl
0003
00000000 0018 0012 0015 00FF 0018 000000000000
00000003 0018 0012 0016 00FF 0018 C8D524F41403
00000005 0018 0012 0015 00FF 0018 000000000000»,
string:"azertyu", 
uniform styles:«data ustl
0000 0002 0000 0174 
0000 0000 0000 0014 
0000 0030 0000 0003 

0000 0003 0000 
0000 0000 0002 0000 
0001 0000 0002 0000 
0002 0000 0003 0000 
006C 0000 0004 0000 
0000 0000 0000 0000 
0102 0000 0001 0000 
0000 0000 0105 0000
002C 6E61 6D64 0000 
0024 0000 0001 0000
0004 0000 0001 0000 
0000 0000 0000 0000 
0009 48656C766574696361 00 0000 {Helvetica}

0000 0106 0000 
0004 0018 0000 0000 
0107 0000 0006 0000 
0000 0000 0000 0000 
0068 0000 0004 0000 
0000 0000 0000 0000 
0102 0000 0001 0000 
0000 0000 0105 0000
0028 6E61 6D64 0000 
0020 0000 0001 0000 
0004 0000 0001 0000 
0000 0000 0000 0000 
0007 436F7572696572 00 {Courier}

0000 0106 0000 
0004 0018 0000 0000 
0107 0000 0006 C8D5 
24F4 1402 0000 0000 
006C 0000 0004 0000 
0000 0000 0000 0000 
0102 0000 0001 0000
0000 0000 0105 0000
002C 6E61 6D64 0000 
0024 0000 0001 0000 
0004 0000 0001 0000 
0000 0000 0000 0000
0009 48656C766574696361 00 0000 {Helvetica}
0000 0106 0000
0004 0018 0000 0000 
0107 0000 0006 0000 
0000 0000 0000»
,
 «class ut16»:"azertyu",
 «class utf8»:"azertyu",
 «class RTF »:«data RTF 7B5C727466315C6D61635C616E736963706731303030305C636F636F617274663832345C636F636F617375627274663438300A7B5C666F6E7474626C5C66305C6673776973735C666368617273657437372048656C7665746963613B5C66315C666D6F6465726E5C6663686172736574373720436F75726965723B7D0A7B5C636F6C6F7274626C3B5C7265643235355C677265656E3235355C626C75653235353B5C7265643233385C677265656E305C626C7565303B7D0A5C706172645C74783536305C7478313132305C7478313638305C7478323234305C7478323830305C7478333336305C7478333932305C7478343438305C7478353034305C7478353630305C7478363136305C7478363732305C716C5C716E61747572616C5C7061726469726E61747572616C0A0A5C66305C66733438205C63663020617A650A5C6631205C6366322072740A5C6630205C6366302079757D»}


--[SCRIPT]
(* on entry the clipboard contains a chunck of text copied from TextEdit *)

set intelInside to (do shell script "sysctl -n hw.byteorder") = "1234"
set clipRec to the clipboard as record
if intelInside then
set newRec to {«class utf8»:«class utf8» of clipRec, uniform styles:uniform styles of clipRec}
else
set newRec to {string:string of clipRec, styled Clipboard text:styled Clipboard text of clipRec}
end if
set the clipboard to ""
set the clipboard to newRec

tell application "FileMaker Pro"
activate
go to field 1 of last record of document 1
do menu menu item 7 of menu 3 (* Paste *)
end tell -- FileMaker
--[/SCRIPT]

If I pass the utf8 + uniform styles to Filemaker on PPC machines it fails
If I pass  the string + styled Clipboard Text to FileMaker on Intel Machines, it fails
If I pass the RTF component, it fails on both.

Why FileMaker is it rejecting the  string + styled Clipboard Text set on Intel machines, I don't know.

Yvan KOENIG (from FRANCE vendredi 12 juin 2009 15:47:20)


 _______________________________________________
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:
    • Re: FileMaker oddity ?
      • From: Bruce Robertson <email@hidden>
References: 
 >Rép: ASystem Info oddity (From: Yvan KOENIG <email@hidden>)
 >Re: Rép: ASystem Info oddity (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Internet Block/unblock
  • Next by Date: Re: How to manage image-list
  • Previous by thread: Re: Rép : ASystem Info oddity
  • Next by thread: Re: FileMaker oddity ?
  • Index(es):
    • Date
    • Thread