I am writing an AppleScript in which I need to get the number of the current window of Google Chrome and open a new tab in it. I want something like this (pseudo code):
set curWindNum to the current window of Google Chrome // returns something like "window 4" or just "4"
open a new tab in window curWindNum
How do I do this?
Best Answer
Here is the beginning of a very simple AppleScript that will open a new tab at the end of the current window, and then it will load a URL. The script will wait 5 seconds (to allow the page to load) and then it will close that tab. I am still working on it, but this should do it for you. Let me know if you need some more help, or if you would like me to change something. Here is the script: