sorry, i deleted your thread. i meant to delete the initial post and keep the edit.
i asked that it be re-instated and here we are:
i hope this answers your Q:
+ Code Snippetdo
If GetRawKeyState(27) then Exit
Print( ReturnCenter() )
Sync()
loop
Function ReturnCenter()
Result = GetVirtualWidth() /2
EndFunction Result
see User Defined Functions 1/2-way down
the help page.
also, note proper use of
Return.