Call an HTA function without interface from vbs

I have an HTA that is replacing a vbs script.  We used to call the vbs with a "Silent" variable so the user would not get any dialogs.  Is it possible to call subs in the HTA without invoking the interface?

TIA
prostangAsked:
Who is Participating?
 
Paolo SantiangeliConsulente InformaticoCommented:
Hi,
the only thing that an HTA gives you beyond a straight script is a gui.
so why dont you use the script?
0
 
prostangAuthor Commented:
We have too many instances where we need the user's input.
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
Paolo SantiangeliConsulente InformaticoCommented:
if i remembere well i dont think its' possible to run an hta "without" gui. maybe you should try to minimize the gui or use 2 different scripts.
0
 
prostangAuthor Commented:
I may have to extract out the portion that i have to call.  How can I remove the gui?  I thought of scripting in the gui, but the HTA extension is keeping me from doing that.
0
 
Paolo SantiangeliConsulente InformaticoCommented:
if you can extract the useful code i think it's a good solution
0
 
Paolo SantiangeliConsulente InformaticoCommented:
0
 
prostangAuthor Commented:
That is pretty slick.  If I can pass a variable to the HTA, I can get the rest.  How do pass a variable from a vbs to hta?  In the past, I have used this code in the vbs being called:

Set colNamedArguments = Wscript.Arguments.Named
Silent = colNamedArguments.Item("Silent")
0
 
prostangAuthor Commented:
Thanks for all the help.  I am saving that site as a favorite.  They have really good stuff.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.