• 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
Re: TexEdit script - a longshoot
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TexEdit script - a longshoot


  • Subject: Re: TexEdit script - a longshoot
  • From: Xandra Lee <email@hidden>
  • Date: Sun, 1 Apr 2001 14:01:11 -0400

Peter,

IF you'd like each text file as a record in FMP (rather than manymanymany
fields) you can just convert returns to ASCII character 11 (this is what
FMP uses for a line break within a field). Then Surround the entire page
in quotes.This ensures that anything in between quotes remain with 1
field. -- the only thing you must replace is straight quotes (ascii 34)

----------------------------------------
Here's the scriplet to do the replacing:
tell application "Tex-Edit Plus"
replace window 1 looking for return replacing with (ASCII character 11)
make new character at beginning of window 1 with data (ASCII character
34)
make new character at end of window 1 with data (ASCII character 34)
-- now generate the header row
make new paragraph at beginning of window 1 with data "myFieldName"
----------
--do your saving closing, here
--ex: save window 1 in file "Zod:Bullshit.txt"
close document 1
-----------
end tell

(*

Lastly you would import the doc as a Merge file with one field:
Set up a script in your DB to import a prenamed file (specify file)
importing only the one field.
Import a sample as Merge doc. Then check "restore import order".

*)

tell application "FileMaker Pro"
activate
do script FileMaker script "ImportFile" of window 1
end tell

Hope this helps,
xandra
----------------------------------------


Peter wrote:
>My problem is that a server generates a lot of textfiles, these files will
>be imported into Filemaker. The problem is that the files uses returns after
>each sentence instead of a tab. This means that one textfile generates a lot
>of records instead of only one then being imported into Filemaker.
>
>So I want a script that changes the return to tab.
>
>Any clues or hints?
>
>Best regards
>Peter
>
>
>The content of the textfile to modify:
>
>Payment Information
>-------------------
> Payment Method: Purchase Order
> Number: 001
> Company: aaaaaaa
>
>Billing Information
>-------------------
> Name: aaaaaa
>
>Shipping Information
>--------------------
> Name: aaaaaaa
>
>Product Information
>--------------------
> Quantity: 1


Alixandra Leigh
AceDesign
email@hidden
------------------------------------------
Furniture:
><http://home.rochester.rr.com/alexleighs/furniture/furniture.htm>
Renderings:
><http://home.rochester.rr.com/alexleighs/interiors/interiors.htm>


  • Prev by Date: Re: Where am I?
  • Next by Date: Re: Where am I? Thanks
  • Previous by thread: Re: Where am I?
  • Next by thread: Re: Where am I? Thanks
  • Index(es):
    • Date
    • Thread