i think the problem begings if you make the mouse visible if she is already visible
// AGK 2017.05.15 (Tier1 Basic)
// MR 24.05.2017
Setvirtualresolution(640,480)
ResetTimer()
// Move the mouse pointer to the left half of the
// window and the poiner will be visible.
// when in the right hand half (after a few seconds)
// the pointer will disappear.
//thats ok
onoff=0
SetRawMouseVisible(0)
//did not work, if visible do not make visible again
//onoff=1
//SetRawMouseVisible(1)
Repeat
Xpos=GetPointerX()
print(Xpos)
print(onoff)
if 1=1
If Xpos>320
if onoff=1
SetRawMouseVisible(0)
onoff=0
endif
ELSE
if onoff=0
SetRawMouseVisible(1)
onoff=1
endif
EndIf
endif
Sync()
Until Timer()>20
End
AGK (Steam) V2017.05.15 : Windows 10 Pro 64 Bit : AMD (17.4.4) Radeon R7 265 : Mac mini OS Sierra (10.12.2)