View Single Post
Old 03-07-2018, 05:57 PM   #411
mdp
Wizard
mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.
 
Posts: 1,481
Karma: 9010563
Join Date: Jul 2013
Device: none
...and it works like a charm!

I cannot finish the script, but already like it is (dirty, with hardcoded values etc.) it plain works! Check the video out! :champagne:

The core, for quick replication of the results:

Code:
	while not stdout_reader.eof():
		while not stdout_queue.empty():
			line = stdout_queue.get()
			print(line)
			m = line_re.match(line)
			if m:
				e = int(m.group("e"))
				x = int(m.group("x"))*2104/2200
				y = int(m.group("y"))*1560/1650
				if(e==0):
					mouse.press(x,y)
				elif(e==1):
					mouse.release(x,y)
Another thing to do: first a loop to exhaust the queue (to eliminate the old commands in the log without them having effect)...

The Onyx Monitor software fully improved to a touchscreen. I am impressed myself...
Attached Files
File Type: zip Onyx_HDMI_Monitor_Touchscreen_test.mp4.zip (4.88 MB, 212 views)
mdp is offline   Reply With Quote