Hello,
I tried an ahk script, it works fine, with shortcut Win+C, the mouse cursor shows and hides, but when I click on VpinMAME, PinballX with a black screen comes first and cant see anymore the VPX table, use alt+tab but no way, just vpinmame and pinballx black screen or vpx table and vpinmame window beneath.
If someone wants to try it:
OnExit, ShowCursor ; Ensure the cursor is made visible when the script exits.
return
ShowCursor:
SystemCursor("On")
ExitApp
#c::SystemCursor("Toggle") ; Win+C hotkey to toggle the cursor on and off.
SystemCursor(OnOff=1) ; INIT = "I","Init"; OFF = 0,"Off"; TOGGLE = -1,"T","Toggle"; ON = others
{
static AndMask, XorMask, $, h_cursor
,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13 ; system cursors
, b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13 ; blank cursors
, h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13 ; handles of default cursors
if (OnOff = "Init" or OnOff = "I" or $ = "") ; init when requested or at first call
{
$ := "h" ; active default cursors
VarSetCapacity( h_cursor,4444, 1 )
VarSetCapacity( AndMask, 32*4, 0xFF )
VarSetCapacity( XorMask, 32*4, 0 )
system_cursors := "32512,32513,32514,32515,32516,32642,32643,32644,32645,32646,32648,32649,32650"
StringSplit c, system_cursors, `,
Loop %c0%
{
h_cursor := DllCall( "LoadCursor", "Ptr",0, "Ptr",c%A_Index% )
h%A_Index% := DllCall( "CopyImage", "Ptr",h_cursor, "UInt",2, "Int",0, "Int",0, "UInt",0 )
b%A_Index% := DllCall( "CreateCursor", "Ptr",0, "Int",0, "Int",0
, "Int",32, "Int",32, "Ptr",&AndMask, "Ptr",&XorMask )
}
}
if (OnOff = 0 or OnOff = "Off" or $ = "h" and (OnOff < 0 or OnOff = "Toggle" or OnOff = "T"))
$ := "b" ; use blank cursors
else
$ := "h" ; use the saved cursors
Loop %c0%
{
h_cursor := DllCall( "CopyImage", "Ptr",%$%%A_Index%, "UInt",2, "Int",0, "Int",0, "UInt",0 )
DllCall( "SetSystemCursor", "Ptr",h_cursor, "UInt",c%A_Index% )
}
}