Skip to main content
news

Re: Ping Owl: More examples...

Snit
SubjectRe: Ping Owl: More examples of "window 1"
FromSnit
Date09/23/2016 19:48 (09/23/2016 10:48)
Message-ID<D40AB8F1.7E2F5%usenet@gallopinginsanity.com>
Client
Newsgroupscomp.os.linux.advocacy
FollowsOctavian W. Lagrange
FollowupsOctavian W. Lagrange (26m) > Snit

On 9/23/16, 10:26 AM, in article hugu7ae.jigue@perch.invalid, "Octavian W. Lagrange" <olagrang@perch.invalid>wrote:

...

Snit
OK, so you are still baffled. If you want to learn I am happy to help where I can.

Octavian W. Lagrange
Why all of the sudden are you going to be helpul? You thus far have shared only your confusion.

Listen, I know you feel the need to please the others who troll COLA... but, really, when you already posted the proof of your confusion why deny it now?

Again, and I want to be very clear on this, I am NOT putting you down for not understanding how AppleScript and the scripting system it works with handle things. Not at all. But remember how this started... YOU asked to help with understanding:

Owl: ----- I ask this because it appears that you are just instantiating Terminal and looping with actions on "Window 1" Help me understand that applescript: What part of the loop starts a new terminal so that "window 1" makes sense as referring to a different terminal? -----

So I helped:

Snit: ----- When you tell it do to a new command it does it in a new window by default. I can also, I think, send commands to specific windows. Window 1 is the top window on the stack. -----

Since then I have played and, as I expected, I can send commands to specific windows... either by ID or index (and likely more, but that is all I played with). This makes sense and it would have been odd if I could not have!

During the conversation you also made some pretty bone-headed errors... which HAPPENS. Again, NOT putting you down for it... we ALL make mistakes, esp. when learning. But since you are trolling me and pretending to be so amazingly knowledgably, let us remind you of one of your brain-farts:

Owl: ----- What is "doscript theCommand"? Is that a separate script? -----

If I was like you and those who troll COLA I could have ripped you a new one for such an amazingly ignorant question. Did I? Nope! Here was my response: ----- OK, I know you are a good enough scripter where this is just a brain-fart on your part. Look at the line above where "theCommand" is defined. -----

Yeah, you missed something obvious. So what. I noted it and moved on... only bringing it up again in the meta-debate you are pushing to try to please those who troll COLA. Anyway, back to your confusion about what AppleScript was referencing:

Owl: ----- I believe Sandman says it switches to that running instance, so it would seem that any commands you "tell" it would affect those windows, if they were referenced by the same name ("front window", "window 1", etc). ------

This was wrong. It does not switch to a different instance... in ALL the examples I have shown you there has been ONLY one instance. Yes, you CAN have more, but it is very uncommon. Heck, Sandman spoke of copying the binary just to get a new instance (which was a mistake he should not have made and has since trolled me over).

You STILL thought that each script had its own "window 1" -- even though the "window 1" in discussion was the TERMINAL's window:

Owl: ----- So a second script that references a terminal's "Window 1" will send commands to another script's terminal "Window 1"? -----

At least at that time you thought each script had its own "window 1" which is completely and utterly incorrect. Time and time again I let you know how things worked:

----- Window 1 is always the front window. If you have two scripts running and altering which is the front then, sure, you can have problems. -----

This, of course, would apply to other windows than the front one or any other! But you STILL did not get it and KEPT asking the same thing over and over:

Owl: ----- Let's say two scripts are running, each making reference to Terminal's "Window 1". They each have to wait for something, then do something again with "Window 1". If we don't know which wait will complete first, is it possible for them to screw the pooch on this and do the "something" with the wrong window? -----

So I let you know AGAIN! ----- Sure... if you have two scripts working with the same object and you do not know what order they are doing things you can run into errors. -----

But you you were STILL lost!

Owl: ------ The scripts don't realize that they are working with anything but the object they created, which they both know as "Window 1". -----

NO! NO! And NO! They do not care what "they" created. Your idea on this was completely and utterly wrong. But you thought each script had its own terminal window 1 (when the reality is the terminal has that window):

Owl: ----- Script 1 thinks "Window 1" is the one connected to 10.0.1.2. Script 2 thinks "Window 1" is the one connected to 192.168.1.3. See a problem yet? -----

So the question now is if you get it yet? I hope so. And I spent some time writing a couple scripts to help you understand:

<https://youtu.be/sMdAFTvkpMY>

Notice I reference windows by ID and even by "everyone window." The first script does not own the objects of the terminal!

But instead of talking about that you pretend I did not know that referencing a window as "window 1" would not... ummm... what? Let another script work with it? Cause possible problems if a user clicked a window to change the stacking order? Just what are you even accusing me of? I do not think you even know!

Snit
is now obvious to you. THAT is what the goal was here -- to help you learn what you were asking about.

Octavian W. Lagrange
I never learned why you think having a script reference "Window 1" is a good idea. There must be no answer to that one.

Snit
Well, you still have come a far way... it was not long ago you were talking about each script having its own window 1 for terminal, about having different instances of terminal... and even implications that if I referenced it with the ID and not the index that would prevent some other (hostile?) script compete with it.

Octavian W. Lagrange
I never said anything about *preventing another script* from targeting the window.

You were clearly and obviously completely confused. See above.

The point is that you want *your script* to target the *correct* window.

Sure. And they did.

Snit
To look good for your friends you had to pretend you were just trolling me, but in the end I think you really wanted to learn and I hope you have.

Octavian W. Lagrange
Wait, you kept claiming I was trolling you.

Snit
Of course you were. And are.

Octavian W. Lagrange
Now your claim is that I was pretending to troll you.

Snit
Nope.

Octavian W. Lagrange
Snit : "... you had to pretend you were just trolling me..."

Right. That is your new game. Sure. But even that you lie about and go into meta debate mod and misinterpret that. Why?

Are you unable to be honest? Is trolling me and working to please others who troll me REALLY that important to you?

Which is it? See above, still quoted, where you say, "even with you trolling me..." Just think, if you had a mind, maybe you could make it up.

Snit
Re-read what you read. :)

Octavian W. Lagrange
Still quoted above in this post we have from you:

"By the way, even with you trolling me..."

and:

"... you had to pretend you were just trolling me..."

So? That has nothing to do with you claim:

Owl: ----- Now your claim is that I was pretending to troll you. -----

You made that up. OK.

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