lshirley35 Posted December 16, 2015 Posted December 16, 2015 Hello, i'm wondering if someone could lend me a hand on how to let people select a workstation with the drop down menu as shown, and then type the message that will pop up via MSG.exe and hit submit and it will be received. My script so far is justexpandcollapse popup</HEAD> <BODY> <SCRIPT LANGUAGE="VBScript"> Sub Window_OnLoad Window.Site.Focus End Sub Sub btn01_OnClick msg = "C:\Windows\System32\msg.exe" RunWait() End Sub Sub btn02_OnClick Window.Close End Sub </SCRIPT> <H2>Drop Down Example</H2> <P>Please select the station: <SELECT NAME="Site"> <OPTION>ENCP001</OPTION> <OPTION>ENCP002</OPTION> <OPTION>ENCP003</OPTION> <OPTION>ENCP004</OPTION> <OPTION>ENCP005</OPTION> <OPTION>ENCP006</OPTION> <OPTION>ENCP007</OPTION> <OPTION>ENCP008</OPTION> <OPTION>ENCP009</OPTION> <OPTION>ENCP010</OPTION> <OPTION>ENCP011</OPTION> <OPTION>ENCP012</OPTION> <OPTION>ENCP013</OPTION> <OPTION>ENCP016</OPTION> </SELECT><P> <BR> <BR> <Input = InputBox("Enter your message")> <BR> <BR> <Input Type = "Button" Name = "btn01" VALUE = "SUBMIT"> <Input Type = "Button" Name = "btn02" VALUE = "CLOSE"> <BR> <BR> </BODY>
spudw2k Posted March 8, 2016 Posted March 8, 2016 One way expandcollapse popup</HEAD> <BODY> <SCRIPT LANGUAGE="VBScript"> Sub Window_OnLoad Window.Site.Focus End Sub Sub btn01_OnClick 'Define CMD to Execute strCMD = "C:\Windows\System32\msg.exe" 'Collect Selected Option With document.all.site strSite = .item(.selectedIndex).text End With 'Collect MSG strMSG = document.all.input.value If strMSG & "MT" = "MT" Then msgbox "MSG cannot be blank.", , "Invalid MSG" Exit Sub End If 'Create Parameters strParams = " /SERVER:" & strSite & " " & chr(34) & strMSG & chr(34) 'Execute CMD msgbox strCMD & strParams, , "CMD to Execute" Set WshShell = CreateObject("WScript.Shell") 'wshShell.Run(strCMD & strParams, 0, True) End Sub Sub btn02_OnClick Window.Close End Sub </SCRIPT> <H2>Drop Down Example</H2> <P>Please select the station: <SELECT NAME="Site"> <OPTION>ENCP001</OPTION> <OPTION>ENCP002</OPTION> <OPTION>ENCP003</OPTION> <OPTION>ENCP004</OPTION> <OPTION>ENCP005</OPTION> <OPTION>ENCP006</OPTION> <OPTION>ENCP007</OPTION> <OPTION>ENCP008</OPTION> <OPTION>ENCP009</OPTION> <OPTION>ENCP010</OPTION> <OPTION>ENCP011</OPTION> <OPTION>ENCP012</OPTION> <OPTION>ENCP013</OPTION> <OPTION>ENCP016</OPTION> </SELECT><P> <BR> <BR> <Input = InputBox("Enter your message") name="input"> <BR> <BR> <Input Type = "Button" Name = "btn01" VALUE = "SUBMIT"> <Input Type = "Button" Name = "btn02" VALUE = "CLOSE"> <BR> <BR> </BODY> Reveal hidden contents Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
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