Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Archived

This topic is now archived and is closed to further replies.

  • 0
CptMercury

get mouse position without clicking

Question

Hey guys,

I tried to get the mouse position without having to perform some kind of mouse input. But I can't figure out how this might be doable.

One idea I had was looking in the OpenOS files, since some events like "component_available"  are actually pushed by the code using computer.pushSignal, but I wasn't able to find something similar for the screen events like "touch" or "drag". Does anyone know if those screen events are pushed in an similar way by Lua code or knows a different approach to get the mouse position?

Thank you in advance 

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

ok, and i guess there is no way to trigger a component event other than actually performing the event, right?

Would be a great feature tho, if we were able to triggee these component events with some lua coding...

Share this post


Link to post
Share on other sites

Yeah, i know, but pushing the event will just carry the information you gave it when calling computer.pushSignal. So using computer.pushSignal(”touch”) will not carry any information except the event name. It will just push an event called ”touch” but its not the same as the touch event pushed by the component. 

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.