August 6, 201213 yr 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
August 8, 201213 yr Author 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!
Create an account or sign in to comment