Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.advocacy > #372894 > unrolled thread

Re: Copy all URLs

Started bySteve Carroll <fretwizzer@gmail.com>
First post2016-09-26 14:18 -0700
Last post2016-09-27 14:27 -0700
Articles 18 on this page of 38 — 7 participants

Back to article view | Back to comp.os.linux.advocacy

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  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

Page 2 of 2 — ← Prev page 1 [2]


#373041

FromSnit <usenet@gallopinginsanity.com>
Date2016-09-27 13:27 -0700
Message-ID<D410245B.7EA22%usenet@gallopinginsanity.com>
In reply to#373036
On 9/27/16, 1:21 PM, in article ahjgdu993.aet@perch.invalid, "Octavian W.
Lagrange" <olagrang@perch.invalid> wrote:

>>> It's clear that he was implying he had written a Safari extension,
>>> because in response to my post about the chromium extension, he wrote:
>>> 
>>> "If such a thing did not exist, how would you add it to Chrome? Just
>>> curious..."
>>> Message-ID: <D40FDEC6.7E97B%usenet@gallopinginsanity.com>
>>> 
>>> His extension attempt must have FAILED (big surprise, right?),
>>> so now he's begging me to tell him how to write one.  He's "just
>>> curious", dontcha know.  Snit!  I don't know anything about
>>> browser extensions.  Here's an idea:  RTFM!
>> 
>> I wrote a System Service that acts as an extension to Safari... and it works
>> fine.
>> 
>> Now, of course, it is not a Safari extension... but as I noted I wanted to
>> REPLACE the functionality of one.
>> 
>> But whatever, you are trolling me over your "script's window" error... and
>> error that was really not a big deal but you are crying about it.
> 
> 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. 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)
    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.

-- 
* OS X / Linux: What is a file?     <http://youtu.be/_dMbXGLW9PI>
* Mint MATE Trash, Panel, Menu:     <http://youtu.be/C0y74FIf7uE>
* Mint KDE working with folders:    <http://youtu.be/7C9nvniOoE0>
* Mint KDE creating files:          <http://youtu.be/N7-fZJaJUv8>
* Mint KDE help:                    <http://youtu.be/3ikizUd3sa8>
* Mint KDE general navigation:      <http://youtu.be/t9y14yZtQuI>
* Mint KDE bugs or Easter eggs?     <http://youtu.be/CU-whJQvtfA>
* Easy on OS X / Hard on Linux:     <http://youtu.be/D3BPWANQoIk>
* OS / Word Processor Comparison:   <http://youtu.be/w6Qcl-w7s5c>

[toc] | [prev] | [next] | [standalone]


#373052

From"Octavian W. Lagrange" <olagrang@perch.invalid>
Date2016-09-27 21:58 +0000
Message-ID<asdfjgui4e03.g880@perch.invalid>
In reply to#373041
Snit <usenet@gallopinginsanity.com> wrote:
> On 9/27/16, 1:21 PM, in article ahjgdu993.aet@perch.invalid, "Octavian W.
> Lagrange" <olagrang@perch.invalid> wrote:
> 
>>>> It's clear that he was implying he had written a Safari extension,
>>>> because in response to my post about the chromium extension, he wrote:
>>>> 
>>>> "If such a thing did not exist, how would you add it to Chrome? Just
>>>> curious..."
>>>> Message-ID: <D40FDEC6.7E97B%usenet@gallopinginsanity.com>
>>>> 
>>>> His extension attempt must have FAILED (big surprise, right?),
>>>> so now he's begging me to tell him how to write one.  He's "just
>>>> curious", dontcha know.  Snit!  I don't know anything about
>>>> browser extensions.  Here's an idea:  RTFM!
>>> 
>>> I wrote a System Service that acts as an extension to Safari... and it works
>>> fine.
>>> 
>>> Now, of course, it is not a Safari extension... but as I noted I wanted to
>>> REPLACE the functionality of one.
>>> 
>>> But whatever, you are trolling me over your "script's window" error... and
>>> error that was really not a big deal but you are crying about it.
>> 
>> 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?  I'm sure it should, but have you tried it with
multiple windows open?  Also, since you have this script as a service,
how do you know which window is window 1?  As far as I can tell, there
is no need for any browser window to have focus when you run it.


>     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.  Maybe you don't know how to do it any other way.

[toc] | [prev] | [next] | [standalone]


#373066

From"Octavian W. Lagrange" <olagrang@perch.invalid>
Date2016-09-27 23:43 +0000
Message-ID<hjasdgoe00.au@perch.invalid>
In reply to#373052
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?
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?


>> 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?

>>>     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. 
> 
> 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 guess you are just fixated on "window 1" though.  Not judging you
for that affliction. 
 

[toc] | [prev] | [next] | [standalone]


#373076

From"Octavian W. Lagrange" <olagrang@perch.invalid>
Date2016-09-28 01:16 +0000
Message-ID<sadhfjgu003f.4@perch.invalid>
In reply to#373066
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).

[toc] | [prev] | [next] | [standalone]


#373080

From"Octavian W. Lagrange" <olagrang@perch.invalid>
Date2016-09-28 01:51 +0000
Message-ID<ahfkigua3.age@perch.invalid>
In reply to#373076
Snit <usenet@gallopinginsanity.com> wrote:
> On 9/27/16, 6:16 PM, in article sadhfjgu003f.4@perch.invalid, "Octavian W.
> Lagrange" <olagrang@perch.invalid> wrote:
> 
> ... 
>>>>> 
>>>>> 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.
> 
> LOL! 
> 
>> 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.
> 
> I think you need to diagram that sentence. LOL!
> 

It diagrams just fine.  I take it subordinate clauses present a difficulty
for you?


> To be clear: I am not saying there is no mistake or better way to do my
> scripts... but, please, re-read your sentence and try to translate it to
> English. Heck, I will say the idea of "both windows receiving the current
> value" is wrong... each message is set to one window (except where I have
> referenced "all windows" or the like).
> 
>> 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.
> 
> Only the window that is window 1 receives the messages set to window 1 (or
> at least follows them).
> 

No.  Each window is receiving the id value of the current window 1,
but they both receive a string 'echo "send this to window 1"' when they
do not have focus.


>> 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).
> 
> Only window 1 gets the info sent to window 1.
> 

No.  That's not what is happening in your video.

http://i.imgur.com/25nRs24.png

