Thanks for the code. R:Scripter sounds like a powerful tool.
In the meantime, is there a good place for tutorial information on WMI and WinUDF? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MikeB Posted At: Wednesday, October 06, 2004 4:52 PM Posted To: RB7-L Conversation: [RBG7-L] - Re: CVAL for DPI Subject: [RBG7-L] - Re: CVAL for DPI Ok.. Here is a VBScript using WMI (Windows Management Instrumentation) that gets what you want. WMI is already on Win2K and up computers and can be added to W98/WinNT4.... And just to let you know this script will run "Easy As Pie" using RScripter (which isn't affected by your browser security settings - lets you run your own scripts safely in your system). RScripter will return the Script Function Return values into your RBase variable that you pass using the PLUGINS command. You could incorporate the code into a WinUDF and get the return values into RBase variables that way however. But for now, you will only get a visual from this code. [begin script] sub main() On Error Resume Next strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_DesktopMonitor",,48) For Each objItem in colItems Wscript.Echo "Pixels_Per_X_LogicalInch: " & objItem.PixelsPerXLogicalInch Wscript.Echo "Pixels_Per_Y_LogicalInch: " & objItem.PixelsPerYLogicalInch Next end sub [end script] BTW, if you have multi Monitor adapter in the computer, the For Each construct will show the settings for each of them... ----- Original Message ----- From: "Charles Parks" <[EMAIL PROTECTED]> To: "RBG7-L Mailing List" <[EMAIL PROTECTED]> Sent: Wednesday, October 06, 2004 1:16 PM Subject: [RBG7-L] - Re: CVAL for DPI Yes, In XP, it under Settings ->Advanced -> General ->DPI Setting 96 DPI is normal 120 DPI is large size. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lawrence Lustig Posted At: Wednesday, October 06, 2004 11:43 AM Posted To: RB7-L Conversation: [RBG7-L] - Re: CVAL for DPI Subject: [RBG7-L] - Re: CVAL for DPI > Is there a CVAL value for DPI? You mean, like off the Advanced Screen Settings dialog for the display? I don't think this is available in R:Base right now, but should be pretty easy to right a small UDF to do it. You could probably also do it in VB Script -- I assume there's an API call to get this information. -- Larry
