Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VBScript

Posted on 2000-02-17
3
Medium Priority
?
159 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 150 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

722 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