I have a floating menu consisting of a single webview menu item which can run on either my Mac or on BTT Mobile. I know that I can execute JavaScript in the webview when it runs on the Mac via:
tell application "BetterTouchTool"
webview_menu_item_load_html_url_js "4EF60C00-08CF-43D3-93F1-47FFBC2D2A23" javascript_to_execute "setBackground('red');"
end tell
where setBackground() is a simple helper function that sets the background of the <body> element to whatever colour was passed as an argument. However, if I have the floating menu running on BTT Mobile, it seems that the AppleScript call isnāt executed. This would be super useful to have, because bidirectional communication between BTT Mobile and the Mac would not only allow executing arbitrary code, but you could also pass images, audio, and even video to the BTT Mobile webview by sending the file in base64 encoding.
Is it possible to use AppleScript to communicate with a floating menu in BTT Mobile? If so, am I using the wrong syntax/command in the above?
Many thanks,
Jason