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


Groups > linux.debian.user > #248118

Re: which program can show X/Y position of mouse pointer

From Michael Lange <klappnase@freenet.de>
Newsgroups linux.debian.user
Subject Re: which program can show X/Y position of mouse pointer
Date 2022-05-12 11:00 +0200
Message-ID <EmcPU-eWnZ-5@gated-at.bofh.it> (permalink)
References <El9hn-ej4N-1@gated-at.bofh.it> <El9Kp-ejts-7@gated-at.bofh.it> <ElQPn-eJqg-3@gated-at.bofh.it> <Em6U9-eSRD-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

On Wed, 11 May 2022 22:34:00 -0400
lou <loushanguan2015@sina.com> wrote:

> 
> Thank Michael Lange!
> 
> it's what i need, and it works fine in twm

I am glad if I could help.

Btw, I noticed there is a small bug in the script, there should be an
additional line towards the script's end, so that the end of the script
looks like:

root.bind('<1>', quit)
for sig in (2, 3, 6, 15):
    signal(sig, quit)
root.wm_protocol('WM_DELETE_WINDOW', quit) # I forgot this the other day
root.update_idletasks()
start()
root.deiconify()
root.mainloop()
root.destroy()


There shouldn't happen anything nasty without this "WM-protocol" handler,
however when the window is removed by the window manager, without this
line some ugly "crash message" might show up.

> 
> no wonder python is so popular these days

I guess this could be done with even fewer lines of code when written in
Tcl/Tk, I am just more familiar with Python ;)

> 
> PS: why isn't there some existing application that can do this job? is 
> my need too special?
> 

Actually there is at least one:

https://sourceforge.net/projects/mouseposition/

It works here, looks like it just didn't make it into debian.

Have a nice day,

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

No one wants war.
		-- Kirk, "Errand of Mercy", stardate 3201.7

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

which program can show X/Y position of mouse pointer lou <loushanguan2015@sina.com> - 2022-05-09 13:00 +0200
  Re: which program can show X/Y position of mouse pointer Dan Ritter <dsr@randomstring.org> - 2022-05-09 13:30 +0200
    Re: which program can show X/Y position of mouse pointer lou <loushanguan2015@sina.com> - 2022-05-09 14:00 +0200
      Re: which program can show X/Y position of mouse pointer Dan Ritter <dsr@randomstring.org> - 2022-05-09 15:40 +0200
        Re: which program can show X/Y position of mouse pointer lou <loushanguan2015@sina.com> - 2022-05-10 01:30 +0200
          Re: which program can show X/Y position of mouse pointer David Wright <deblis@lionunicorn.co.uk> - 2022-05-10 03:50 +0200
    Re: which program can show X/Y position of mouse pointer Michael Lange <klappnase@freenet.de> - 2022-05-11 11:30 +0200
      Re: which program can show X/Y position of mouse pointer lou <loushanguan2015@sina.com> - 2022-05-12 04:40 +0200
        Re: which program can show X/Y position of mouse pointer Michael Lange <klappnase@freenet.de> - 2022-05-12 11:00 +0200
  Re: which program can show X/Y position of mouse pointer John Hasler <john@sugarbit.com> - 2022-05-10 02:50 +0200

csiph-web