As you can see here, when the white window has focus (it is now window 1)
the red and orange windows are receiving the string "send this to window 1"
and are also echo'ing the value of the white window's id, 18028.  The
orange window is id 18026, and the red is 18027, as you see earlier in
the video.

[toc] | [prev] | [next] | [standalone]


#373082

From"Octavian W. Lagrange" <olagrang@perch.invalid>
Date2016-09-28 02:33 +0000
Message-ID<ashjdgjic0.fji@perch.invalid>
In reply to#373080
Snit <usenet@gallopinginsanity.com> wrote:
> On 9/27/16, 6:51 PM, in article ahfkigua3.age@perch.invalid, "Octavian W.
> Lagrange" <olagrang@perch.invalid> wrote:
> 
> ...
>>>> 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.
>>> 
>>> I think you need to diagram that sentence. LOL!
>> 
>> It diagrams just fine.  I take it subordinate clauses present a difficulty
>> for you?
> 
> By all means do explain why you mean by that run-on nonsense.
> 
>>> To be clear: I am not saying there is no mistake or better way to do my
>>> scripts... but, please, re-read your sentence and try to translate it to
>>> English. Heck, I will say the idea of "both windows receiving the current
>>> value" is wrong... each message is set to one window (except where I have
>>> referenced "all windows" or the like).
>>> 
>>>> 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.
>>> 
>>> Only the window that is window 1 receives the messages set to window 1 (or
>>> at least follows them).
>>> 
>> No.  Each window is receiving the id value of the current window 1,
>> but they both receive a string 'echo "send this to window 1"' when they
>> do not have focus.
> 
> Which video do you mean? But even without knowing that I can tell you that
> window 1 is the only window responding to messages sent to window 1.
> 

But you are not sending them to window 1.  You are sending them to the
window whose id is thisWindow, which was initialized with the value of
window 1's id when *that* window was window 1.  The value of thisWindow
does not change after initialization.  For the orange window, thisWindow
has value 18026; for the red window it is 18027.  You are sending those
windows not the value of thisWindow, but the value of the current
window 1's id, which in the case of the white window is 18028, so
when the white window has focus, both the red and orange windows
echo the value 18028.

-----------------------
set thisWindow to id of window 1 as integer
repeat 10000 times
  do script "echo " & id of window 1 as string in window id thisWindow
...
-----------------------

The value of thisWindow does not change in the loop.  It always refers
to the value it was initialized with. 


>>>> 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).
>>> 
>>> Only window 1 gets the info sent to window 1.
>> 
>> No.  That's not what is happening in your video.
>> 
>> http://i.imgur.com/25nRs24.png
>> 
>> As you can see here, when the white window has focus (it is now window 1)
>> the red and orange windows are receiving the string "send this to window 1"
>> and are also echo'ing the value of the white window's id, 18028.  The
>> orange window is id 18026, and the red is 18027, as you see earlier in
>> the video.
> 
> Re-watch the video and see if you can find your error. :)
> 

I made no error.  I detected your error.  What makes you think that
window 1 is "receiving" anything?  You are not sending to window 1.
You are sending to the window whose id is thisWindow:

do script "echo " & id of window 1 as string in window id thisWindow


> Hint: If the line said:
> 
>     do script "echo Send this to yo' mama!" ...
> 
> That would not have meant the message would have been sent to your mother or
> anyone else's. :)
> 

Which is my point.  You word the string to say that it is is sent to
"window 1" when it is not.

[toc] | [prev] | [next] | [standalone]


#373083

From"Octavian W. Lagrange" <olagrang@perch.invalid>
Date2016-09-28 04:06 +0000
Message-ID<hjadug003.agr3@perch.invalid>
In reply to#373082
Snit <usenet@gallopinginsanity.com> wrote:
> On 9/27/16, 7:33 PM, in article ashjdgjic0.fji@perch.invalid, "Octavian W.
> Lagrange" <olagrang@perch.invalid> wrote:
> 
>> Snit <usenet@gallopinginsanity.com> wrote:
>>> On 9/27/16, 6:51 PM, in article ahfkigua3.age@perch.invalid, "Octavian W.
>>> Lagrange" <olagrang@perch.invalid> wrote:
>>> 
>>> ...
>>>>>> 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.
>>>>>> 
>>>>> I think you need to diagram that sentence. LOL!
>>>>> 
>>>> It diagrams just fine.  I take it subordinate clauses present a difficulty
>>>> for you?
>>>> 
>>> By all means do explain why you mean by that run-on nonsense.
>>> 
> And Owl gives up... his sentence is run-on nonsense based on his own lack of
> understanding. OK. Fair enough.
> 

It is not a run on sentence, moron.


>>>>> To be clear: I am not saying there is no mistake or better way to do my
>>>>> scripts... but, please, re-read your sentence and try to translate it to
>>>>> English. Heck, I will say the idea of "both windows receiving the current
>>>>> value" is wrong... each message is set to one window (except where I have
>>>>> referenced "all windows" or the like).
>>>>> 
>>>>>> 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.
>>>>>> 
>>>>> Only the window that is window 1 receives the messages set to window 1 (or
>>>>> at least follows them).
>>>>> 
>>>> No.  Each window is receiving the id value of the current window 1, but they
>>>> both receive a string 'echo "send this to window 1"' when they do not have
>>>> focus.
>>>> 
>>> Which video do you mean? But even without knowing that I can tell you that
>>> window 1 is the only window responding to messages sent to window 1.
>> 
>> But you are not sending them to window 1.
> 
> Correct: I am sending messages to windows which are not the front window.
> Were you under the impression that was a secret?
> 


The string "Send this to window 1" reveals your intent.


>> You are sending them to the window whose id is thisWindow, which was
>> initialized with the value of window 1's id when *that* window was window 1.
> 
> Right. 
> 
>> The value of thisWindow does not change after initialization.
> 
> The value of its ID does not change but the value of its index does (as do
> other values).
> 

Of course.  But you are not sending to an index.  You are sending to 
a window id stored in thisWindow.


>> For the orange window, thisWindow has value 18026; for the red window it is
>> 18027.
> 
> Those are their IDs. If that is what you mean by their "value" then you are
> correct.
> 
>> You are sending those windows not the value of thisWindow, but the value of
>> the current window 1's id, which in the case of the white window is 18028, so
>> when the white window has focus, both the red and orange windows echo the
>> value 18028.
> 
> Correct.
> 
>> -----------------------
>> set thisWindow to id of window 1 as integer
>> repeat 10000 times
>>   do script "echo " & id of window 1 as string in window id thisWindow
>> ...
>> 
>> -----------------------
>> 
>> The value of thisWindow does not change in the loop.  It always refers
>> to the value it was initialized with.
> 
> Again: correct. Good to see you are getting this (and hopefully you retain
> it!).
> 

