Solved

VBScript

Posted on 2000-02-17
3
155 Views
Last Modified: 2008-03-17
Can you let me know what following lines doing?

set diskmb = ObjectManager.CreateExpression( " 'LogicalDisk.Free Megabytes;*.*' ")
set diskpct = ObjectManager.CreateExpression( " 'LogicalDisk.% Free Space;*.*' ")
0
Comment
Question by:leeann
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
troywillmot earned 50 total points
ID: 2532882
I've never seen quite that syntax, but it looks like its calling and object in another library (objectmanager) and asking it to call methods on another object (logicaldisk) and return objects from them.
Alternatively, it may be evaluating an expression where logicaldisk.free etc. are known variables (rather than it calling objects)

The objects returned are put into diskmb and diskpct.

With out more supporting code I can't quite tell what its pupose is, other than to return information about a disk or disks.
0
 
LVL 6

Expert Comment

by:Marine
ID: 2533097
It sets up a reference for you to LogicalDisk Object so you can do farther work with it. After you have it set up you then can use that object. I also didn't see this kind of a code before. Do you have a DLL library ? How do you create an instance of this object ? Do you have it referenced ? If not this may not work.
0
 
LVL 3

Expert Comment

by:troywillmot
ID: 2533124
If its in VBScript then there are no references, so thats not an issue so long as the objectmanager object is set to something using createobject, i.e

set objectmanager=createobject("prog.id")
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question