Applescript problem

Hello.
Trying to do applescript within Bome Translator, I’ve hit an issue where whatever the script is, I get the following error message :

ERROR executing AppleScript: action_0_16(): error -2741: Expected “contained by”, “equal”, “equal to”, “equals”, “greater than”, “in”, “less than” or expression but found unknown token.

The simplest script throws out this error when I hit the ‘test’ button :

tell application id "com.figure53.QLab.4" to tell front workspace
end tell

Any ideas what’s going on?

Thanks

Hi, sorry for the delay. I’m having similar errors and checking into it.

tell application "Terminal"
	activate
	my execCmd("ls")
end tell

on execCmd(cmd)
	tell application "System Events"
		tell application process "Terminal"
			set frontmost to true
			keystroke cmd
			keystroke return
		end tell
	end tell
end execCmd

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

It was working well until yesterday.
Apple pushed an update that messed things up? Or was Bome just updated?

Bome MIDI Translator Pro had an update about a month ago to 1.9.0 but you have to install it yourself. I’m not sure whether Apple pushed and update that broke it. I didn’t test until you brought it up on this forum. I am checking into it further.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Can you run the same script in Apple’s Script Editor or similar?

Yes, I tested with the script editor and it worked fine. Then I loaded the script into a MT Pro outgoing action and it did not.

Steve

@FlorianBome
Whoops maybe you were asking @stanelie

Sorry

both of you! Thanks, this doesn’t seem right. Things that work in the Script Editor should also work in MT Pro.

Maybe a recent Apple Software update broke this. Maybe I should try and set up MT Pro again for accessibility on the new version of Mac OS and try again? @stanelie said it was working a few days ago. I assume he is on MT Pro 1.9.0

Steve

Yes, I am using 1.9.0.
I am also able to run the scripts in the Apple script editor, but they fail in MT Pro.

My error number is the same but says

: Expected “end” but found “on”.

which version of MacOS are you running? Are you aware of a recent update on your computer?

631680 - OUT 0.0 ERROR executing AppleScript: action_0_0(): error -2741: Expected “end” but found “on”.

11.5

11.5 also.

My system shows 11.5 was pushed on July 21 to my Mac.

I think it was failing on 11.4 for me, I upgraded to 11.5 today hoping it would fix it, it did not.

Thanks. This is recorded as a bug and I hope we can fix it soon and report here. Meanwhile, any other findings are welcome!

One idea is to write AppleScript code into the Project Properties’ AppleScript section (as individual handlers), and then merely call those handlers from the individual outgoing AppleScript actions.

Hello Florian.
I would like to try your workaround in the mean time. Do you have an example or a skeleton code I could use as a starting point? I’m not sure how handlers work, I’m just a script kiddie.
Thanks!

Hum…
I tried setting the script as a global handler, as per the manual, and it fails with the exact same error when called by a translator.

So, not a workaround…

I just tried running a small script on Bome trial on a secondary computer running OS X 10.14.6, and it also fails with the same error messages.