If only you got it.


> This might show it a bit better:
> 
> <https://youtu.be/RpbhPFEMnsk>
> 

That is not the same code.  You are using '"echo " & thisWindow ...'
instead of the '"echo " & id of window 1 ...' that you used in the
code under discussion.  So here you are echo'ing the window's own
id. 


>>>>>> 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).
>>>>>> 
>>>>> Only window 1 gets the info sent to window 1.
>>>>> 
>>>> No.  That's not what is happening in your video.
>>>> 
>>>> http://i.imgur.com/25nRs24.png
>>>> 
>>>> As you can see here, when the white window has focus (it is now window 1)
>>>> the red and orange windows are receiving the string "send this to window 1"
>>>> and are also echo'ing the value of the white window's id, 18028.  The orange
>>>> window is id 18026, and the red is 18027, as you see earlier in the video.
>>>> 
>>> Re-watch the video and see if you can find your error. :)
>> 
>> I made no error.  I detected your error.  What makes you think that
>> window 1 is "receiving" anything?  You are not sending to window 1.
> 
> Sure I am.
> 

If so, why is the white window not receiving any input when it has focus and
is window 1?  What part of the code sends to window 1?  You are confused
about your own code.


>> You are sending to the window whose id is thisWindow:
> 
> Right: which may or may not be window 1.
> 

In the case of your code, it is not.  And why say "Send this to window 1"
and why above say that you *are*
sending to window 1?

    owl:
    "You are not sending to window 1."
    snit:
    "Sure I am."

>> do script "echo " & id of window 1 as string in window id thisWindow
> 
> Good grief... ANOTHER video to help you understand. Um, OK:
> 
> <https://youtu.be/Yy4ynfiGPPM>
> 
> I might blow your mind by moving windows without having them become the
>  focus (they do not become window 1 as I move them). 

Why would that blow my mind?  It is trivial.  But as you can see in
that very video, you are not moving the windows programmatically, but by
grabbing them with the mouse, and giving them focus, and you will note
that as you do so the echo'ed value of "Window 1" changes to reflect
the change in focus.

> 
>>> Hint: If the line said:
>>> 
>>>     do script "echo Send this to yo' mama!" ...
>>> 
>>> That would not have meant the message would have been sent to your mother or
>>> anyone else's. :)
>> 
>> Which is my point.
> 
> But not the one you said. :)
> 
> Keep in mind, ONLY window 1 gets any message sent to window 1.

Yes, and if you had actually sent any message to window 1, it might
have received one.

> As far as I
> know there are no exceptions (though maybe you can set up a way to intercept
> it... never heard of such a thing).
> 
>> You word the string to say that it is is sent to
>> "window 1" when it is not.
> 
> See the newest and see if that helps you to understand...
> 
> 

Maybe this will clear it up for you:

When the first script is run, it sets its thisWindow variable to 18026:

http://i.imgur.com/nqOpSmY.png

The value of window 1's id (still 18026) is echo'd in the window 18026. 
The string 'echo "Send this to window 1" is sent to window 18026.

When the second script is run, it sets its thisWindow variable to 18027:

http://i.imgur.com/LxT0jQP.png

The value of window 1's id (now 18027) is echo'd both the windows 18026
and 18027, the respective values of thisWindow in the two scripts.
The string 'echo "Send this to window 1" is also sent to both windows.

When the white window is opened and has focus, the value of window 1's
id is now 18028, so both the green and orange windows are echo'ing the
value 18028, as well as the string "Send this to window 1":

http://i.imgur.com/SVqSLUu.png

Not also that while the white window has focus at this point and is
"window 1," it is receiving no input.  That is because nothing was
sent to "window 1."

[toc] | [prev] | [next] | [standalone]


#373085

From"Octavian W. Lagrange" <olagrang@perch.invalid>
Date2016-09-28 06:19 +0000
Message-ID<ahjdgae98.gad@perch.invalid>
In reply to#373083
Snit <usenet@gallopinginsanity.com> wrote:
> On 9/27/16, 9:06 PM, in article hjadug003.agr3@perch.invalid, "Octavian W.
> Lagrange" <olagrang@perch.invalid> wrote:


>> That is because nothing was sent to "window 1."
> 
> Nothing was sent to THAT window when it was window 1, but that does not mean
> nothing was sent to window 1 in general.

Nothing was sent to window 1, which is why that window never received
anything when it was window 1.

> If that is what you mean, though,
> then you are correct and that was never in contention.
> 
> Sounds like you are slowly figuring this out!
> 

Sounds like you are plonked.  See you in six months. 
anon@lowtide:~$ cat snit-plonk
Wed Sep 28 02:11:59 EDT 2016
Mon Mar 27 02:12:11 EDT 2017
anon@lowtide:~$ 
 

[toc] | [prev] | [next] | [standalone]


#373125

FromMarek Novotny <marek.novotny@marspolar.com>
Date2016-09-28 14:03 +0000
Message-ID<vPKdnSUtmYRWUHbKnZ2dnUU7-c3NnZ2d@giganews.com>
In reply to#373083
On 2016-09-28, Sandman <mr@sandman.net> wrote:
> In article <hjadug003.agr3@perch.invalid>, Octavian W. Lagrange wrote:
>
>> Maybe this will clear it up for you:
>
>> When the first script is run, it sets its thisWindow variable to
>> 18026:
>
>> http://i.imgur.com/nqOpSmY.png
>
>> The value of window 1's id (still 18026) is echo'd in the window
>> 18026. The string 'echo "Send this to window 1" is sent to window
>> 18026.
>
>> When the second script is run, it sets its thisWindow variable to
>> 18027:
>
>> http://i.imgur.com/LxT0jQP.png
>
>> The value of window 1's id (now 18027) is echo'd both the windows
>> 18026 and 18027, the respective values of thisWindow in the two
>> scripts. The string 'echo "Send this to window 1" is also sent to
>> both windows.
>
>> When the white window is opened and has focus, the value of window
>> 1's id is now 18028, so both the green and orange windows are
>> echo'ing the value 18028, as well as the string "Send this to window
>> 1":
>
>> http://i.imgur.com/SVqSLUu.png
>
>> Not also that while the white window has focus at this point and is
>> "window 1," it is receiving no input. That is because nothing was
>> sent to "window 1."
>
> My god, this is amateur hour. Michael is having severe problems
> understanding how AppleScript works, which is to be expected since AS
> is quiet convoluted and Michael isn't all that bright, but the way he
> insist that he knows something about AS is just amazing.
> 
> Firstly, you should always create the reference as "set myWindow to
> window 1", not cast it directly as "set myWindow to window 1 as integer"
> 
> This way, you can reference is directly, as this: "do script xxx in
> myWindow" instead. And you only cast a variable when you need it in a
> different context:
> 
> do script 'echo My ID is ' & (id of myWindow as string) in myWindow
> 
> Secondly the line "send this to window 1" isn't sent to "window 1",
> it is sent to thisWindow, which may or may not be window 1, as you have
> tried to explain a couple of times.
> 
> Thirdly, the line "echo " & (id of window 1) is always sent to thisWindow,
> which again may or may not be window 1.

