Jump to content

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


This topic is 4560 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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!

This topic is 4560 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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