How do I return the number of the current window in Chrome and open a new tab in it?
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:
tell application "Google Chrome"
set ActivePage to window 1
set Tab1 to make new tab at end of tabs of ActivePage
set URL of Tab1 to "http://google.com"
delay 5
close active tab of window 1
end tell