I can pretty much guarantee that he's searching Google, and then reading
a conversation about the code he found and extrapolating from there.

He's not doing any of this by design. It's by chance and he just brings
here things he thinks are cool. Make up a project for him to do and he
chokes. What does that tell you...

-- 
Marek Novotny
https://github.com/marek-novotny

[toc] | [prev] | [next] | [standalone]


#373157

FromSteve Carroll <fretwizzer@gmail.com>
Date2016-09-28 09:09 -0700
Message-ID<e759eac9-9b8d-4937-93dd-46966d7eed7f@googlegroups.com>
In reply to#373125
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Wednesday, September 28, 2016 at 8:04:03 AM UTC-6, Marek Novotny wrote:
> On 2016-09-28, Sandman <mr@sandman.net> wrote:
> > In article <hjadug003.agr3@perch.invalid>, Octavian W. Lagrange wrote:
> >
> >> Maybe this will clear it up for you:
> >
> >> When the first script is run, it sets its thisWindow variable to
> >> 18026:
> >
> >> http://i.imgur.com/nqOpSmY.png
> >
> >> The value of window 1's id (still 18026) is echo'd in the window
> >> 18026. The string 'echo "Send this to window 1" is sent to window
> >> 18026.
> >
> >> When the second script is run, it sets its thisWindow variable to
> >> 18027:
> >
> >> http://i.imgur.com/LxT0jQP.png
> >
> >> The value of window 1's id (now 18027) is echo'd both the windows
> >> 18026 and 18027, the respective values of thisWindow in the two
> >> scripts. The string 'echo "Send this to window 1" is also sent to
> >> both windows.
> >
> >> When the white window is opened and has focus, the value of window
> >> 1's id is now 18028, so both the green and orange windows are
> >> echo'ing the value 18028, as well as the string "Send this to window
> >> 1":
> >
> >> http://i.imgur.com/SVqSLUu.png
> >
> >> Not also that while the white window has focus at this point and is
> >> "window 1," it is receiving no input. That is because nothing was
> >> sent to "window 1."
> >
> > My god, this is amateur hour. Michael is having severe problems
> > understanding how AppleScript works, which is to be expected since AS
> > is quiet convoluted and Michael isn't all that bright, but the way he
> > insist that he knows something about AS is just amazing.
> > 
> > Firstly, you should always create the reference as "set myWindow to
> > window 1", not cast it directly as "set myWindow to window 1 as integer"
> > 
> > This way, you can reference is directly, as this: "do script xxx in
> > myWindow" instead. And you only cast a variable when you need it in a
> > different context:
> > 
> > do script 'echo My ID is ' & (id of myWindow as string) in myWindow
> > 
> > Secondly the line "send this to window 1" isn't sent to "window 1",
> > it is sent to thisWindow, which may or may not be window 1, as you have
> > tried to explain a couple of times.
> > 
> > Thirdly, the line "echo " & (id of window 1) is always sent to thisWindow,
> > which again may or may not be window 1.
> 
> I can pretty much guarantee that he's searching Google, and then reading
> a conversation about the code he found and extrapolating from there.
> 
> He's not doing any of this by design. It's by chance and he just brings
> here things he thinks are cool. Make up a project for him to do and he
> chokes. What does that tell you...

This time it may have been design, Safari did just get an update that
may have broken the extension, like he claimed. It's not so much the
challenge itself as it is the stale popcorn and smeared clown makeup 
in dire of refreshing. On the other point, you're right, give him even an
extremely simple challenge (like opening and looking at a dev console)
and he either folds like a lawn chair or he throws 'la rabieta suprema'.


-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJX6+ssAAoJELnOYK54exUCwEUP/Rt3J5UC5XaNtq+NhN5sqM3C
IVAkbX3kAEYKJCUszNb6m5KEAeYOvVxJPPFrm87ocx5YVrWROyke+9kiPIjpJM1B
vVr1b7PhXRLV5FBiBxDSeSnA3M1dVspcmJHPM/bWqxHroJZMoNKIVUWmYxHEKaH3
iatXj6IXjaFqCp46gUG3X2AfUNqchoV6cs+6zYUo2Glb1C7f6nCYSJvqYbEv653p
NguGOpyuRHmTKyqz6WhzE2VQjXZSTem4il9/pZ22j0eP9YHXKzLdMC0vLfIxMEJ7
Yau4h2bFdzYCoTir/3zimbxstCCCUWHu+fOCvT2URJWs3krkdawcqgqEWu0icGZO
8jzGkxKaUdadTGc2ThQWnLf5TubAHL+Dgd1ScbNAZEdIjdM64WKUBdCrFcvYljzF
JnoN0AobBRpRFaCjZvXcCzn/4WqIUpZQBxcC+Lm6BzQ9dS2FJAOy7k7/qI98gbGp
rPEc1WmWuCpk2iqLFNIAnI7b5DXl4eOK+pm8SGTyFOpwa/ED+cOTQIr16nTTnRTx
NYa8SrlViECb5IcFdG/O61m67YCcumeKiHdy1jGqqMYbfoZ7Wh8NAjBjC9rPBmzy
TGyR5BcxfZDHvdgufuK5VnXede3iEgMmOIKQdbv2fG1SotVjb6YHn+GweAHwYO63
07qvJaeuEC/3rbIDVYxC
=MYRM
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#373084

