Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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

  • 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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.