If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Mouse auto-move with Ruby ?
7 posts
• Page 1 of 1
Mouse auto-move with Ruby ?
A strange question about mousse and Ruby.
I have a pad/Slider, But i want the user able to click somewhere else to move it.
Using 2 Mouse Area it works, but when the user click on the second place, i want the cursor to jump where is the first control location.
Is it possible to do this in Ruby, to make a move the mousse somewhere here when clicking in the second place ??
I have a pad/Slider, But i want the user able to click somewhere else to move it.
Using 2 Mouse Area it works, but when the user click on the second place, i want the cursor to jump where is the first control location.
Is it possible to do this in Ruby, to make a move the mousse somewhere here when clicking in the second place ??
- Tepeix
- Posts: 361
- Joined: Sat Oct 16, 2021 3:11 pm
Re: Mouse auto-move with Ruby ?
Do you mean a jump function for the slider? So you can drag the handle or click on its “slot” somewhere and the handle will jump to that point?
Or something else (and weird)?
Or something else (and weird)?
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Mouse auto-move with Ruby ?
Not easy to explain..
I want the mouse icon to jump to a position, when click on the second control, so the icon will be at the exact place of the pad control 1. (if not the pad will change value before the user move it)
Don't know if this is possible. One problem might be to know which relative place or offset the icon will need..
I want the mouse icon to jump to a position, when click on the second control, so the icon will be at the exact place of the pad control 1. (if not the pad will change value before the user move it)
Don't know if this is possible. One problem might be to know which relative place or offset the icon will need..
- Attachments
-
- Mouse auto move.png (32.39 KiB) Viewed 11016 times
- Tepeix
- Posts: 361
- Joined: Sat Oct 16, 2021 3:11 pm
Re: Mouse auto-move with Ruby ?
So… you click on the slider’s handle and the mouse cursor moves to the icon where it can drag the square from the right location?
I don’t know if such a thing is possible. If it is, I suspect an exotic Ruby solution would be required (beyond me!).
My understanding of mousey stuff is that control goes over to Windows and there’s some sort of dialogue between Windows and FS. And that sentence tells you all you need to know about what I know about it.
I don’t know if such a thing is possible. If it is, I suspect an exotic Ruby solution would be required (beyond me!).
My understanding of mousey stuff is that control goes over to Windows and there’s some sort of dialogue between Windows and FS. And that sentence tells you all you need to know about what I know about it.
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Mouse auto-move with Ruby ?
Yes, not easy..
In fact i already go to another solution..
Sharing preset, a pad and a slider, the slider could move the pad and the pad the slider and they both use the same preset module.. (quite a mess but more manageable..)
In fact i already go to another solution..
Sharing preset, a pad and a slider, the slider could move the pad and the pad the slider and they both use the same preset module.. (quite a mess but more manageable..)
- Tepeix
- Posts: 361
- Joined: Sat Oct 16, 2021 3:11 pm
Re: Mouse auto-move with Ruby ?
It would be more helpful if you could give some context, because currently I don't see any need for this weird behavior. With context we might be able to suggest another way to go at it.
But if you insist, you'd need to do it with a self-programmed .dll, as mouse control, just like Spogg said, is in the hands of windows. There are functions to reset mouse position, but not available to us in Flowstone, only in winapi.
But if you insist, you'd need to do it with a self-programmed .dll, as mouse control, just like Spogg said, is in the hands of windows. There are functions to reset mouse position, but not available to us in Flowstone, only in winapi.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Mouse auto-move with Ruby ?
All my error with this was to use the prim x-y drag accumulate.. (but it works well for pad)
That's why i needed to move the mouse cursor. If you add another mouse area to it, each area would drag it.
But when you change area, you are in a very different position and the control will suddenly jump to another parameter.
It's possible to do another trick having 2 control, then transmitting the last value from one to another but it's a complex task with lot of wireless link to manage.
But it's even better to use a knob prim with ruby to make the control. In this case i erase the graphic from ruby.
Then i would use the hack function from Mgui prim (that are no more present in alpha but we could import the old prim) this make possible to move a module into another one. So i make it a cursor and the mouse area move with it. This way it's easy to have 2 mouse area that link to the same ruby control. And when we click on the other's one it doesn't reset the parameter but only increment it..
I do this on alpha so could not post an example, hope this image is comprehensible..
That's why i needed to move the mouse cursor. If you add another mouse area to it, each area would drag it.
But when you change area, you are in a very different position and the control will suddenly jump to another parameter.
It's possible to do another trick having 2 control, then transmitting the last value from one to another but it's a complex task with lot of wireless link to manage.
But it's even better to use a knob prim with ruby to make the control. In this case i erase the graphic from ruby.
Then i would use the hack function from Mgui prim (that are no more present in alpha but we could import the old prim) this make possible to move a module into another one. So i make it a cursor and the mouse area move with it. This way it's easy to have 2 mouse area that link to the same ruby control. And when we click on the other's one it doesn't reset the parameter but only increment it..
I do this on alpha so could not post an example, hope this image is comprehensible..
- Attachments
-
- Pad and Control sharing.png (917.2 KiB) Viewed 10885 times
- Tepeix
- Posts: 361
- Joined: Sat Oct 16, 2021 3:11 pm
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 62 guests