Home > Software engineering >  Bosses help I have card for a long time for a long time
Bosses help I have card for a long time for a long time

Time:11-16

The Set WshShell=WScript. Create0b ject (" WScript. Shell ")
WshShell. AppActivate ""
For I=1 to 100
WScript. Sleep 100
WshShell. SendKeys "^ v
"Wshell. SendKeys "% s"
Next
Statement is not over how the
Pray god to help

CodePudding user response:

Why do you want to create WScript. Shell?

Sendkeys, can not directly use?

CodePudding user response:

Change is good, but do not encourage refresh;
 
The Set WshShell=WScript. CreateObject (" WScript. Shell ")
WshShell. AppActivate ""
For I=1 to 100
WScript. Sleep 100
WshShell. SendKeys "^ v
"WshShell. SendKeys "% s"
Next

CodePudding user response:

reference 1st floor vansoft response:
why create WScript. Shell?

Sendkeys, can not directly use?

There is difference between:
1. In VB6, but the VBS script does not bring SendKeys and Appactivate;
2. The process of Appactivate is in VB6, not return a value, and WScript. Shell Appactivate has a return value, can be judged whether successful activate the window;
  • Related