FAQ  •  Register  •  Login

Can I detect when a region in a VFX viewer is clicked?

Moderator: MiRai

<<

alanwj

Posts: 15

Joined: Sun Jun 11, 2023 10:22 pm

Post Thu Jul 18, 2024 12:38 pm

Can I detect when a region in a VFX viewer is clicked?

I have created a hotkey that opens a VFX viewer to another window. The VFX source window has a couple of buttons that I would like to be able to click, and when I click either of them I'd like the VFX viewer to go away. This requires ISBoxer to know when a particular part of the VFX viewer has been clicked.

The first thing I tried was to put single button clickbars in the active window (the one with the VFX viewer) that exactly cover the target buttons. This, of course, can detect clicks. However, when I choose "Click-thru", the clickbar buttons click through to the original window instead of to the VFX underneath!

So next I tried putting those same clickbars over the buttons in the VFX source window. The VFX viewer shows the clickbars just fine. However, clicking through the VFX doesn't click the click bars in the source window!

(Both of these seem like bugs, btw.)

I am considering trying to layer a clickbar and a repeater region. I suspect that would run into similar issues. Though it appears you cannot create a repeater region from an ISBoxer config, which limits the attractiveness of this solution even if it works.

Are there any obvious solutions I may be missing?
<<

bob

User avatar

League of Extraordinary Multiboxers

Posts: 4652

Joined: Sat Feb 15, 2014 11:14 am

Location: In the dining room, with the lead pipe.

Post Thu Jul 18, 2024 6:06 pm

Re: Can I detect when a region in a VFX viewer is clicked?

You are hitting the limitations which are present in putting overlays on windows and the Windows APIs that are used to create VFX, and the input system.
Those limitations are not bugs, but rather a combination of factors that have small annoyances when attempting to get them to all work together.


