These are some good examples here. Thanks for sharing them. I tried running the example from Inforequester from within an hta in an effort to learn more about scripting. The code produces the following error: Object required 'Wscript' . I tinkered with it for over an hour to get that error cleared to no avail. This little program/script launches Notepad and IE as expected but that's all it does.
Question # 1: Why is it producing that error?
Below is my source code:
Set objShell = CreateObject("WScript.Shell")
objShell.Run "notepad.exe C:\Documents and Settings\UsersName\My Documents\First_HTA_Automation_Script\ReadMe.txt"
Set IE = CreateObject("InternetExplorer.Application")
set WshShell = CreateObject("WScript.Shell")
IE.Visible = True
IE.Document.All.Item("fld_userName").Value = "vikingMoJo@notsoeasystreet.com"
IE.Document.All.Item("fld_password").Value = "superPassword"
<button onclick="RunProgram1">Launch Notepad</button> <p>
<button onclick="RunProgram2">Launch IE</button> <p>
Question # 2: Can anybody direct me to some good online tutorials for using VBscripts from HTA's (Hypertext Applications) ??
My ultimate goal with VBscript is to automate the testing and routine tasks that I have to do with web browsers and I would like to house and launch my VBscripts from HTA's.
THANK YOU in advance.