• 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: open for access file pathstring with write permission
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: open for access file pathstring with write permission


  • Subject: Re: open for access file pathstring with write permission
  • From: Paul Berkowitz <email@hidden>
  • Date: Tue, 14 Jan 2003 12:45:44 -0800

On 1/14/03 11:56 AM, "Jacco Rens" <email@hidden> wrote:

>
> On dinsdag, jan 14, 2003, at 19:47 Europe/Amsterdam, Paul Berkowitz
> wrote:
>
>> On 1/14/03 9:56 AM, "Jacco Rens" <email@hidden> wrote:
>>
>>> can someone give me insight why this gives an error, google doesn't
>>> come up with an clear answer :(
>>> Mac OS X 10.2.3
>>>
>>> tell application "Finder"
>>> set pathstring to ((the path to desktop) as text) & "test"
>>> set theNote to open for access file pathstring with write permission
>>> write "test, test" to theNote
>>> close access theNote
>>> end tell
>>
>> Because 'path to desktop' has nothing to do with the Finder, it's a
>> scripting addition in Standard Additions which has an 'alias' result.
>> But
>> the Finder has its own 'desktop' term (a Finder file), so it's
>> confused.
>> Just remove the Finder tell block and you'll be OK.
>
> well no, because filemaker gives me an error then :(
>
> global myzone
> global hostnumber1
> global hostnumber2
> global hostnumber3
> global hostnumber4
> tell application "FileMaker Pro"
> set ipnummer to cell "ipnummer" of current record
> set {oldDelims, AppleScript's text item delimiters} to {AppleScript's
> text item delimiters, "."}
> set textItems to text items of ipnummer
> set hostnumber1 to item 1 of textItems
> set hostnumber2 to item 2 of textItems
> set hostnumber3 to item 3 of textItems
> set hostnumber4 to item 4 of textItems
> set AppleScript's text item delimiters to oldDelims
> set myzone to cell "temp" of current record
> end tell
> set pathstring to ((path to desktop) as text) & "db." & hostnumber1 &
> "." & hostnumber2 & "." & hostnumber3
> set theNote to open for access file pathstring with write permission
> write myzone to theNote
> close access theNote
>
> gives me the error that `myzone` "expected end of line, but found
> identifier"
>
> I have to write filemaker content direct to an file from filemaker ..

There are a few possibilities. But that's not what you wrote in the the list
last time! Here 'myzone' is an FMP application term 'cell': you can't write
that to a file. perhaps within FMP itself, there is a coercion.

FMP must have something like 'contents of cell' or 'value of cell' , which
is, or could be, a string, no? So

set myzone to value of cell "temp" of current record

and that may work. Sorry I don't have FMP here to test with.

--
Paul Berkowitz
_______________________________________________
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.

  • Follow-Ups:
    • Re: open for access file pathstring with write permission
      • From: Gary Lists <email@hidden>
    • Re: open for access file pathstring with write permission
      • From: Malcolm Fitzgerald <email@hidden>
  • Prev by Date: Re: Date Help - D&T stamp w Short dates
  • Next by Date: Re: Removing every instance of a substring
  • Previous by thread: Re: open for access file pathstring with write permission
  • Next by thread: Re: open for access file pathstring with write permission
  • Index(es):
    • Date
    • Thread