He's basically iterating through every window, and then iterating through every tab in each window, and testing whether each tab's URL matches the argument passed to the handler (he exits on first match). I actually don't like the way he wrote his lookupTabWithUrl() handler because of it's unnecessary use of repeat loops I can't think of a specific reason to do it that way. That was very considerate and it's helpful when people share their research in this manner. I hope this helps you out, and helps resolve the issues your users were having.Įdited Jby you could try inserting a modest delay before that line, i.e.Ĭlose ( every tab of every window whose URL contains "chrome://newtab/"īut I'm unable to recreate the problem on my machine, which probably indicates the delay might help other machines. Google Chrome is a cross-platform web browser developed by Google.It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Computer Android iPhone & iPad Set Chrome as your default web browser If you dont have Google Chrome on your computer yet, first download and install Chrome. Thus, that ends up being the entire script. In fact, on my system, that works regardless of whether or not Chrome is running, negating the need for all the bits that came before. Tell application "System Events" to keystroke "n" using Ĭlose ( every tab of every window whose URL is "chrome://newtab/" ) If ( myList contains "Google Chrome" ) is false thenĭo shell script "open -a Google\\ Chrome -new -args -incognito" Here's your code that I copied from the workflow: Writing an AppleScript to achieve what you want here-namely opening a Chrome window/tab-shouldn't need to employ any accessibility features via System Events. note from your original post that Assistive Access is required to run this workflow. I downloaded the workflow and had a look at the AppleScript, which has quite a few issues with it. Looking at the source code, I can see why these users are experiencing these issues.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |