Jump to content

Is it possible to get cursor info from more than 1 mouse cursor?


SMark
 Share

Recommended Posts

Let me try to explain what I mean...

There is a proprietary program called "ISBoxer" that's used for 'Multiboxing' Online games.  It works by loading a game client into seperate video feeds and relaying mouse/keyboard commands to each video feed simultaneously.

Here's my dilemma:

I can grab each client's Windows handle by using:

Local $hWnd1 = WinGetHandle("is1")
Local $hWnd2 = WinGetHandle("is2")
Local $hWnd3 = WinGetHandle("is3")
Local $hWnd4 = WinGetHandle("is4")

But I can not grab multple mouse infos, because there is no way to tell which handle's mouse info to grab:

 $mouseposition = MouseGetPos()
 $cursor = _WinAPI_GetCursorInfo()

This just grabs the 'default' mouse info.

I realize that the ISBoxer programmer has done some specialized relaying to multiple video feeds programming, but, there must be a way to figure out what the memory data of these extra mouse cursors is, and which handle is using each.

Here is a snippet of the code I'm working with so you can kind of see what I mean:

#include <WinAPI.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Test", 615, 438, 180, 130)
$LabelWin1Handle = GUICtrlCreateLabel("Window 1", 56, 40, 70, 17)
$LabelWin2Handle = GUICtrlCreateLabel("Window 2", 56, 72, 70, 17)
$LabelWin3Handle = GUICtrlCreateLabel("Window 3", 56, 104, 70, 17)
$LabelWin4Handle = GUICtrlCreateLabel("Window 4", 56, 136, 70, 17)
$ButtonSetHandles = GUICtrlCreateButton("Set Handles", 160, 72, 75, 25)

$GroupMousePosition = GUICtrlCreateGroup("Mouse Position", 306, 16, 201, 41)
$LabelMouseX = GUICtrlCreateLabel("MouseX:", 314, 32, 46, 17)
$LabelMouseValue = GUICtrlCreateLabel(",     MouseY:", 394, 32, 64, 17)
$LabelMouseXValue = GUICtrlCreateLabel("x", 364, 32, 30, 17)
$LabelMouseYValue = GUICtrlCreateLabel("y", 458, 32, 30, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Local $hWnd1 = WinGetHandle("is1")
Local $hWnd2 = WinGetHandle("is2")
Local $hWnd3 = WinGetHandle("is3")
Local $hWnd4 = WinGetHandle("is4")

Local $mouseposition = 0
Local $cursorinfo = 0

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
            
        Case $ButtonSetHandles
            GUICtrlSetData($LabelWin1Handle, $hWnd1)
            GUICtrlSetData($LabelWin2Handle, $hWnd2)
            GUICtrlSetData($LabelWin3Handle, $hWnd3)
            GUICtrlSetData($LabelWin4Handle, $hWnd4)

    EndSwitch
    
   $mouseposition = MouseGetPos()
   $cursorinfo = _WinAPI_GetCursorInfo()

   If GUICtrlRead($LabelMouseXValue) <> $mouseposition[0] Then
      GUICtrlSetData($LabelMouseXValue, $mouseposition[0])
   EndIf
   If GUICtrlRead($LabelMouseYValue) <> $mouseposition[1] Then
      GUICtrlSetData($LabelMouseYValue, $mouseposition[1])
   EndIf
    
WEnd

As you can see, I've set the label of the mouse position to the mouse's current position, but I can't get the mouse info of each Window Handle's mouse, yet each windows has a unique mouse that's changing it's info independently of the other 3.

Any ideas how I might be able to use AutoIt to get this info?

Please and Thanks!

 

Link to comment
Share on other sites

  • Moderators

SMark,

Welcome to the AutoIt forum. :)

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now (there is also a link at bottom right of each page) - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. :naughty:

And to make it worse, the "Developer Chat" section where you started this thread is not for general support questions. I have moved the thread, but would ask you to be more careful when you return with a legitimate question. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

First, I apologize the post was made in the wrong section. The description of the 'Developers' section is: "General Coding / Programming". I thought that was pretty much what I was asking, which is why I put it there. My bad.

Second, I said nothing about automation. My question was a legitimate question about accessing windows controls. The program I mentioned, ISBoxer, is even a completely legal program to run in the game RIFT, which is what I'm exploring... It was even very clearly validated by both the Lead Community Manager, Elrar, here:

http://forums.riftgame.com/general-discussions/general-discussion/379448-multiboxers-unwanted-rift-should-we-pack-up-get-out-42.html#post4445551

and the Lead Creative Designer, Daglar, here:

http://forums.riftgame.com/general-discussions/general-discussion/379204-follow-disabled-warfronts-conquest.html

My question was about getting *Windows* cursor information from windows handles where there are multiple mouse icons in those windows.

This is an information access question... Not an automation question. I would still like an answer if someone has one, regardless of what you might *think* it's for, It is a very valid question.

Again, thanks for any info in this matter, and a thread unlock should be in order. : (

Link to comment
Share on other sites

  • Moderators

SMark,

 

The program I mentioned, ISBoxer, is even a completely legal program to run in the game RIFT

I do not care if the app is legal to run in the game - it is against our Forum rules to discuss game automation - which as you yourself quite clearly state in the quote above, is exactly what this is. So the thread stays locked and this one joins it. :)

Please do not post about this a third time. :naughty:

M23

Edit: Threads merged.

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...