From"Octavian W. Lagrange" <olagrang@perch.invalid>
Date2016-09-28 04:13 +0000
Message-ID<ahjdg.ajjg@perch.invalid>
In reply to#373082
Jim Polaski <jpolaski@linuxmail.org> wrote:
> On 2016-09-28, Octavian W. Lagrange <olagrang@perch.invalid> wrote:

>>
>> Which is my point.  You word the string to say that it is is sent to
>> "window 1" when it is not.
> 
> Why do you encourage this idiot?
> 

I'm just pounding on him.  I'll get bored soon enough and plonk him.
He is dumber than a brick.  He doesn't even understand his own code.

[toc] | [prev] | [next] | [standalone]


#373116

FromJim Polaski <jpolaski@linuxmail.org>
Date2016-09-28 13:30 +0000
Message-ID<e51uvjFrudvU1@mid.individual.net>
In reply to#373084
On 2016-09-28, Octavian W. Lagrange <olagrang@perch.invalid> wrote:
> Jim Polaski <jpolaski@linuxmail.org> wrote:
>> On 2016-09-28, Octavian W. Lagrange <olagrang@perch.invalid> wrote:
>
>>>
>>> Which is my point.  You word the string to say that it is is sent to
>>> "window 1" when it is not.
>> 
>> Why do you encourage this idiot?
>> 
>
> I'm just pounding on him.  I'll get bored soon enough and plonk him.
> He is dumber than a brick.  He doesn't even understand his own code.

You are driving him crazy that's for sure.

Dumber than a brick
+1000000

Understanding is not his primary intent.
Trolling and causing disruption is.
Snit is one sick puppy.

[toc] | [prev] | [next] | [standalone]


#373172

FromSnit <usenet@gallopinginsanity.com>
Date2016-09-28 08:35 -0700
Message-ID<D4113141.7EB5D%usenet@gallopinginsanity.com>
In reply to#373116
On 9/28/16, 6:30 AM, in article e51uvjFrudvU1@mid.individual.net, "Jim
Polaski" <jpolaski@linuxmail.org> wrote:

> On 2016-09-28, Octavian W. Lagrange <olagrang@perch.invalid> wrote:
>> Jim Polaski <jpolaski@linuxmail.org> wrote:
>>> On 2016-09-28, Octavian W. Lagrange <olagrang@perch.invalid> wrote:
>> 
>>>> 
>>>> Which is my point.  You word the string to say that it is is sent to
>>>> "window 1" when it is not.
>>> 
>>> Why do you encourage this idiot?
>>> 
>> 
>> I'm just pounding on him.  I'll get bored soon enough and plonk him.
>> He is dumber than a brick.  He doesn't even understand his own code.
> 
> You are driving him crazy that's for sure.

Well, it is true I have had to make over a dozen videos to help him
understand a pretty simple concept... I *think* he is slowly getting it. The
last, where I show "window 1" being highlighted, *might* do the trick.

<https://youtu.be/ymE184jYNnk>

> Dumber than a brick
> +1000000
> 
> Understanding is not his primary intent.
> Trolling and causing disruption is.
> Snit is one sick puppy.

I am NOT your personal William Shatner: <https://goo.gl/ZMXDjt>!



-- 
* OS X / Linux: What is a file?     <http://youtu.be/_dMbXGLW9PI>
* Mint MATE Trash, Panel, Menu:     <http://youtu.be/C0y74FIf7uE>
* Mint KDE working with folders:    <http://youtu.be/7C9nvniOoE0>
* Mint KDE creating files:          <http://youtu.be/N7-fZJaJUv8>
* Mint KDE help:                    <http://youtu.be/3ikizUd3sa8>
* Mint KDE general navigation:      <http://youtu.be/t9y14yZtQuI>
* Mint KDE bugs or Easter eggs?     <http://youtu.be/CU-whJQvtfA>
* Easy on OS X / Hard on Linux:     <http://youtu.be/D3BPWANQoIk>
* OS / Word Processor Comparison:   <http://youtu.be/w6Qcl-w7s5c>

[toc] | [prev] | [next] | [standalone]


#373191

FromSteve Carroll <fretwizzer@gmail.com>
Date2016-09-28 10:03 -0700
Message-ID<e95ec817-217f-414c-92ec-91fc2161d6fe@googlegroups.com>
In reply to#373172
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Wednesday, September 28, 2016 at 10:38:48 AM UTC-6, Snit wrote:
> On 9/28/16, 6:30 AM, in article e51uvjFrudvU1@mid.individual.net, "Jim
> Polaski" <jpolaski@linuxmail.org> wrote:
> 
> > On 2016-09-28, Octavian W. Lagrange <olagrang@perch.invalid> wrote:
> >> Jim Polaski <jpolaski@linuxmail.org> wrote:
> >>> On 2016-09-28, Octavian W. Lagrange <olagrang@perch.invalid> wrote:
> >> 
> >>>> 
> >>>> Which is my point.  You word the string to say that it is is sent to
> >>>> "window 1" when it is not.
> >>> 
> >>> Why do you encourage this idiot?
> >>> 
> >> 
> >> I'm just pounding on him.  I'll get bored soon enough and plonk him.
> >> He is dumber than a brick.  He doesn't even understand his own code.
> > 
> > You are driving him crazy that's for sure.
> 
> Well, it is true I have had to make over a dozen videos to help him
> understand a pretty simple concept... I *think* he is slowly getting it. The
> last, where I show "window 1" being highlighted, *might* do the trick.


What's your point? He's either the stupidest 'student' in the world or you 
are the lamest 'teacher'. Looking at the contortions you're going through,
and the fact that you're just plain "wrong", we all know the answer here ;)


