Sign in to follow this  
Followers 0
evod510

Net Send

4 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

:D 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. :huh2:

Share this post


Link to post
Share on other sites

thank you for your info

i will try to use both suggestion

TQ

:D

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0