Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 205 Vote(s) - 3.57 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a way to read stdin without blocking script's execution using a vbscript?

#1
I am trying to find a way read stdin without blocking my vbscript's execution but still no luck.

What I want to achieve is the following (written in sh shell script):

for i in {1..3}; do
read input;
echo $input;
sleep 1;
if [ "$input" == "done" ]; then
echo "process done";
exit;
fi
done

Tried the following in vbscript but script hangs in the first iteration waiting for `Enter` in order to proceed

input=""
for i=1 to 3
WScript.Echo i
WScript.sleep (100);
If WScript.StdIn.AtEndOfStream Then
input = input & WScript.StdIn.Readline()
If input = "done" Then
WScript.Echo "process done"
End if
End If
Next

Is there a way not to block my script while reading stdin?
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through