Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum Problem with Apple Script on Omnis Studio 8.x (also 10.x)

  • Problem with Apple Script on Omnis Studio 8.x (also 10.x)

    Posted by Gianni on October 3, 2019 at 1:35 pm

    The command
    Do $ runapplescript (lcScript, lcRet) Returns lnErr
    launches the AppleScript which is stored in the “lcScript” variable
    and the result is stored in the “lcRet” variable.
    The “lcRet” variable is an array of strings.
    With Omnis 8.x the variable “lcRet” is no longer populated and returns
    all “null” values.
    The same script launched by both Omnis 5.x and the “Script Editor” program
    Macintosh native that handles AppleScript works perfectly.

    Scott replied 4 years, 9 months ago 2 Members · 1 Reply
  • 1 Reply
  • Scott

    October 4, 2019 at 5:49 pm

    I checked the documentation and it looks like the syntax has changed slightly.
    I ran this code in omnis 10 with not issues.
    Begin text block
    Text:tell application “Finder”(Carriage return)
    Text:display dialog “Hello World”(Carriage return)
    Text:end tell(Carriage return)
    End text block
    Get text block lScript
    Do $root.$runapplescript(lScript,lRet,lErr)

Log in to reply.