Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Variables don't; constants aren't.


devel / comp.lang.tcl / Screen coordinates

SubjectAuthor
* Screen coordinatesmikkelstuff
+- Screen coordinatesRich
+* Screen coordinatesLuc
|`* Screen coordinatesmikkelstuff
| `- Screen coordinatesLuc
`* Screen coordinatesFrancois Vogel
 `* verify windows user (also) from Active DirectoryHarald Oehlmann
  `* verify windows user (also) from Active DirectoryRalf Fassel
   `- verify windows user (also) from Active DirectoryHarald Oehlmann

1
Screen coordinates

<0e288f90-a418-4713-9b8d-1195ed9b0e4en@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10533&group=comp.lang.tcl#10533

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:ac8:54a:0:b0:3ae:d88a:7d1d with SMTP id c10-20020ac8054a000000b003aed88a7d1dmr601332qth.538.1673663169925;
Fri, 13 Jan 2023 18:26:09 -0800 (PST)
X-Received: by 2002:a5b:309:0:b0:703:e000:287 with SMTP id j9-20020a5b0309000000b00703e0000287mr8770327ybp.171.1673663169717;
Fri, 13 Jan 2023 18:26:09 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Fri, 13 Jan 2023 18:26:09 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=97.118.23.249; posting-account=745rOQoAAAAWxjxc-ncDVcct-2-8Sap-
NNTP-Posting-Host: 97.118.23.249
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0e288f90-a418-4713-9b8d-1195ed9b0e4en@googlegroups.com>
Subject: Screen coordinates
From: clark.mi...@gmail.com (mikkelstuff)
Injection-Date: Sat, 14 Jan 2023 02:26:09 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1118
 by: mikkelstuff - Sat, 14 Jan 2023 02:26 UTC

I need to capture the screen coordinates when touching a left mouse button. Seems like "canvas" should do this but I just do not see it. Any other ideas?

Re: Screen coordinates

<tpt7db$1s195$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10534&group=comp.lang.tcl#10534

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ric...@example.invalid (Rich)
Newsgroups: comp.lang.tcl
Subject: Re: Screen coordinates
Date: Sat, 14 Jan 2023 03:26:35 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <tpt7db$1s195$1@dont-email.me>
References: <0e288f90-a418-4713-9b8d-1195ed9b0e4en@googlegroups.com>
Injection-Date: Sat, 14 Jan 2023 03:26:35 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="6caf72596b56901e77d701eb307eec1d";
logging-data="1967397"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+AeWqIbdDYRozQO2U0sjDz"
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.10.17 (x86_64))
Cancel-Lock: sha1:Fe2vintZB/OtvDhJxlTT23oj1WQ=
 by: Rich - Sat, 14 Jan 2023 03:26 UTC

mikkelstuff <clark.mikkelsen@gmail.com> wrote:
> I need to capture the screen coordinates when touching a left mouse
> button. Seems like "canvas" should do this but I just do not see it.
> Any other ideas?

Do the %X and %Y substitutions for bindings not provide what you are
looking for?

Or 'winfo pointerxy'?

Re: Screen coordinates