-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJX6/fMAAoJELnOYK54exUCb40P/AgYEGDRFrLFnBl1DLAhm6H9
thSORxMEBAcq53B6ndxJ24wrjhHMdLX6joWwM6BZVGurTcO3Qf5OONwCe1XyTcy1
7dTsYXKZjIVfamxr3ajo6CgIEwT3Gv3dxROJc/sI5qvABpMBIyEkJXKaAqVYL79m
eaw+aFfSI94O3pvd4oY9sQU1y/SNhs4sIC3fDv1GbSIx8IBgHxyQkeafTeXuSnRx
YIB2MU62Vrlxf643vqq5Db9saT39+eLMf8uMHpJqxiUpPEDN7QniQN2oTx+HUx6G
gncCPFKfUsGVSaq/nAupTgMGwMOakp8PcFlGp+qk9WfMLmfScMUHLItILxDyHjOI
wmh1HlYZ8/IWr4ITW7q3eORCl9l5K5fKW1D+3Qy9/odEb23SIMsvjUe8CzFWzpfn
kTVeGSmk7MQYo5adXse2qoI8Wres8YSqRnn0wtAOYGKPzwBqLo1RvAST44jvnk4D
UyYcJnHuGXFRxkVdtGzdwiuZVuv3QyYzZriClS8dOUXUOhPK3bzlZQ2J0OqlefyT
arcoNUpM4FMC49kqvMxyUnRF7c8kIon/mt4Awtu8Fbms5gxyWPqmJYVlB1B4+w4n
lq5AC4vquGPmOZuN3QVli0KjAJMb5mrvUw5+1HmmKTTayKNU7/GyS4wFtLjqc6Sm
iCT3ULQ2np9vUllOL0w5
=toxD
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#373053

From"Octavian W. Lagrange" <olagrang@perch.invalid>
Date2016-09-27 21:59 +0000
Message-ID<sahjfig.eii@perch.invalid>
In reply to#373036
Snit <usenet@gallopinginsanity.com> wrote:
> On 9/27/16, 1:21 PM, in article ahjgdu993.aet@perch.invalid, "Octavian W.
> Lagrange" <olagrang@perch.invalid> wrote:
> 
>>> I wrote a System Service that acts as an extension to Safari... and it works
>>> fine.
>>> 
>>> Now, of course, it is not a Safari extension... but as I noted I wanted to
>>> REPLACE the functionality of one.
>>> 
>>> But whatever, you are trolling me over your "script's window" error... and
>>> error that was really not a big deal but you are crying about it.
>>> 
>>> 
>> 
>> 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.
> 
> Just double checked the video to make sure it was not blurry and that in
> that version of the script I referenced "window 1."
> 
> The video is very clear.
> The reference to "window 1" is there.
> I even zoom in on the script!
> 
> Comes down to you are having trouble viewing the video for some reason...
> maybe something to Peter's claim that Linux has trouble viewing at least
> some YouTube videos in a "readable" way.
> 

Problem was 144p.  Didn't notice.

 

[toc] | [prev] | [next] | [standalone]


#373016

Fromtmelmosfire <tmelmosfire@gmail.com>
Date2016-09-27 12:38 -0700
Message-ID<c973ba41-bd27-466a-a90d-b7ae82b2fc2c@googlegroups.com>
In reply to#373013
On Tuesday, 27 September 2016 12:14:51 UTC-7, Steve Carroll  wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
> 
> On Tuesday, September 27, 2016 at 12:27:14 PM UTC-6, Snit wrote:
> > On 9/27/16, 11:00 AM, in article
> > c14db800-e346-4c4f-84d0-3166aa73fd72@googlegroups.com, "tmelmosfire"
> > <tmelmosfire@gmail.com> wrote:
> > 
> > ...
> > >>> There is a "Copy all URLs" extension for chromium.  You can also parse
> > >>> ~/.config/chromium/Default/"Current Session" for them.  "Current Tabs"
> > >>> has old ones, oddly.
> > >> 
> > >> I didn't write what I meant,
> > > 
> > > Fucking shocking.
> > > 
> > >> I should have said that I couldn't
> > >> find a way with javascript.
> > > 
> > > Your new hammer?
> > > 
> > >> In any event, given how he worded
> > >> the challenge, I expected to see an extension, not a script that
> > >> was turned into a service, like his shows.
> > > 
> > > Snit noted that there was no extension so he was trying to find a way to
> > > script it. Your assumption is this means he was not trying to find a way to
> > > script it.
> > > 
> > > Can you be any more lost with the English language, Steven Petruzzellis?
> > 
> > Yes, Carroll was a bit off but he had the basic idea... 
> 
> "I am asking because I had an extension for Safari on OS X 
> which used to do this for me... but with Sierra it is no longer supported. 
> So I wrote my own... " - Snit
> 
> Adding the remainder doesn't change a thing with respect to the info this
> conveys. The phrase, "my own", at this point, is clearly in reference to "an 
> extension for Safari on OS X". It's "interesting" how you and this same 
> stupid puppet keep mangling the language in the exact same ways. LOL!

Dafuk?

> > not going to nit
> > pick him for it. His solution was not as efficient as it could be
> 
> True, but this isn't a case where efficiency comes into play. 
> I realize this will baffle the hell out of you but it's even possible 
> that a longer version of the code is more efficient than a
> shorter version. Unless you perform testing you won't know.

Where did Snit say what you attribute to him?

> > but he
> > admits to not knowing AppleScript. No harm and I appreciate him focusing on
> > tech over trolling.
> 
> Which is more than what you did with my challenge. This is the 
> first (and probably the last) Applescript I've written and, as basic
> as it is,  I still had to wank around looking for info on things like:
> 'AppleScript's text item delimiters'. Even not having the phrase: 
> "as text" stumped me for a bit. 

The fact you wank over Snit is not in question, Steven Petruzzellis

> > I added it because my script can be
> > slow so I wanted to make sure I would not paste before it was done. It does
> > add a nice touch, but not needed.
> 
> Even my longer one works instantaneously, your speed is probably
> driven down by going through the notifications crap, a thing you
> probably wouldn't need it you didn't go through it ;)

A notification is supposed to stay around long enough to be seen fucktard.

> > >> While I fulfilled his challenge as worded, I give kudos to him
> > >> for the addition of the helper method (which eliminates the
> > >> loop altogether):
> > >> 
> > >> - --
> > >> tell application "Safari"
> > >>   set urlObj to (URL of every tab of window 1)
> > >> end tell
> > >> set the clipboard to urlObj as text
> > >> set AppleScript's text item delimiters to "\n"
> > >> - --
> > 
> > Need to set the delimiter before you use it... but that pretty much works.
> 
> There's no "pretty much" about it, once you hit run and save it,
> that script works fine as is.

Show it.

> > Also, the AppleScript editor converts the \n to an actual new line making it
> > harder to read... it is more clear if you use the word return.
> 
> I noticed that when I ran it. Having nothing to do with Applescript,
> personally I'd probably opt to use the ACSII character instead.

Personally you would wank to Snit and then post about it.

