Link to home
Start Free TrialLog in
Avatar of ankur3020
ankur3020

asked on

stop execution of vbs file

execution of vbs file stops when i press shift+A+B in same flow. Please provide code.
SOLUTION
Avatar of Michael_D
Michael_D
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ankur3020
ankur3020

ASKER

i want to stop execution on pressing of some keys in combination. pls provide code accordingly.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
BTW did you try stop the execution by pressing CTRL+C?
strange can clt+C stop the execution of vbs file? if yes tell me how to prevent it.

any way please note, there is a file with infinite loop i.e. which once started will keep on running. now i want to add some keys or some coding which help me to stop it when required. i do not want any inputbox to be displayed for me . i want if some key is pressed with combination of some other key execution stops. pls amend the above code as required.
If your vbs will run in background with no user interface than your request is not possible
ok, but can we do something like the inputbox will raise if i press some special key  all  till time vbs file run in background
no its impossible.
I have read all questions you posted here. it seems like you want to implement some sort of security but you choose wrong tools and methods to do it. If you'll explain what is your problem and what you want to achieve I am sure you will get much more helpful comments
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i run ur attached code,it is giving error pls check. error at line 3 , invalid handle
Do While true
Wscript.StdOut.Write "Enter a Decimal Number (Enter 0 to exit): "
strDecimal = Wscript.StdIn.ReadLine
 
if strDecimal="0" then
   Wscript.StdOut.WriteLine "Exiting..."
   Wscript.Quit
Else
Wscript.StdOut.WriteLine strDecimal & " is equal to " & _
 Hex(strDecimal) & " in hex."
end if
 
Loop 

Open in new window