Skip to main content
8 events
when toggle format what by license comment
Mar 29, 2014 at 22:19 comment added TheMaskedCucumber This is a much nicer approach. Closing windows is fine. But killing processes is violent, it is calling for dysfunctions.
Mar 29, 2014 at 12:21 vote accept Maxim Yefremov
Mar 29, 2014 at 11:42 history edited Lri CC BY-SA 3.0
added 426 characters in body
Mar 29, 2014 at 11:40 comment added Maxim Yefremov I think that such nonClosable windows are in separate instances of process, because I cannot switch them with key super + `
Mar 29, 2014 at 11:32 comment added Maxim Yefremov It closes all the windows except last. How to modify this script to close all the windows except FIRST? And it ignore Google Chrome windows opened by selenium rc. This means: I got a lot of google chrome windows opened by selenium rc, but this apple script don't close them. Just ignore.
Mar 29, 2014 at 11:26 comment added Lri Are there two or more windows open? You could also use osascript -e 'tell app "Google Chrome" to if number of windows >= 2 then close (windows 2 thru -1)'.
Mar 29, 2014 at 11:23 comment added Maxim Yefremov ❯ osascript -e 'tell app "Google Chrome" to close (windows 2 thru -1)' ⏎ 28:53: execution error: Google Chrome got an error: Can’t get windows 2 thru -1. Invalid index. (-1719)
Mar 29, 2014 at 11:21 history answered Lri CC BY-SA 3.0