I am new to VB Scripting. I want the VB script to act according to an event of an application. Eg : The VBScript should wait till a popup message appears in an application.
相关问题
- How to programmatically convert Access 1997 .mdb t
- VBScript / ADODB Syntax Issue with adArray?
- How to check default host for VBScript is WScript
- vbscript is not working on IE10 browser mode
- Using asp objects in .NET - Max compatibility
相关文章
- Can a VBScript function return a dictionary?
- UTC Time Assignment in VBScript
- Copy and Rename File VBScript
- How do I open a file with VBScript?
- Import WinAPI Function in *.VBS File
- How to reference the mail which triggered the outl
- Classic ASP/VBScript implementation of Crockford
- Convert .csv file into Excel in VBScript
If all you want is to close a pop-up, this may help you:
VBScript and Windows Script Host only support primitive GUI automation, like activating windows (the
AppActivate
method) and sending keystrokes (theSendKeys
methods). So I doubt that your task can be accomplished with pure VBScript.However, there's a free GUI automation tool called AutoIt that should be able to do what you need.
Depending on the application, the object model can be used to automate most functions. I routinely automate Excel using the Excel Object Model. Here is a link to the documentation at MSDN:
http://msdn.microsoft.com/en-us/library/aa209782%28office.10%29.aspx
I usually turn off the pop-up menus when possible to prevent them from causing unexpected events for the script to handle. Here is an example:
From here, I would continue to used the object model for Excel to get the application to do whatever task I need.
The trick is thinking about what members and methods are needed to accomplish the task you want versus how a person interacts with the GUI.