Assuming you don't want to use the VFX Viewer for anything else other that viewing and potentially clicking these two buttons (well really just performing a single mouse click before closing the viewer), what you can do is
  1. Don't set the VFX viewer as passthrough

  2. Create a new Key Map for VFX Click and Close. Assign to your team. (actually this is not necessary, you can use any Key Map that will be active on your team).

  3. Create a mapped key in this new Key Map, which has a hotkey of Mouse1.
    Now this part could be set up in quite a few different ways. This is the easiest IMO.
    It will have two steps.
    Step 1 should do a Mouse Sync Action and set a target of the VFX Source Window.
    Step 2 has a few actions.
    1. do a Keystroke Action and send Mouse1 with a target of the VFX Source Window.
    2. VFX Action to hide/destroy (depends on how you show the VFX Source) the VFX Viewer. Use a timer on this to delay the action for o.1 seconds (name the "group", max timers of 1, new ones will be ignored, don't set auto recurring).
    3. Mapped Key State Action to disable this mapped key. Use a timer on this to delay the action for 0.1 seconds (you can probably use the same timer group for both actions).

    Set this Mapped key to execute a step on press OR release
    Set this Mapped key to start DISABLED.

  4. Create a second Mapped Key.
    This will have no hotkey.
    It should be set to execute on press.
    It has 1 step with an action for a Mapped Key State Action to enable the first mapped key.

  5. On your VFXViewer, set the second mapped key to execute when you mouse into the viewer (depending on how you create the viewer the wording is slightly different, but it is the mapped key selection that is available on a viewer being created).
<<

bob

User avatar

League of Extraordinary Multiboxers

Posts: 4652

Joined: Sat Feb 15, 2014 11:14 am

Location: In the dining room, with the lead pipe.

Post Thu Jul 18, 2024 6:17 pm

Re: Can I detect when a region in a VFX viewer is clicked?

alanwj wrote:The first thing I tried was to put single button clickbars in the active window (the one with the VFX viewer) that exactly cover the target buttons. This, of course, can detect clicks. However, when I choose "Click-thru", the clickbar buttons click through to the original window instead of to the VFX underneath!


Actually, this should work if you use a mapped key associated with the click bar button that
1. Did a sync cursor action
2. Sent a Mouse1 to the source window
3. Hide/Destroy the VFX viewer
4. Hide the clickbar (use a timer on this to delay it briefly).

If you need a delay between the sync cursor action and the sending of the Mouse1, then use a two step mapped key with the execute a step on press OR release and put the sync cursor action in step 1 and the remaining actions in step 2.
<<

alanwj

Posts: 15

Joined: Sun Jun 11, 2023 10:22 pm

Post Thu Jul 18, 2024 7:30 pm

Re: Can I detect when a region in a VFX viewer is clicked?

bob wrote:1. Did a sync cursor action
2. Sent a Mouse1 to the source window


Thanks so much for the replies!

I don't think I actually realized there was a way to send a mouse click to another window short of repeaters or "Send Next Click Action". I will try tonight, but this really sounds like it should work.

If I understand this correctly, it does have the limitation that the VFX viewer is placed in the exact location on the screen as the VFX source (so that Sync Cursor Action puts the mouse in the right place). Luckily that is true for my use case here. Just for future reference, I assume there is no way to send a click to an arbitrarily chosen location?
<<

bob

User avatar

League of Extraordinary Multiboxers

Posts: 4652

Joined: Sat Feb 15, 2014 11:14 am

Location: In the dining room, with the lead pipe.

Post Thu Jul 18, 2024 8:18 pm

Re: Can I detect when a region in a VFX viewer is clicked?

mmm, good point on the sync cursor action. It might end up trying to position relatively. It's been a while so I can't recall the exact behaviour when via a VFX viewer. But, it'll be something to try.

If it does not, then it can still be worked around using my initial response, which is essentially going to be to set the VFX Viewer to passthrough the mouse, and you will no longer need the sync cursor action.
The rest will still be required as we still need to capture the click and send that through, and we also want to close the viewer.

To answer the follow up. There is not a built in method to pass a click to a specific location that is not the last position of the mouse on a given window. i.e. there is no method to specify co-ordinates for a mouse click. Its a specific limit to prevent bot building in ISBoxer (the other limitation is that you can't use a timer on an action that directly interacts with a game).
<<

alanwj

Posts: 15

Joined: Sun Jun 11, 2023 10:22 pm

Post Fri Jul 19, 2024 2:41 am

Re: Can I detect when a region in a VFX viewer is clicked?

Your first solution is very clever. I had wondered before about the utility of executing a key when entering a VFX viewer, and this is a great example.

I do need to interact through the VFX, but if I have to I could work around that by just splitting into two VFX viewers. One for the bit I need to interact with, and the other for the buttons, which uses the trick you outlined.
<<

alanwj

Posts: 15

Joined: Sun Jun 11, 2023 10:22 pm

Post Fri Jul 19, 2024 1:42 pm

Re: Can I detect when a region in a VFX viewer is clicked?

I tried to build a proof of concept out of this and I'm finding that sending Mouse1 does not appear to actually send a click.

The source window for my proof of concept test is slot 6.

I have a "press OR release" mapped key with steps.
1: Sync Cursor Action -> 6
2: Keystroke Action (Mouse1) -> 6

I can see through the VFX viewer that the sync cursor is happening correctly, but the keystroke action doesn't appear to cause a click to happen.

Any thoughts on how to debug that? (The game in question is Everquest, if that matters.)
<<

bob

User avatar

League of Extraordinary Multiboxers

Posts: 4652

Joined: Sat Feb 15, 2014 11:14 am

Location: In the dining room, with the lead pipe.

Post Fri Jul 19, 2024 4:46 pm

Re: Can I detect when a region in a VFX viewer is clicked?

Mouse1 is most definitely intended to be Left Click of a mouse button.

there are two choices I see for further testing.
1. Disable the New Virtual Input system in the Inner Space configuration and see if it then works (you will need to exit and restart the games AND Inner Space)..
2. Set the "hold" option on the mapped key.
<<

alanwj

Posts: 15

Joined: Sun Jun 11, 2023 10:22 pm

Post Fri Jul 19, 2024 7:32 pm

Re: Can I detect when a region in a VFX viewer is clicked?

In a quick test that appears to work.

I set the key to held and the Cursor Sync and Mouse1 actions in the same step (since a held key disables the "pressed OR released" option). I haven't plugged it all together into the working solution yet, but definitely clicks are getting sent to the correct locations in the other window.

Thanks for all the help in putting all the pieces for this together.

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests