Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '========================================================================
- dim fso: set fso = CreateObject("Scripting.FileSystemObject")
- dim CD
- CD = fso.GetAbsolutePathName(".")
- '========================================================================
- Dim userName
- userName = "Dmill035"
- Dim limit
- limit = 3
- dim commandS
- commandS = ""
- dim rawInput
- rawInput = ""
- '========================================================================
- Dim objIE
- Set objIE = CreateObject( "InternetExplorer.Application" )
- objIE.Navigate cd & "\main.html"
- objIE.Document.title = "Session Manager!"
- objIE.ToolBar = False
- objIE.Resizable = False
- objIE.StatusBar = False
- objIE.Width = 700
- objIE.Height = 300
- Do While objIE.Busy
- WScript.Sleep 200
- Loop
- objIE.Visible = True
- 'On Error Resume Next
- '========================================================================
- Function print(uN,c,data)
- objIE.document.getElementByID("content").innerHTML = objIE.document.getElementByID("content").innerHTML & "<p style='color:"& c &";'>"& uN &": "& data & "</p>"
- end function
- '========================================================================
- Function argExist(args,var)
- if Ubound(args) => var then
- argExist = true
- else
- argExist = false
- end if
- end function
- '========================================================================
- Function quit
- objIE.quit
- wscript.quit
- end function
- '========================================================================
- Function CParse(rawArgs)
- args = split(rawArgs, " ")
- select case lcase(args(0))
- case "/help"
- help(args)
- case "/session"
- session(args)
- case "/exit"
- quit
- case else
- print "@","red", "Unknown command use /help for more information"
- end select
- commandS = ""
- end function
- '========================================================================
- Function session(args)
- if argExist(args,1) then
- select case lcase(args(1))
- case "join"
- sessionJoin(args)
- case "leave"
- case "create"
- case "manage"
- case else
- print "@", "red", "Invalid command usage!"
- end select
- else
- print "@", "red", "Invalid usage of /session use ""/help session"""
- end if
- end function
- '========================================================================
- Function sessionJoin(args)
- if argExist(args,2) then
- print "@","red", "Attempted to open session: " & args(2)
- else
- print "@","red", "Missing session name. Use /help session"
- end if
- end function
- '========================================================================
- Function sessionHelp(args)
- if argExist(args,2) then
- else
- print"@","red","/session join <sessionName> </br> "
- end if
- end function
- '========================================================================
- Function help(args)
- if argExist(args,1) then
- select case args(1)
- case "session"
- case else
- print"@","red","Unknown help article"
- end select
- else
- print"@","red","Available commands are /help /session /exit"
- print"@","red","Available help options: session"
- end if
- end function
- '========================================================================
- While True
- if objIE.document.getElementByID("readyState").value = "1" Then
- rawInput = objIE.document.getElementByID("userInput").value
- if left(rawInput,1) = "/" then
- CParse(rawInput)
- else
- if not(isEmpty(rawInput)) and rawInput = "" then
- print "@","red","Please type something before hitting enter."
- else
- print userName, "white", rawInput
- end if
- end if
- rawInput = ""
- objIE.document.getElementById("content").scrollTop = objIE.document.getElementById("content").scrollHeight
- objIE.document.getElementByID("readyState").value = "0"
- objIE.document.getElementById("userInput").disabled = false
- objIE.document.getElementById("userInput").value = ""
- objIE.document.getElementById("userInput").focus()
- end if
- wscript.sleep(200)
- Wend
- '========================================================================
- <!-- saved from url=(0017)http://localhost/ -->
- <html>
- <head>
- <style>
- body{
- Background-Color:black;
- Color:white;
- }
- #content{
- Width: 100%;
- Height: 90%;
- Border-style: solid;
- Border-width: thin;
- Border-color: white;
- overflow: auto;
- }
- #content p {
- padding:0px;
- margin:0px;
- Border-bottom-style: dotted;
- Border-bottom-width: thin;
- Border-bottom-color: white;
- }
- #container{
- width:100%;
- height:100%;
- min-width:600px;
- min-height:150px;
- }
- #UserInput{
- width:90%;
- }
- </style>
- <script type="text/javascript">
- function setTrue(variable){
- var s = document.getElementById(variable);
- s.value = "1";
- document.getElementById("userInput").disabled = true;
- }
- </script>
- <title>Session Manager!</title>
- </head>
- <body onLoad="">
- <div id="container">
- <div id="content">
- </div>
- <input id="userInput" onKeyDown="if (event.keyCode == 13) setTrue('readyState');" type="textarea" value=""></input>
- <input type="submit" value="Send" OnClick="setTrue('readyState');" ></input>
- <input type="hidden" value="0" id="readyState"></input>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement