You should probably sign up for the scripting list to ask these kinds of
questions.
I think the part you're missing is the entire concept of object oriented
programming. If you've used languages with pointers, then think of each
object as being a record (assuming you know what a record structure is),
and some of the fields in the record (which are other objects) can be
thought of as pointers to other records. The dot operator is used to
dereference the "pointer" in this case.
To use a "for each" statement you need a collection object. think of it
as an array. Any of the ones with a plural name (such as "hotkeys") are
likely to be collections.
If you'd like to learn about this, and you have any MS office products
such as Word, they have a slightly different version of VB script
built-in called VBA. There are lots of books on automating Word or
Excel with VBA, and I've got several if you'd like to learn VBA. It
would help you with the idea of object oriented programming.
hth,
Chip
------------------------------
Chip Orange
Database Administrator
Florida Public Service Commission
[EMAIL PROTECTED]
(850) 413-6314
(Any opinions expressed are solely those of the author and do not
necessarily reflect those of the Florida Public Service Commission.)
________________________________
From: matt VanDeWalle [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2008 7:38 PM
To: [email protected]
Subject: am I losing it or am I lost?scripting
hi
I should start by saying, I am not new to programming languages,
however vb script, and all this com stuff I am lost. I found it a
nightmare trying to navigate the vb script info, and when I try to
convert in my head to my language of choice, I really cant find anything
halfway cool to try that wont break anything. I don't know how popular
php is around here, however i did this much, and actually got some
success with it, but I am sure there is a lot more than this to try but
again, everything i try squawks about needing an object, however which
object could i say, get all the elements of with a foreach statment?
so far this is all i have gotten success with. note that it is
php and as far as now, i need to figure out how to make windoweyes run
it and not say its stoped
ok here is the little i did;
<?php
$stuff = new COM("Windoweyes.application");
echo $stuff->version;
?>
and as expected, i did get the expected "7.0"
If you reply to this message it will be delivered to the
original
sender only. If your reply would benefit others on the list and
your message is related to GW Micro, then please consider
sending
your message to [email protected] so the entire list will
receive it.
All GW-Info messages are archived at
http://www.gwmicro.com/gwinfo, and can be searched through and sorted
using the search
form at the bottom of the page.
If you wish to unsubscribe from this list, send a message to
[EMAIL PROTECTED] and include leave gw-info in the body
of the message.
If you reply to this message it will be delivered to the original
sender only. If your reply would benefit others on the list and
your message is related to GW Micro, then please consider sending
your message to [email protected] so the entire list will receive it.
All GW-Info messages are archived at http://www.gwmicro.com/gwinfo, and can be
searched through and sorted using the search
form at the bottom of the page.
If you wish to unsubscribe from this list, send a message to
[EMAIL PROTECTED] and include leave gw-info in the body
of the message.