PDA

View Full Version : what's going wrong with the code



clif
06-29-2021, 09:14 AM
set wshshell = createobject("wscript.shell")


do
ret = wshshell.appactivate("網頁訊息")
loop until ret = true


wscript.sleep 1000
ret = wshshell.appactivate("網頁訊息")
if ret = true then
ret = wshshell.appactivate("網頁訊息")
wscript.sleep 2000

wshshell.sendkeys "{ENTER}"


end if
wscript.sleep 1000

Bob Phillips
06-29-2021, 11:42 AM
More detail might, just might, facilitate a helpful reply.

clif
06-29-2021, 03:54 PM
More detail might, just might, facilitate a helpful reply.

800A0408. Error code

SamT
06-29-2021, 04:54 PM
800A0408. Error code
well... That's a big help.\
OKAY. Where is that guy who remembers all 2,000,000 Error codes? What dose that code mean?

Paul_Hossler
06-29-2021, 05:46 PM
More importantly, WHICH LINE has the error


Google can help

https://www.computerperformance.co.uk/error-codes/800a0408/


TROUBLESHOOTING CODE 800A0408 – INVALID CHARACTER
INTRODUCTION TO CODE 800A0408

This error code, 800A0408 occurs when you execute a VBScript. A wild guess a problem with an apostrophe, possibly in a ‘REM statement.https://cdn.shortpixel.ai/client/q_glossy,ret_img/https://www.computerperformance.co.uk/images/code/code_81.jpg
THE SYMPTOMS YOU GET

The script does not execute as you had hoped. Instead you get a WSH message box like this picture:
THE CAUSE OF ERROR 800A0408

Your VBScript contains an illegal character, often at the beginning of a line. It can happen if you copy the script from word, then paste into notepad. For example, to ‘Rem out a line we need the apostrophe, which is ASCII character 39; however if you paste from word you may get ASCII 96 (Grave accent).
Note the clue Source: Microsoft VBScript compilation error, this means a syntax error in your script.

snb
06-30-2021, 02:40 AM
What is wscript.sleep 1000 referring to ?