VBScript... how much can we use it ?
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 18
- Joined: Sun Dec 22, 2002 2:41 am
VBScript... how much can we use it ?
I know VBscript can be used in a macro... however my question if how much ? I mean, can I do all the VBscript I want in macro scheduler or is there some limitation ?
-
- Newbie
- Posts: 18
- Joined: Sun Dec 22, 2002 2:41 am
ok I tried many thing with VBscript, and so far its working great. However it seems like many feature and event require some (html ?) objects (like "Document" ). Since there no such object in Macro Scheduler, does that mean that those options are not there ? Or can I simply use, say, a program as an object ?
-
- Newbie
- Posts: 18
- Joined: Sun Dec 22, 2002 2:41 am
Guillaume777,
Once the control is transferred to WSH, Macro Scheduler has nothing to do with your .vbs until the control is returned back to your Macro Scheduler script.
The power of the VBscript extension depends upon the scope of objects you have. Even without creating instances of objects, VBscript language construct alone is more sophisticated. Once the control is transferred to a .vbs, you may lose the fine control of inserting keystrokes being pushed into the keyboard buffer.
On the other hand, Macro Scheduler's basic commands are a big time saver. It cuts tens of thousands of keystrokes in my daily computer usage flawlessly.
Once the control is transferred to WSH, Macro Scheduler has nothing to do with your .vbs until the control is returned back to your Macro Scheduler script.
The power of the VBscript extension depends upon the scope of objects you have. Even without creating instances of objects, VBscript language construct alone is more sophisticated. Once the control is transferred to a .vbs, you may lose the fine control of inserting keystrokes being pushed into the keyboard buffer.
On the other hand, Macro Scheduler's basic commands are a big time saver. It cuts tens of thousands of keystrokes in my daily computer usage flawlessly.
Guillaume777,
Please look at the VBScript example that comes with the product and also the examples at http://www.mjtnet.com/scripts.hts
Armstrong seems to be referring to WSH and .vbs files which has nothing to do with using VBScript within Macro Scheduler scripts. WSH and .vbs files are external. You can of course run them with Run Program, but I think you are asking about the capabilities of VBScript *within* Macro Scheduler code.
Using the VBSTART and VBEND blocks you can embed as much VBScript as you like in your macros. The full capabilities of VBScript are available. As for the objects you wish to control, that depends on the ActiveX objects available to your system. You can create VBScript functions and subroutines and then run them from within the MacroScript code and have the VBScript functions set MacroScript variables. Therefore you have complete integration and can achieve 100% VBScript and 100% MacroScript.
The Document object you are reffering to is a web browser object and would be out of context inside a Macro Scheduler script. That is an object available to VBScript when run from within a web browser.
If you want to execute a web browser object use InternetExplorer.Application object. See:
https://www.mjtnet.com/scripts.hts?display+77
Also check out our VBScript resources page:
http://www.mjtnet.com/resources.htm
Please look at the VBScript example that comes with the product and also the examples at http://www.mjtnet.com/scripts.hts
Armstrong seems to be referring to WSH and .vbs files which has nothing to do with using VBScript within Macro Scheduler scripts. WSH and .vbs files are external. You can of course run them with Run Program, but I think you are asking about the capabilities of VBScript *within* Macro Scheduler code.
Using the VBSTART and VBEND blocks you can embed as much VBScript as you like in your macros. The full capabilities of VBScript are available. As for the objects you wish to control, that depends on the ActiveX objects available to your system. You can create VBScript functions and subroutines and then run them from within the MacroScript code and have the VBScript functions set MacroScript variables. Therefore you have complete integration and can achieve 100% VBScript and 100% MacroScript.
The Document object you are reffering to is a web browser object and would be out of context inside a Macro Scheduler script. That is an object available to VBScript when run from within a web browser.
If you want to execute a web browser object use InternetExplorer.Application object. See:
https://www.mjtnet.com/scripts.hts?display+77
Also check out our VBScript resources page:
http://www.mjtnet.com/resources.htm
MJT Net Support
[email protected]
[email protected]