> > I updated my
> > script to this:
> > 
> > --------
> > on run
> >   tell application "Safari"
> >     set AppleScript's text item delimiters to return
> >     set theURLs to (URL of every tab of window 1)
> >   end tell
> >   set the clipboard to theURLs as text
> >   display notification "Copied: " & (count of theURLs) & " URLs." as text
> > end run
> > ---------
> > 
> > I tend to use the delimiters in AppleScript less than I "should," or at the
> > very least my using them more would make my scripts more concise and
> > sometimes faster.
> > 
> > > Are you calling a bunch of URLs a URL object? That seems stupid.
> > 
> > Well, it is an object (a list) containing URLs. Nothing wrong with the name.
> 
> I guess even you've noticed too many similarities between you and the 
> ol' puppet here among so many of the threads you both 'work',  so you 
> figure you have to throw the reader off a bit with crap like this.

Just because you use socks does not mean everyone does.

> > >> I think he's crazy for not learning javascript, there are reasons
> > >> Apple is including it.
> > > 
> > > Apple is not in charge of javascript.
> > 
> > Nor is that the implication he is making. JavaScript is more universal than
> > AppleScript.
> 
> We got it, Snit... you're trying (too hard) to sell the idea that you are *different* 
> than your puppet here. Trust me, no one is buying ;)

He does not have to tell anyone he is not me you trolling fucktard.

> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - https://gpgtools.org
> 
> iQIcBAEBCgAGBQJX6sUgAAoJELnOYK54exUCaAYP/1HVDyZlQ1CSTeLuptRPO75f
> sGNoXlWRLo6rgy5EZ/iZRU7ndZb4XWM54ivRzyKD7eEdcXcFwmCcFPrG8Nowe9Og
> Ja60HHqU1SjWs06Pq8DU9RJehRQ+Amtq/SzVsckmhKaZj1CZbkLlyJ9KjdrUTeJn
> BHVjmC2pEzMzVRdaxDV1gU+uYSB9w/7ODVT5G0cFgqUegG7dUjmFBoggXdi+hX+T
> PBrKnQnUmC7aEzbzEg2C3RrtL0VjR9PaT/vnHOoBVDtCRIDTw2v3UIShqoTafkyV
> yvfkaE5BRu0yad/TbzjO29lRlVGnAAZo5RkNA8KYPcqHxQhtV+3jbJFJ6sxSYbSi
> CMWM8n2XZT2dH4RbZWfLqGzeeS/uSvJTHWibztIOFvrwUmbOzt0DrkyqSPPach7q
> 2o6xbsjpq33SWSLTWYefGNXUHs3QlUqf9NYaWfdwq59lfatuOnsebbWrH3bZhO6K
> jPGE75XXIUIBKQcXXVKayBky0DRteyDJDG8DUpfyYe5OwAeYKn0xa7w3MUb97aDi
> HpN9D4AZOwJMRY3SK4dlvOeIqrWdpvSUBv37ZGwoRxHkDcELtYlzjE9IR933AFKw
> ZJkjGyeeME27RKyzMXxbU4Rl3BQbiHmSMN2NjlHYr1wCVu/KCo/O7jXxD59KPJLz
> g1citQmEuD3jQbcFgL4+
> =RglB
> -----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#373035

FromSnit <usenet@gallopinginsanity.com>
Date2016-09-27 13:13 -0700
Message-ID<D41020EF.7EA16%usenet@gallopinginsanity.com>
In reply to#373016
On 9/27/16, 12:38 PM, in article
c973ba41-bd27-466a-a90d-b7ae82b2fc2c@googlegroups.com, "tmelmosfire"
<tmelmosfire@gmail.com> wrote:

...
>>> Yes, Carroll was a bit off but he had the basic idea...
>> 
>> "I am asking because I had an extension for Safari on OS X
>> which used to do this for me... but with Sierra it is no longer supported.
>> So I wrote my own... " - Snit
>> 
>> Adding the remainder doesn't change a thing with respect to the info this
>> conveys. The phrase, "my own", at this point, is clearly in reference to "an
>> extension for Safari on OS X". It's "interesting" how you and this same
>> stupid puppet keep mangling the language in the exact same ways. LOL!
> 
> Dafuk?

Keep in mind I said NOTHING against Carroll's method. Not a word. Just
tested it, though, and his does fail... but he is too busy trolling to have
actually tested his OWN solution or to understand why mine was slower.

>>> not going to nit
>>> pick him for it. His solution was not as efficient as it could be
>> 
>> True, but this isn't a case where efficiency comes into play.
>> I realize this will baffle the hell out of you but it's even possible
>> that a longer version of the code is more efficient than a
>> shorter version. Unless you perform testing you won't know.
> 
> Where did Snit say what you attribute to him?

Nowhere... and he already admitted removing the loop was a good idea.

Again: NOT putting him down for having the loop. He took on the task and did
a so-so job... but not perfect. His only works well when run multiple times
and, I think, as a script and not an application, though I did not test
that.

Mine works even on first run. His does not. It is GROSSLY inefficient and
absurd to require the user to run the script twice just to get the list with
one item on each line.

>>> but he admits to not knowing AppleScript. No harm and I appreciate him
>>> focusing on tech over trolling.
>>> 
>> Which is more than what you did with my challenge. This is the first (and
>> probably the last) Applescript I've written and, as basic as it is,  I still
>> had to wank around looking for info on things like: 'AppleScript's text item
>> delimiters'. Even not having the phrase: "as text" stumped me for a bit.
> 
> The fact you wank over Snit is not in question, Steven Petruzzellis

LOL! 

>>> I added it because my script can be
>>> slow so I wanted to make sure I would not paste before it was done. It does
>>> add a nice touch, but not needed.
>> 
>> Even my longer one works instantaneously, your speed is probably
>> driven down by going through the notifications crap, a thing you
>> probably wouldn't need it you didn't go through it ;)
> 
> A notification is supposed to stay around long enough to be seen fucktard.

