Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set urlMustContain to "web.whatsapp.com"
- tell application "Google Chrome" to tell its window 1
- activate
- set tabExists to (tabs whose URL contains urlMustContain) exists
- if tabExists then
- set allTabs to every tab
- set tabIndex to 1
- repeat with i from 1 to count of allTabs
- set thisTab to item i of allTabs
- if URL of thisTab contains urlMustContain then
- set active tab index to tabIndex
- exit repeat
- else
- set tabIndex to tabIndex + 1
- end if
- end repeat
- else
- return
- end if
- end tell
Add Comment
Please, Sign In to add comment