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

get mouse position without clicking


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

  • 0

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
  • 0

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

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