I'm curious if AppleScript can access each specific tab in a browser and execute some javascript in them.
Anyone have ideas?
For Google Chrome, use execute
from AppleScript Chromium Suite:
execute v : Execute a piece of javascript.
execute specifier : The tab to execute the command in.
javascript text : The javascript code to execute.
Example:
tell application "Google Chrome"
execute front window's active tab javascript "alert('example');"
end tell
Can be done in Safari either:
tell application "Safari" to do JavaScript "alert('example')" in document 1
For other browsers, check the functions at File -> Open Dictionary
on AppleScript editor.