Solved

VBScript

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
DIR issue 7 48
Vb.net 2008 2 51
VB6 code to programmatically convert pdf to excel 21 57
SSRS expression Issue finding a string 10 51
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now