I once attempted to use the mouse while in the console in the past, but I haven't used PB in a long time and I can't remember anything I did/learned. I do remember that I spent hours looking at the functions and structures of the console at msdn, but don't remember if I found anything good.
Anyway, I thought I'd ask here, to save myself from wasting my time on the possibly impossible

Btw, it's annoying how the position of where the text is is called the "cursor". I remember going to msdn and seeing a bunch of functions and structures with "cursor" in the name and got all excited.

Edit: After a couple hours of work, I seem to getting somewhere. Due to PB's lack of certain structures and whatnot, I had to improvise a little. I'm still trying to figure it all out but I'll keep this thread open so I can share my findings with the rest of the community

Code: Select all
OpenConsole()
Structure INPUT_RECORD
EventType.w
StructureUnion
MouseEvent.MOUSE_EVENT_RECORD
EndStructureUnion
EndStructure
Dim inpt.INPUT_RECORD(1)
hCon.w=GetStdHandle_(#STD_INPUT_HANDLE)
SetConsoleMode_(hCon,#ENABLE_MOUSE_INPUT)
Repeat
If ReadConsoleInput_(hCon,@inpt(1),1,@hey.l)
ConsoleLocate(3,3)
ClearConsole()
Print(Str(inpt(1)\MouseEvent\dwButtonState))
EndIf
Delay(1)
ForEver
If anyone cares, I'll write a procedure that returns the mouse events through a pointer to a structure.[/code]