Sign in to follow this  
Followers 0
ioliver

Gui For Net Send

1 post in this topic

Thanks for all the help I've received on the Forums. This is my first try at a GUI, it's not much and I'm sure the code could be cleaner. But, I just wanted to submit it anyway.

; NetMsg.au3
; August 5, 2004

; A NetSend Utility

Opt("GUINotifyMode", 1)
GUICreate("NetMsg / A NetSend Utility", 300, 200)
  GUISetControl("Label", "Username:", 10, 10)
  $user = GUISetControl("Input", "Username", 10, 25)
  GUISetControl("Label", "Message:", 10, 60)
  $msg = GUISetControl("Input", "Type your message here", 10, 75, 280)
  $netsend = GUISetControl("Button", "Send", 10, 110, 100)
  $quit = GUISetControl("Button", "Exit", 190, 110, 100)
GUIShow()

While 1
  $x = GuiMsg()

  Select
  Case $x = $netsend
    $user1 = GuiRead($user)
    $msg1 = GuiRead($msg)
    RunWait(@ComSpec & " /c " & "net send " & $user1 & " " & $msg1, "", @SW_HIDE)
    MsgBox(0, "NetMsg / A NetSend Utilty", "Message: " & $msg1 & " Sent to User: " & $user1)

  Case $x = $quit
    Exit
  EndSelect
WEnd

Any comments are ideas on how to improve it, and my scripting skills are welcome.

Thanks again,

Ian


"Blessed be the name of the Lord" - Job 1:21Check out Search IMF

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