Computing.Net > Forums > Windows XP > HTA Scripting

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to get for your free account now!

HTA Scripting

Reply to Message Icon

Name: MTec007
Date: November 27, 2008 at 09:25:06 Pacific
OS: XP Home 2002 SP2
CPU/Ram: Celeron M 1.3GHz/256
Manufacturer/Model: Dell Inspiron 1200
Comment:

i have script that executes fine from a *.VBS script file, but i would like to add it to a HTA file, and execute it when a button is clicked. however it doesnt work exactly as planned.

<SCRIPT LANGUAGE="WScript">
Set WshShell = CreateObject("wscript.Shell")

Sub Send
WshShell.AppActivate "Untitled - Notepad"
WScript.Sleep 500
WshShell.SendKeys "blah " + txtUser.value
End Sub
</SCRIPT>
<Input type="Button" language="WScript" value="Send" onClick="Send">

in this example no error is produced but the code does not execute.


Report Offensive Message For Removal
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: HTA Scripting

IE/favourites pop up problems www.computing.net/answers/windows-xp/iefavourites-pop-up-problems/85912.html

Malcious Script Detected, odbc.hta, www.computing.net/answers/windows-xp/malcious-script-detected-odbchta/98536.html

Internet Explorer Script Error www.computing.net/answers/windows-xp/internet-explorer-script-error/81702.html