2 instances of eve only foreground with focus can Mouse:SetP
Moderators: Lavish Software Team, Moderators
2 instances of eve only foreground with focus can Mouse:SetP
Haven't tried other game clients, but with Eve, I notice a couple things, just let me know if there's a way to get around this.
I assume that pixelcolor will only work on the foreground client and not one that's covered up, right? pixelcolor must only work on the top 'layer' of the screen i am guessing.
Secondly, I see that I can use a 'Press' key command on a client in the background, that works fine, but, there's no way to allow a Mouse:SetPosition/Mouse:HoldLeft command on a client in the background when a second instance of the client has focus, even if they are side-by-side. Is that also correct? or is there a way to allow a client without focus to execute it's mouse drag.
I assume that pixelcolor will only work on the foreground client and not one that's covered up, right? pixelcolor must only work on the top 'layer' of the screen i am guessing.
Secondly, I see that I can use a 'Press' key command on a client in the background, that works fine, but, there's no way to allow a Mouse:SetPosition/Mouse:HoldLeft command on a client in the background when a second instance of the client has focus, even if they are side-by-side. Is that also correct? or is there a way to allow a client without focus to execute it's mouse drag.
It's all designed to work whether the game is focused or not. When in the foreground, Mouse:SetPosition moves the cursor for you. When in the background, it simply sets the emulated position, which is not visible to you. You can test this by adding a HUD element to show the current position of the mouse:
(alt+left click and drag the left-most character of the HUD element to move it wherever you like)
The only issue might be if the game itself checks if it's the foreground window before allowing the mouse clicks. If it does, you need to check the "Lock Foreground" option for the game in IS's Game Configuration.
Pixel color could go either way. It's been a while so I don't particularly recall the limitation, but it may very well indeed require the window to be topmost.
Either way, using pixel reading and mouse clicks/drags is generally a stopgap solution rather than a final design. ISXEvE is available and under development, and provides interoperability. Perhaps it offers better options for what you are doing
Code: Select all
hud -add test 100,100 ${Mouse}
The only issue might be if the game itself checks if it's the foreground window before allowing the mouse clicks. If it does, you need to check the "Lock Foreground" option for the game in IS's Game Configuration.
Pixel color could go either way. It's been a while so I don't particularly recall the limitation, but it may very well indeed require the window to be topmost.
Either way, using pixel reading and mouse clicks/drags is generally a stopgap solution rather than a final design. ISXEvE is available and under development, and provides interoperability. Perhaps it offers better options for what you are doing
What I've discovered is that in both vista and xp, even with 'lock foreground' turned on, the emulated mouse position does not change if the client does not have focus.
To test, I ran the client, made a small script that would just drag an item in the game from one spot to another, it works fine.
I load notepad and set it to the left of the client, click it and give it focus, and the hud shows the position of the mouse to the left of the client at like, -200,100.
I am able to hover the mouse over the client and i can see that the mouse clicks are working, I see whatever item I'm hovering over get highlighted in the client, showing that the mouseclicks are working properly, but, while the client doesn't have focus, nothing actually gets moved.
To test, I ran the client, made a small script that would just drag an item in the game from one spot to another, it works fine.
I load notepad and set it to the left of the client, click it and give it focus, and the hud shows the position of the mouse to the left of the client at like, -200,100.
I am able to hover the mouse over the client and i can see that the mouse clicks are working, I see whatever item I'm hovering over get highlighted in the client, showing that the mouseclicks are working properly, but, while the client doesn't have focus, nothing actually gets moved.
I checked on other machines to make sure it wasn't just me, but, even with lock foreground option, the mouse only moves to the foreground window.
below is what i did to check, and when any program came in front, and the game went to background, the mouse hud stopped changing.
hud -add test 100,100 ${Mouse}
Any thoughts at all? I'd love nothing more than to find out I was just doing something stupid that was incorrect.
below is what i did to check, and when any program came in front, and the game went to background, the mouse hud stopped changing.
hud -add test 100,100 ${Mouse}
Code: Select all
function main()
{
do
{
wait 5
call MoveNow
}
while (1)
}
function MoveNow()
{
Mouse:SetPosition[200,200]
wait 5
Mouse:SetPosition[300,300]
}