evod510 Posted April 21, 2004 Share Posted April 21, 2004 Greetings, Need help on the progress bar for Net Send script that i did. Need the progress bar so that the user know that the program is still running and trying to send the message Do $PC = InputBox("Message To", "Please Specify Name:") If @error == 1 Then Exit Until $PC <> " " Do $Text = InputBox("Message Text", "Enter your message.") If @error == 1 Then Exit Until $Text <> " " if RunWait(@comspec & " /c net send "& $PC &" "& $Text,"",@sw_hide) == 0 Then MsgBox(0, $PC,"Message Send") Else MsgBox(0, $PC,"Cannot Send Message") EndIf Where should i insert the progress code ... Thanks Link to comment Share on other sites More sharing options...
jterwelp Posted April 21, 2004 Share Posted April 21, 2004 A progress bar doesn't really fit your situation. If you were doing net sends to a group of computers, you would divide 100 by the number of computers to get the increment amount. Then, after each net send, you would add the increment amount to the progress bar. In your situation with a single net send, a progress bar doesn't work for two reasons. One, you're using RunWait to get the return code of the net command. This pauses your script until the net send is complete. Second, you're running a single command: how would you know how fast to increment the progress bar so it's at exactly 100% when the net send completes? I'd recommend you use SplashTextOn with a "Net Send in Progress" type of message. Jeff Link to comment Share on other sites More sharing options...
Josbe Posted April 21, 2004 Share Posted April 21, 2004 The process NET SEND vary. In some PC arrive more fast than anothers. Some imprecise. (maybe the network connection) RunWait(....) = 0, is way if arrive correctly. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
evod510 Posted April 22, 2004 Author Share Posted April 22, 2004 thank you for your info i will try to use both suggestion TQ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now