What's wrong with my AppleScript?

I created the script with UI browser. I think that there is something wrong with the first 3 lines

error message
AppleScript failed with script error: text-script:21:30: script error: A “"” can’t go after this identifier. (-2740)

activate application process "SimpleMind Pro"
tell application "System Events"
tell process "SimpleMind Pro"
activate application process "SimpleMind Pro"
tell application "System Events"
tell process "SimpleMind Pro"
click button 1 of group 1 of group 1 of splitter group 1 of window "content.smmx"  of application process "SimpleMind Pro"
end tell
end tell

thanks in advance for your time and help

As far as I know, all that is required is to activate just the 1 application in the 1st section and then you don’t have to repeat it in the second section.

Try this,


tell application “SimpleMind Pro” to activate

tell application "System Events"
    tell process "SimpleMind Pro"
        click button 1 of group 1 of group 1 of splitter group 1 of window "content.smmx" of application process "SimpleMind Pro"
    end tell
end tell

1 Like

Hello, unfortunately it did not work. Finally, I found the solution which as to delete

of application process "SimpleMind Pro

thanks VERY much for your time and input.

There’s no class/element named application process, so AppleScript reads it as application VARIABLE. Use:

activate application "SimpleMind Pro"
2 Likes