use arguments in .hta application

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: RubenZ (anonymous_at_discussions.microsoft.com)
Date: 04/16/04


Date: Fri, 16 Apr 2004 03:46:03 -0700

Hi!

I've 2 *.hta files.
Site1.hta calls Seite2.hta with arguments.
Site2.hta should read these arguments and react.

Site1.hta
...
DIM WshShell, name, ErrCode
Set WshShell = CreateObject ("WScript.Shell")
name = "Seite2.hta strADsPath="&strADsPath
errcode = WshShell.Run (name, 1, true)
...

Seite2.hta
...
<HTA:APPLICATION ID="oHTA"
APPLICATIONNAME ="myAPP"><SCRIPT language="VBScript">
'The following command gives out the string I need

MsgBox oHTA.commandline

'But: I want to do the following:
dim str
str = oHTA.commandline

act(str)

Sub act(str)

document.write(str)

End Sub

Thanks for help!

Ruben



Relevant Pages