<20230114143120.0fdf17af@lud1.home>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10535&group=comp.lang.tcl#10535

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!dU8NMPZdTSqduECtNbhQMA.user.46.165.242.75.POSTED!not-for-mail
From: no...@no.no (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: Screen coordinates
Date: Sat, 14 Jan 2023 14:31:20 -0300
Organization: Aioe.org NNTP Server
Message-ID: <20230114143120.0fdf17af@lud1.home>
References: <0e288f90-a418-4713-9b8d-1195ed9b0e4en@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="12850"; posting-host="dU8NMPZdTSqduECtNbhQMA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu)
 by: Luc - Sat, 14 Jan 2023 17:31 UTC

On Fri, 13 Jan 2023 18:26:09 -0800 (PST), mikkelstuff wrote:

> I need to capture the screen coordinates when touching a left mouse
> button. Seems like "canvas" should do this but I just do not see it. Any
> other ideas?

bind $canvaswidget <ButtonRelease-1> {$textwidget delete 1.0 end; $textwidget insert end [%W canvasx %x]/[%W canvasy %y]}

or

bind $canvaswidget <ButtonRelease-1> {puts [%W canvasx %x]/[%W canvasy %y]}

--
Luc
>>

Re: Screen coordinates

<1a22f675-03eb-4d23-8902-7fa6698749afn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10536&group=comp.lang.tcl#10536

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:8204:b0:6fa:6424:5d87 with SMTP id ow4-20020a05620a820400b006fa64245d87mr5203053qkn.651.1673727748038;
Sat, 14 Jan 2023 12:22:28 -0800 (PST)
X-Received: by 2002:a05:690c:903:b0:3eb:447b:6840 with SMTP id
cb3-20020a05690c090300b003eb447b6840mr3448172ywb.307.1673727747796; Sat, 14
Jan 2023 12:22:27 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Sat, 14 Jan 2023 12:22:27 -0800 (PST)
In-Reply-To: <20230114143120.0fdf17af@lud1.home>
Injection-Info: google-groups.googlegroups.com; posting-host=97.118.23.249; posting-account=745rOQoAAAAWxjxc-ncDVcct-2-8Sap-
NNTP-Posting-Host: 97.118.23.249
References: <0e288f90-a418-4713-9b8d-1195ed9b0e4en@googlegroups.com> <20230114143120.0fdf17af@lud1.home>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1a22f675-03eb-4d23-8902-7fa6698749afn@googlegroups.com>
Subject: Re: Screen coordinates
From: clark.mi...@gmail.com (mikkelstuff)
Injection-Date: Sat, 14 Jan 2023 20:22:28 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1801
 by: mikkelstuff - Sat, 14 Jan 2023 20:22 UTC

On Saturday, January 14, 2023 at 10:31:25 AM UTC-7, Luc wrote:
> On Fri, 13 Jan 2023 18:26:09 -0800 (PST), mikkelstuff wrote:
>
> > I need to capture the screen coordinates when touching a left mouse
> > button. Seems like "canvas" should do this but I just do not see it. Any
> > other ideas?
> bind $canvaswidget <ButtonRelease-1> {$textwidget delete 1.0 end; $textwidget insert end [%W canvasx %x]/[%W canvasy %y]}
>
> or
>
> bind $canvaswidget <ButtonRelease-1> {puts [%W canvasx %x]/[%W canvasy %y]}
>
>
> --
> Luc
> >>
Got it! Sorry but I have not programmed in Tcl/Tk since retirement and am rusty. Ok, rusty geezer.
Thanks all

Re: Screen coordinates

<20230114175634.3033d4db@lud1.home>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10537&group=comp.lang.tcl#10537

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!dU8NMPZdTSqduECtNbhQMA.user.46.165.242.75.POSTED!not-for-mail
From: no...@no.no (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: Screen coordinates
Date: Sat, 14 Jan 2023 17:56:34 -0300
Organization: Aioe.org NNTP Server
Message-ID: <20230114175634.3033d4db@lud1.home>
References: <0e288f90-a418-4713-9b8d-1195ed9b0e4en@googlegroups.com>
<20230114143120.0fdf17af@lud1.home>
<1a22f675-03eb-4d23-8902-7fa6698749afn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="64082"; posting-host="dU8NMPZdTSqduECtNbhQMA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu)
X-Notice: Filtered by postfilter v. 0.9.2
 by: Luc - Sat, 14 Jan 2023 20:56 UTC

On Sat, 14 Jan 2023 12:22:27 -0800 (PST), mikkelstuff wrote:

> On Saturday, January 14, 2023 at 10:31:25 AM UTC-7, Luc wrote:
> > On Fri, 13 Jan 2023 18:26:09 -0800 (PST), mikkelstuff wrote:
> >
> > > I need to capture the screen coordinates when touching a left mouse
> > > button. Seems like "canvas" should do this but I just do not see it.
> > > Any other ideas?
> > bind $canvaswidget <ButtonRelease-1> {$textwidget delete 1.0 end;
> > $textwidget insert end [%W canvasx %x]/[%W canvasy %y]}
> >
> > or
> >
> > bind $canvaswidget <ButtonRelease-1> {puts [%W canvasx %x]/[%W canvasy
> > %y]}
> >
> >
> > --
> > Luc
> > >>
> Got it! Sorry but I have not programmed in Tcl/Tk since retirement and am
> rusty. Ok, rusty geezer. Thanks all

Please note those are not the coordinates of the screen. They are
the coordinates of the canvas, and the canvas has its own idea of what
x and y mean. I believe a canvas puts 0,0 on the bottom right corner
by default, such that everything you can see sits on negative (less
than zero) coordinates. I'm not really sure though. Anyway, you will
probably have to adjust the position of the canvas yourself before
you use it.

For example:

set ::canvaswidget $::w.outer.canvasframe.canvaswidget
canvas $::canvaswidget
$::canvaswidget configure -bg white
$::canvaswidget configure -height 900 -width 1900
$::canvaswidget configure -xscrollincrement 1
$::canvaswidget configure -yscrollincrement 1
$::canvaswidget configure -scrollregion [list 0 -900 19200 0]
$::canvaswidget xview moveto 0.0
$::canvaswidget yview moveto 0.45

Those values are pretty random here since I don't know what you
want or need. Your case will certainly require different values.

--
Luc
>>

Re: Screen coordinates

<63c4076b$0$22248$426a74cc@news.free.fr>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10541&group=comp.lang.tcl#10541

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-a.proxad.net!nnrp4-1.free.fr!not-for-mail
Date: Sun, 15 Jan 2023 15:02:19 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Subject: Re: Screen coordinates
Content-Language: en-US
Newsgroups: comp.lang.tcl
References: <0e288f90-a418-4713-9b8d-1195ed9b0e4en@googlegroups.com>
From: francois...@gmail.com (Francois Vogel)
In-Reply-To: <0e288f90-a418-4713-9b8d-1195ed9b0e4en@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Antivirus: Avast (VPS 230114-4, 14/1/2023), Outbound message
X-Antivirus-Status: Clean
Lines: 10
Message-ID: <63c4076b$0$22248$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 15 Jan 2023 15:02:20 CET
NNTP-Posting-Host: 82.65.57.56
X-Trace: 1673791340 news-1.free.fr 22248 82.65.57.56:55716
X-Complaints-To: abuse@proxad.net
 by: Francois Vogel - Sun, 15 Jan 2023 14:02 UTC

Le 14/01/2023 à 03:26, mikkelstuff a écrit :
> I need to capture the screen coordinates when touching a left mouse button.

Depending on the coordinates system in which you want to obtain the
values, I suggest reading the manual for [winfo pointerxy] and/or [winfo
rootx/rooty].

Regards,
Francois

verify windows user (also) from Active Directory

<tq3eu0$2ll93$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10544&group=comp.lang.tcl#10544

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: wortka...@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: verify windows user (also) from Active Directory
Date: Mon, 16 Jan 2023 13:11:44 +0100
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <tq3eu0$2ll93$1@dont-email.me>
References: <0e288f90-a418-4713-9b8d-1195ed9b0e4en@googlegroups.com>
<63c4076b$0$22248$426a74cc@news.free.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 16 Jan 2023 12:11:44 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="afa2ab50f2f9ba0066ae86574436c0d8";
logging-data="2807075"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/8xSeNHmanBxT7jXAmZpMO"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:fuQjtKdIamfX64tcdDtPK3YOGM4=
Content-Language: en-GB
In-Reply-To: <63c4076b$0$22248$426a74cc@news.free.fr>
 by: Harald Oehlmann - Mon, 16 Jan 2023 12:11 UTC

Background:
In medical applications (medical device/pharmaceutics), often a user
verification is required, even if the same user is already logged in.
This is to check, if the user is really in front of the screen and
approves the current process.

Request:
In consequence, I would like on a WIndows system to:
- present a Tk screen: Username/Password
- then verify the entered username/password against the system the
computer is in. This may be a local user or a user in the active directory.

TWAPI looks to be helpful here.
get_users -level 1
returns the -password field, what is always empty for me.

Are there any other ideas to find a solution ?

Thank you all,
Harald

Re: verify windows user (also) from Active Directory

<ygalem2a8rt.fsf@akutech.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10545&group=comp.lang.tcl#10545

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!lilly.ping.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralf...@gmx.de (Ralf Fassel)
Newsgroups: comp.lang.tcl
Subject: Re: verify windows user (also) from Active Directory
Date: Mon, 16 Jan 2023 14:50:14 +0100
Lines: 19
Message-ID: <ygalem2a8rt.fsf@akutech.de>
References: <0e288f90-a418-4713-9b8d-1195ed9b0e4en@googlegroups.com>
<63c4076b$0$22248$426a74cc@news.free.fr>
<tq3eu0$2ll93$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net 23wowBIApGk+Ru1HC61hjQZymsd2kfaamVUO3CJo5j7UiKGKI=
Cancel-Lock: sha1:KtRCydKF54DCl9droRE2VvWOGH0= sha1:w3Bg0hz23okDVn3+/f9YbleyrD0=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
 by: Ralf Fassel - Mon, 16 Jan 2023 13:50 UTC

* Harald Oehlmann <wortkarg3@yahoo.com>
| Request:
| In consequence, I would like on a WIndows system to:
| - present a Tk screen: Username/Password
| - then verify the entered username/password against the system the
| computer is in. This may be a local user or a user in the active
| directory.
>
| TWAPI looks to be helpful here.

Check [open_user_token] in TWAPI:

https://twapi.magicsplat.com/v4.7/security.html#open_user_token

It seems to be the wrapper around LogonUser(), which from what I read is
*the* method to verify user/passwd.

HTH
R'

Re: verify windows user (also) from Active Directory

<tq3r2c$2o51h$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10546&group=comp.lang.tcl#10546

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: wortka...@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: verify windows user (also) from Active Directory
Date: Mon, 16 Jan 2023 16:38:52 +0100
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <tq3r2c$2o51h$1@dont-email.me>
References: <0e288f90-a418-4713-9b8d-1195ed9b0e4en@googlegroups.com>
<63c4076b$0$22248$426a74cc@news.free.fr> <tq3eu0$2ll93$1@dont-email.me>
<ygalem2a8rt.fsf@akutech.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 16 Jan 2023 15:38:52 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="afa2ab50f2f9ba0066ae86574436c0d8";
logging-data="2888753"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ISyG7jFkkRCwbxQX+s604"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:lfSdN3AxBGGBGJExPCv3FuzGfYE=
In-Reply-To: <ygalem2a8rt.fsf@akutech.de>
Content-Language: en-GB
 by: Harald Oehlmann - Mon, 16 Jan 2023 15:38 UTC

Am 16.01.2023 um 14:50 schrieb Ralf Fassel:
> * Harald Oehlmann <wortkarg3@yahoo.com>
> | Request:
> | In consequence, I would like on a WIndows system to:
> | - present a Tk screen: Username/Password
> | - then verify the entered username/password against the system the
> | computer is in. This may be a local user or a user in the active
> | directory.
>>
> | TWAPI looks to be helpful here.
>
> Check [open_user_token] in TWAPI:
>
> https://twapi.magicsplat.com/v4.7/security.html#open_user_token
>
> It seems to be the wrapper around LogonUser(), which from what I read is
> *the* method to verify user/passwd.

Wow, great, works great !

Thanks,
Harald


devel / comp.lang.tcl / Screen coordinates

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor