MouseClick
Moderators: Lavish Software Team, Moderators
MouseClick
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:)
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:)
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).
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).
If it works on windows but not on objects, maybe it needs a wait between the press and release?
I can probably fix it to work like keyboard emulation, where a wait is automatically done between the press and release. Let me know.
Code: Select all
mouseclick -hold left
waitframe
mouseclick -release left
Code: Select all
mouseclick -hold left
waitframe
mouseclick -release left
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:
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?
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
Is this something Amadeus is going to need to look at, or were you still looking into a fix?
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.
The change to MouseClick seems to be working fine.
I'm curious what you meant when you said
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)
I'm curious what you meant when you said
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'.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.
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)
I took a closer look at Innerspace.txt and I see
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?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
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)?
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)?
Code: Select all
Beta 0.96 Build 2093
- Fixed mouse emulation issues in EverQuest II (and possibly other games)