Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.advocacy > #373076
| From | "Octavian W. Lagrange" <olagrang@perch.invalid> |
|---|---|
| Newsgroups | comp.os.linux.advocacy |
| Subject | Re: Copy all URLs |
| Date | 2016-09-28 01:16 +0000 |
| Organization | O.W.L. |
| Message-ID | <sadhfjgu003f.4@perch.invalid> (permalink) |
| References | (6 earlier) <D410245B.7EA22%usenet@gallopinginsanity.com> <asdfjgui4e03.g880@perch.invalid> <D4103D77.7EA5C%usenet@gallopinginsanity.com> <hjasdgoe00.au@perch.invalid> <D4105CAB.7EA91%usenet@gallopinginsanity.com> |
Snit <usenet@gallopinginsanity.com> wrote: > On 9/27/16, 4:43 PM, in article hjasdgoe00.au@perch.invalid, "Octavian W. > Lagrange" <olagrang@perch.invalid> wrote: > >> Snit <usenet@gallopinginsanity.com> wrote: >>> On 9/27/16, 2:58 PM, in article asdfjgui4e03.g880@perch.invalid, "Octavian >>> W. Lagrange" <olagrang@perch.invalid> wrote: >>> >>> ... >>>>>> I just watched your video. I can't see your code because it's too >>>>>> blurry, so I'm not able to see where your code differentiates among >>>>>> browser windows, as you claimed earlier. >>>>> >>>>> View it in high resolution and it is easily read. >>>> >>>> doh! >>>> >>>>> This is the full script >>>>> though (updated since the video): >>>>> >>>>> -------- >>>>> on run >>>>> tell application "Safari" >>>>> set AppleScript's text item delimiters to return >>>>> set theURLs to (URL of every tab of window 1) >>>> >>>> OK. Does it work? >>> >>> Yup. Just tried it with about 40 tabs (each) in two windows. >>> >>>> I'm sure it should, but have you tried it with >>>> multiple windows open? >>> >>> Yes... though when I tried it with "all windows" it did some odd things. If >>> I have time I might play, later, but I have absolutely no need for this >>> feature. >>> >>>> Also, since you have this script as a service, how do you know which window >>>> is >>>> window 1? >>> >>> The window in the front is "windows 1" -- good grief! Really... how many >>> times have you been told (and shown) this? >> >> But how do you know that the one in front contains the tabs you want? > > Because when I run it I am looking at them! > >> Why do you script it in a way that you have to bring the window you want >> to the front before you run the script? > > You have that backward. It is the window I am working with whose URLs I > want. > > This is not to different from wanting the new windows I create in a terminal > to be the ones I set up... if I wanted to do your task of using new windows > set up in a specific way. > >>>> As far as I can tell, there is no need for any browser window to have focus >>>> when you run it. >>> >>> Whichever is in front is "window 1." >> >> Yes. So? How do you know that's the one you want the URLs from? > > Again: you are looking at it backward. I run the action *because* I want the > URLs from the front window! > >>>>> end tell >>>>> set the clipboard to theURLs as text >>>>> display notification "Copied: " & (count of theURLs) & " URLs." as text >>>>> end run >>>>> -------- >>>>> >>>>> The reference to "window 1" references the top window. Remember, with >>>>> AppleScript you can reference windows by ID, index, or more. I could say >>>>> every window or "window 2" or find an ID, etc. >>>>> >>>> I have yet to see you use anything but "window 1" in any of your >>>> scripts. > > I notice you do not make any sign to note how absurd your claim was here. > Not absurd. I had not seen these videos. >>> If you can figure out how to get your browser to show you YouTube videos in >>> ways you can read them you will! >>> >>> Seriously, here are just some of the ones I have shown you. I include my >>> quick titles (unchanged) to help: >>> >>> Reference Window by ID: >>> <https://youtu.be/jcPUmwritV8> >> >> It would have made more sense to send each window its own id rather than >> sending all windows the window id of the current "window 1". > > I could have used: > > set theWindows to id of every window > > or: > > set theWindows to name of every window > > or even: > > set theWindows to id of every window whose visible is true > > or: > > set theWindows to name of every window whose visible is true > > And I am sure more. > That's not what I'm saying. You already have thisWindow set to give you the window's id by having it set to the initial value of window 1's id, (when that window is window 1), but instead of sending each window the value of thisWindow, you send them the current value of window 1's id, which changes on refocus, so that you have both windows receiving the current value, rather than the value of thisWindow, which would be that window's id. You also send the string "send this to window 1", rather than "to window N". Both windows are receiving this "to window 1" stuff when they are not both window 1. Sometimes neither of them is window 1 (when you bring the white terminal to the fore), but they are both still receiving that string, along with the id of the white window (the current value of the id of window 1).
Back to comp.os.linux.advocacy | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-26 14:18 -0700
Re: Copy all URLs Silver Slimer <.m@nsn.s> - 2016-09-26 17:21 -0400
Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-26 14:28 -0700
Re: Copy all URLs Silver Slimer <.m@nsn.s> - 2016-09-26 17:31 -0400
Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-26 14:28 -0700
Re: Copy all URLs tmelmosfire <tmelmosfire@gmail.com> - 2016-09-26 14:33 -0700
Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 06:24 +0000
Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-27 08:31 -0700
Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 18:07 +0000
Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-27 11:38 -0700
Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 19:56 +0000
Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-27 13:23 -0700
Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-27 08:54 -0700
Re: Copy all URLs tmelmosfire <tmelmosfire@gmail.com> - 2016-09-27 11:00 -0700
Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-27 11:13 -0700
Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-27 12:14 -0700
Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 19:28 +0000
Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-27 12:44 -0700
Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-27 12:46 -0700
Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 20:21 +0000
Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-27 13:27 -0700
Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 21:58 +0000
Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 23:43 +0000
Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-28 01:16 +0000
Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-28 01:51 +0000
Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-28 02:33 +0000
Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-28 04:06 +0000
Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-28 06:19 +0000
Re: Copy all URLs Marek Novotny <marek.novotny@marspolar.com> - 2016-09-28 14:03 +0000
Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-28 09:09 -0700
Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-28 04:13 +0000
Re: Copy all URLs Jim Polaski <jpolaski@linuxmail.org> - 2016-09-28 13:30 +0000
Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-28 08:35 -0700
Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-28 10:03 -0700
Re: Copy all URLs "Octavian W. Lagrange" <olagrang@perch.invalid> - 2016-09-27 21:59 +0000
Re: Copy all URLs tmelmosfire <tmelmosfire@gmail.com> - 2016-09-27 12:38 -0700
Re: Copy all URLs Snit <usenet@gallopinginsanity.com> - 2016-09-27 13:13 -0700
Re: Copy all URLs Steve Carroll <fretwizzer@gmail.com> - 2016-09-27 14:27 -0700
csiph-web