You both miss the point: my script also runs instantaneously. Loop or no
loop... delimiters or not... all are instant up to about 20 tabs and in the
real world I would not use it for more than that. So for my needs ALL the
WORKING scripts would be fine (this excludes Carroll's, as I shall show).

What slows it down is typing it to the System Services. Sometimes those take
a second or so to activate. Does not matter WHAT the script is this is going
to still exist. 

The sending of a notification, which Carroll calls "crap," is a great
addition to the service in that it tells me when it is done. Also tells me
the count of URLs (in earlier versions I had it list the but there is
limited room in the notification, so a count is better info for this).
Really, I could have just had it pop up and say "done" -- but the time for
that to be sent is negligible. Carroll is flat out wrong about that.

His trolling is again leading him to make an ass of himself.

>>>>> While I fulfilled his challenge as worded, I give kudos to him
>>>>> for the addition of the helper method (which eliminates the
>>>>> loop altogether):
>>>>> 
>>>>> - --
>>>>> tell application "Safari"
>>>>>   set urlObj to (URL of every tab of window 1)
>>>>> end tell
>>>>> set the clipboard to urlObj as text
>>>>> set AppleScript's text item delimiters to "\n"
>>>>> - --
>>> 
>>> Need to set the delimiter before you use it... but that pretty much works.
>> 
>> There's no "pretty much" about it, once you hit run and save it,
>> that script works fine as is.
> 
> Show it.

I happily will. His script fails. As I told him, he should set the text
delimiters at the top. The script runs sequentially.... it does not set the
delimiters until it gets to that line. Putting it at the END is broken and
it will only work if you run it multiple times in a row.

    <https://youtu.be/T0ucEExduBw>

By the way, the idea of the script going through sequentially is the same in
JavaScript. With both, of course, you can have code which is called from
"below" or called multiple times or even from another file (subroutines or
functions), but it is still called sequentially (the subroutine is not
executed until a line calls it).

The fact Carroll missed this VERY basic idea is actually surprising... esp.
since I had directly told him he had to set the delimiter first and he
DENIED it saying that it works fine as it is. It does not. And the idea he
even has to save at all is wrong... he does not have to "hit run and save
it"... he has to compile it, run it, THEN run it again! Otherwise his fails!

In fact, if he saves is, closes it, re-opens it, and then runs it he will
see it fails... just as I show in my video about what happens the first time
you compile it.

He would have to open it and then run it TWICE to have it work.

But he denies it is inefficient. :)

... 
>> I guess even you've noticed too many similarities between you and the
>> ol' puppet here among so many of the threads you both 'work',  so you
>> figure you have to throw the reader off a bit with crap like this.
> 
> Just because you use socks does not mean everyone does.

Carroll sees me everywhere. I am his William Shatner:
<https://goo.gl/ZMXDjt>.
... 



-- 
* OS X / Linux: What is a file?     <http://youtu.be/_dMbXGLW9PI>
* Mint MATE Trash, Panel, Menu:     <http://youtu.be/C0y74FIf7uE>
* Mint KDE working with folders:    <http://youtu.be/7C9nvniOoE0>
* Mint KDE creating files:          <http://youtu.be/N7-fZJaJUv8>
* Mint KDE help:                    <http://youtu.be/3ikizUd3sa8>
* Mint KDE general navigation:      <http://youtu.be/t9y14yZtQuI>
* Mint KDE bugs or Easter eggs?     <http://youtu.be/CU-whJQvtfA>
* Easy on OS X / Hard on Linux:     <http://youtu.be/D3BPWANQoIk>
* OS / Word Processor Comparison:   <http://youtu.be/w6Qcl-w7s5c>

[toc] | [prev] | [next] | [standalone]


#373049

FromSteve Carroll <fretwizzer@gmail.com>
Date2016-09-27 14:27 -0700
Message-ID<93836af5-902a-48a0-92b0-4d11e91f8798@googlegroups.com>
In reply to#373035
On Tuesday, September 27, 2016 at 2:13:35 PM UTC-6, Snit wrote:
> On 9/27/16, 12:38 PM, in article
> c973ba41-bd27-466a-a90d-b7ae82b2fc2c@googlegroups.com, "tmelmosfire"
> <tmelmosfire@gmail.com> wrote:
> 
> ...
> >>> Yes, Carroll was a bit off but he had the basic idea...
> >> 
> >> "I am asking because I had an extension for Safari on OS X
> >> which used to do this for me... but with Sierra it is no longer supported.
> >> So I wrote my own... " - Snit
> >> 
> >> Adding the remainder doesn't change a thing with respect to the info this
> >> conveys. The phrase, "my own", at this point, is clearly in reference to "an
> >> extension for Safari on OS X". It's "interesting" how you and this same
> >> stupid puppet keep mangling the language in the exact same ways. LOL!
> > 
> > Dafuk?
> 
> Keep in mind I said NOTHING against Carroll's method. Not a word. Just
> tested it, though, and his does fail... but he is too busy trolling to have
> actually tested his OWN solution or to understand why mine was slower.

I just assumed it would do what it did after I 'compiled' it (whatever that means in this context). As you say, I had to hit the 'run' button once for the text to be 'complied' (which is when the newline char disappeared) and then hit it again and it worked.  

<https://vid.me/H9Je>

Moving the delimiter should fix it, like I had in the first one (which I saved as an app and it works fine).

> >>> not going to nit
> >>> pick him for it. His solution was not as efficient as it could be
> >> 
> >> True, but this isn't a case where efficiency comes into play.
> >> I realize this will baffle the hell out of you but it's even possible
> >> that a longer version of the code is more efficient than a
> >> shorter version. Unless you perform testing you won't know.
> > 
> > Where did Snit say what you attribute to him?
> 
> Nowhere... and he already admitted removing the loop was a good idea.

Only from a readability standpoint. As I didn't do any efficiency testing (why would you on something like this?) I can't possibly know how "good" an "idea" it is from that standpoint... and neither can you... unless you test it.
 
> By the way, the idea of the script going through sequentially is the same in
> JavaScript. 

In the execution phase, no doubt... but it'd be news to me that AppleScript sets aside memory space before it enters the execution phase. Then again, never having used it, most anything to do with it would be a  surprise.

> With both, of course, you can have code which is called from
> "below" or called multiple times or even from another file (subroutines or
> functions), but it is still called sequentially (the subroutine is not
> executed until a line calls it).
> 
> The fact Carroll missed this VERY basic idea is actually surprising... esp.

LOL! Why? I'm just a rank amateur, even experienced people who write code miss basic things now and then. The fact is, I wasn't thinking about why it didn't work, I noticed that it *appeared* to work and AppleScript lead me down that garden path (too easily in my opinion).

> since I had directly told him he had to set the delimiter first and he
> DENIED it saying that it works fine as it is.

It looked like it did... and I wasn't going to spend a lot of time on the second version as the first one worked. I actually met the challenge as written... which is more than you did with mine ;) 

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.os.linux.advocacy


csiph-web