In looking over some other posts, it seems you've already gone down that road. There actually is a way to call API functions from within scripts and it's achieved with an app called rundll32.exe. This exe is on all systems back to Win98. Here's the catch. You can only call API functions, I don't know of a way to get a return code back from the function you're calling. This is because the command is typically used to launch control panel applets and various system level wizards, i.e. the Add Printer Wizard. In your case, the command is as simple as:

Code:
shell "rundll32.exe user32.dll, GetSystemMetrics 67"


But the kicker is that if you check @ERROR I believe it will always return 0, since the command executed successfully, so even though you can run it you can't get the value that it is reporting.

If there is a way to get a return code back from run32dll.exe I'd love to know about it, which is why I post this at all so that somebody here smarter than me can figure out how to do it.


Edited by Stevie (2005-07-20 04:10 PM)
_________________________
Stevie