MouseClick

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Blazer
GamingTools Subscriber
Posts: 38
Joined: Tue Jul 20, 2004 8:22 am

MouseClick

Post by Blazer » Wed Jun 01, 2005 7:47 am

With EQ2. MouseTo works fine.
MouseClick right
or
MouseClick left

do absolutely nothing! Even if i moved the focus of the mouse away from the eq2 window.

Unless of course I need to have some obscure setting on?:)

Also, I think a MouseClick dblleft or dblright wouldnt be a bad idea for double clicks:)

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Wed Jun 01, 2005 10:55 am

Hmmm I swear I've tested click emulation with EQ2. I'll check it again

Thanks for the suggestion for double clicking also

Darkgecko
Non-Subscriber
Posts: 23
Joined: Sun Sep 26, 2004 5:04 am

Post by Darkgecko » Tue Jun 07, 2005 9:35 pm

My experience with EQ2 and IS is that MouseTo and MouseClick work as advertised as long as that session is the focus.

Example:
mouseto 349,837
wait 5
mouseclick left
wait 4
mouseclick left

No issues, mouseclick and mouseto work fine, but go to another IS session, and nothing happens in either.

The 'Lock Foreground' setting works for key presses but not mouse commands.

Example:
press -hold w
wait 5
press -release w
wait 5

Will work in a background session with 'Lock Foreground' set as advertised, but not at all without it set (as advertised).

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Wed Jun 08, 2005 5:30 pm

I'm working on this. It's apparently not handled the same as keyboard. You might need Amadeus to put something in ISXEQ2 for mouse handling after all.

Blazer
GamingTools Subscriber
Posts: 38
Joined: Tue Jul 20, 2004 8:22 am

Post by Blazer » Wed Jun 08, 2005 6:24 pm

Yeh its somewhat strange. The mouseclick seems to work on pop up windows in eq2, but when you try to use it on objects in the game, it doesnt.

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Thu Jun 09, 2005 10:04 am

If it works on windows but not on objects, maybe it needs a wait between the press and release?

Code: Select all

mouseclick -hold left
waitframe
mouseclick -release left
I can probably fix it to work like keyboard emulation, where a wait is automatically done between the press and release. Let me know.

Blazer
GamingTools Subscriber
Posts: 38
Joined: Tue Jul 20, 2004 8:22 am

Post by Blazer » Tue Jun 14, 2005 7:52 am

Code: Select all

mouseclick -hold left 
waitframe 
mouseclick -release left
Tested that, and it worked great!

Darkgecko
Non-Subscriber
Posts: 23
Joined: Sun Sep 26, 2004 5:04 am

Post by Darkgecko » Tue Jun 14, 2005 10:30 am

I did a bit more testing with this in one of my scripts, and MouseClick works fine when it's done like that.
MouseTo on the other hand doesn't work unless in focus. Oddly I'll run something like this:

Code: Select all

mouseto 349,837
mouseclick -hold left
waitframe
mouseclick -release left
wait 5
and it works great, but if I go to another window, it will MouseClick in that background session still, just at the wrong MouseLoc becuase I've moved the mouse in another application, heh. So it's closing windows and clicking spells in background session, but not controlling the mouse.

Is this something Amadeus is going to need to look at, or were you still looking into a fix?

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Tue Jun 14, 2005 10:41 am

As far as I've tested, and as far as the code is written, it should work fine. If you've moved the mouse over the EQ2 window at all after doing mouseto, the location of the mouse changes. It doesnt change if you're in another application and moving it there, ONLY when either a) you use mouseto, or b) move the mouse over the EQ2 window. I could modify it slightly so that moving the mouse over the window has no effect if it's not the foreground window. That's probably what I need to do in order for it to work exactly as desired.

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Tue Jun 14, 2005 11:40 am

I've made the described change for the next build. We'll see if that solves your issue :)

I've also modified the click emulation so that it uses the delayed release of the button, just like the keyboard emulation delays the release of keys.

Darkgecko
Non-Subscriber
Posts: 23
Joined: Sun Sep 26, 2004 5:04 am

Post by Darkgecko » Sun Jun 19, 2005 1:58 am

The change to MouseClick seems to be working fine.

I'm curious what you meant when you said
I could modify it slightly so that moving the mouse over the window has no effect if it's not the foreground window. That's probably what I need to do in order for it to work exactly as desired.
At the moment, I have 3 IS sessions open, all running EQ2. I have each session on a different profile, all 3 profiles set to 'Lock Foreground'.

If I run a script in session #1 that uses MouseTo and MouseClick, it works fine. If I alt + tab to session #2 and leave the mouse in the location it is, the script in session #1 continues to run, but the MouseTo is not executed.

If I then move the mouse in session #2, it also moves it in session #1. If I then alt + tab back to session #1, the mouse starts moving because of the MouseTo command.

So my question is, you said you would make it so that the mouse wouldn't move unless it was the foreground session, but I've got the profile set to always make EQ2 think it is the foreground session. Is this stopping whatever change you made in the last IS update?

To make it simple, I want to be able to control the mouse and keyboard independently in each IS session I open, and not have that affected by what I am doing in other sessions and applications, much like it was in EQ1 with MQ2. Perhaps it's impossible with the way EQ2 is coded.

(I didnt see any of these changes commented when the new version of IS downloaded, so maybe I'm jumping the gun and you haven't even done it yet, heh)

Darkgecko
Non-Subscriber
Posts: 23
Joined: Sun Sep 26, 2004 5:04 am

Post by Darkgecko » Sun Jun 19, 2005 6:17 am

I took a closer look at Innerspace.txt and I see
Beta 0.95 Build 2077
- LavishScript 1.26 - http://www.lavishsoft.com/wiki/index.ph ... ease_Notes
- Win32 mouse click emulation now uses the same delay before releasing the button that the
key press emulation uses
- Win32 mouse position emulation now ignores manual mouse movement when the window is not
foreground
Under Games & Profiles --> Everquest 2 --> Input Systems; I have Win32I Mouse | On and Win32I Keyboard | On. DirectInput8 is off for mouse and keyboard. I can confirm that the Innerspace Sessions are not ignoring manual mouse movements, wether it is the foreground session or not. Am I missing a setting?

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Sun Jun 19, 2005 9:48 am

I think you're misunderstanding the changelog, and possibly how the mouse works.

When you use MouseTo in a background session, you do not visually see the mouse cursor move. When you use it in a foreground session, you do. When you switch to a session, it becomes foreground, and the session may immediately receive a windows message that indicates the mouse moved (to where the cursor currently is when you switch).

If you are in session 2, only session 2 knows the mouse is moving, unless you move the mouse physically over the session 1 window. In fact, if you move the cursor out of the session 2 window, even IT doesnt know the mouse is moving.

Now.. with the changes I've made, windows do in fact completely ignore manual mouse movement unless they are the foreground window (IS is not affected by the lock foreground -- it knows).

I can confirm that everything described above is working as described. I've placed 2 EQ2 windows side by side, and made an alias on session 1 like this: "alias blah echo ${Mouse.X} ${Mouse.Y}". Then on session 2, I do this "uplink relay is1 blah". Having the console open in both windows, I relay the command and watch the mouse coordinates in session 1. Any time I move the mouse while session 2 is the foreground window, the coordinates on is1 never change. Ever. However, if I "uplink relay is1 mouseto 0,0" or such, the mouse coordinates do in fact change.

Now to figure out why you're having problems. Does the above described test work for you? Do you have EQ2 set to be in Full screen or windowed in the game (I'm testing windowed)? Are you using Force Window (you shouldnt be)?

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Sun Jun 19, 2005 9:56 am

It seems the problem now is simply that EQ2 is ignoring the actual click location, and trying to retrieve the current mouse position (not that it's getting the movement). I'm doing some testing.

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Sun Jun 19, 2005 10:23 am

Code: Select all

Beta 0.96 Build 2093
- Fixed mouse emulation issues in EverQuest II (and possibly other games)
Confirmed to be working as desired.

Post Reply