MrYoson
-
Total Posts
:
8
- Scores: 0
-
Reward points
:
0
- Joined: 12/9/2011
-
Status: offline
|
real-time updating issue
Friday, December 09, 2011 4:50 AM
( permalink)
I am updating a business process that originally consisted of just .vbs files. Now I'm creating a .hta to provide simpler interface for the user, but I'm stuck on something. In the .hta there is a function that monitors the progress of the .vbs scripts that it handles. I'm trying to figure out a way for the scripts to send data directly to the function in the .hta. Ideas?
|
|
|
|
ebgreen
-
Total Posts
:
8227
- Scores: 98
-
Reward points
:
0
- Joined: 7/12/2005
-
Status: offline
|
Re:real-time updating issue
Friday, December 09, 2011 6:09 AM
( permalink)
There are a lot of possible solutions. In part it depends on what exactly you need the scripts to send to the HTA?
|
|
|
|
MrYoson
-
Total Posts
:
8
- Scores: 0
-
Reward points
:
0
- Joined: 12/9/2011
-
Status: offline
|
Re:real-time updating issue
Friday, December 09, 2011 6:27 AM
( permalink)
need to send one number, that's it haha. the function in the .hta is in jscript but i imagine that doesn't matter
|
|
|
|
ebgreen
-
Total Posts
:
8227
- Scores: 98
-
Reward points
:
0
- Joined: 7/12/2005
-
Status: offline
|
Re:real-time updating issue
Friday, December 09, 2011 6:29 AM
( permalink)
Then I would .Run the script and have the script set it's exit code to the number that you need to send back.
|
|
|
|
MrYoson
-
Total Posts
:
8
- Scores: 0
-
Reward points
:
0
- Joined: 12/9/2011
-
Status: offline
|
Re:real-time updating issue
Friday, December 09, 2011 7:03 AM
( permalink)
sorry, bad wording. i need to send a variable once per iteration of a loop until the loop in the .vbs ends; useful info on the exit code though
|
|
|
|
ebgreen
-
Total Posts
:
8227
- Scores: 98
-
Reward points
:
0
- Joined: 7/12/2005
-
Status: offline
|
Re:real-time updating issue
Friday, December 09, 2011 7:11 AM
( permalink)
That does complicate things a bit. In that case there are three options that immediately come to mind. The first and the one that I think that I would go with myself is to just bring the code from the VBS file into the HTA and just run it there. If there is some reason that you don't want to do that then the next thing I think I would try is to use .Exec to run the script. Then you would have access to the STDOUT of the script so you could just use WScript.Echo to talk back. The last option would be a semaphore file that the script could write to and the HTA could read from.
|
|
|
|
MrYoson
-
Total Posts
:
8
- Scores: 0
-
Reward points
:
0
- Joined: 12/9/2011
-
Status: offline
|
Re:real-time updating issue
Friday, December 09, 2011 7:24 AM
( permalink)
ok, yeah right now the script creates and deletes a text file that the .hta reads from but that makes me nervous. the problem with putting the scripts in the .hta is there are 3 LONG scripts that run independently and pass parameters to each other at run time; i don't want to try rewriting that to make them work in the .hta. i'll definitely try the .Exec method and see where that gets me. thanks alot, my boss will be pleased best regards, yoson
|
|
|
|