January 8, 2004
ScriptHost version 2.9.0
Due to popular demand, I have added JScript (.js), LuaScript (.lua), PerlScript (.pl), and PythonScript (.pl) to the XUScript Host. You can now script in JScript, LuaScript, PerlScript, and PythonScript as well as VBScript. I have included a demo mouse script (JScriptDemo.js) just to prove that it works. I have not tested Perl or Python, please let me know if you experience any problems.
--Added a few scriptHost functions.
Function Win32API.XUGetForegroundWindow() As Long 'See GetForegroundWindow API microsoft.
Function Win32API.XUGetClientRect(ByVal hwnd As Long, lpRect As tagRECT) As Long 'See GetClientRect API from microsoft.
Function Win32API.XUScreenToClient(ByVal hwnd As Long, lpPoint As tagPOINT) As Long
Function Win32AP.XUClientToScreen(ByVal hwnd As Long, lpPoint As tagPOINT) As Long
--I Also added a new GetWindowPixel to more accuretly reflect the color on the screen for troublesom pixels.
Function XUScriptHost.GetWindowPixel(ByVal X As Long, ByVal Y As Long, ByVal HWnd As Long) As Long
--The added hwnd is for the window handle.For example, you call XUScriptHost.GetForegroundWindow and pass that as the hwnd, it will get the pixel (x,y) of the game window. This is very handy for windowed applications.
--The other functions may be needed to help with conversion form full screen to windowed coordinates. Ie, if you are getting the pixel location from the x,y passed from GetCursorPos, those will be in screen coordinates which will need to be converted to game coordinates via the XUScreenToClient function.
|