Jump to content




Mouse clicking on monitors

lua

  • You cannot reply to this topic
5 replies to this topic

#1 Micheal Pearce

  • Members
  • 87 posts
  • LocationUSA

Posted 15 April 2013 - 10:25 AM

how do you get input on mouse click from the monitor i know it possible because you can paint with the monitor i just can find the code to do it

#2 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 15 April 2013 - 10:35 AM

Mouse clicking is only possible on an advanced computer.
This snippet will wait until a click:
local event, button, x, y = os.pullEvent('mouse_click')

Event is 'mouse_click'
button is wich butten you clicked -> 1 left; 2 right; 3 scroll thingie
x and y is the postion where is clicked on the screen

#3 Micheal Pearce

  • Members
  • 87 posts
  • LocationUSA

Posted 15 April 2013 - 10:41 AM

its also possible on Adv, monitors too because you can paint on Adv. monitors with the program paint

#4 Mailmanq!

  • Members
  • 123 posts
  • LocationI am omnipresent... DUH

Posted 15 April 2013 - 10:42 AM

To get clicks from an advanced monitor, do
local event, side, x, y = os.pullEvent("monitor_touch")
side -left, right, top, bottom, front, or back.
x - The x position of where the touched.
y - The y position of where the touched.

#5 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 15 April 2013 - 10:45 AM

the side in the monitor touch event is the side that the monitor is on the computer.

#6 Micheal Pearce

  • Members
  • 87 posts
  • LocationUSA

Posted 15 April 2013 - 10:55 AM

 mailmanq, on 15 April 2013 - 10:42 AM, said:

To get clicks from an advanced monitor, do
local event, side, x, y = os.pullEvent("monitor_touch")
side -left, right, top, bottom, front, or back.
x - The x position of where the touched.
y - The y position of where the touched.
thanks





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users