Jump to content
Sign in to follow this  
ade234

Applescript errors within Filemaker "Perform Applescript" - Not in Applescript Native

Recommended Posts

HI I have an apple script that works natively in Applescript but is failing with errors when called within a script "Perform Applescript".

It seems to be something to do with the way FM_TXT is being read.

The error is

Can't get 40 thru 64 of "47". -1728




Here is the Applescript that works as an applescript.





set FM_Output to "filemac:/Applications:MyTools:Database_Conform:Applescript:temp:000.xml" as alias





set FM to (open for access FM_Output)

set FM_TXT to (read FM) as Unicode text

set AppleScript's text item delimiters to (ASCII character 10)

set XMLNameLength to (offset of "16680" in (paragraph 1 of FM_TXT))

set XMLName to (text 40 thru XMLNameLength of FM_TXT) as string



display dialog "Reel Name is " & XMLName giving up after 5





Here is the PerformApplescript :



set the_file to ":Applications:MyTools:Database_Conform:Applescript:scripts:test.scpt" as alias

try

run script (the_file)

on error err number error_number

display dialog err & " " & error_number

end try

Would it matter within Filemaker that the 000.xml file is not correctly formatted at this point as a standard xml.

Applescript itself does not seem to mind that it is not.

Thanks

Share this post


Link to post
Share on other sites

After 2 Days of head scratching and trying numerous ridiculous ideas I found a post on another forum that had a similar problem.

The answer : RESTART YOUR COMPUTER.

It worked a TREAT!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.