Solved

VBScript

Posted on 2000-02-17
3
156 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

738 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