Your IP

Showing posts with label VBS. Show all posts
Showing posts with label VBS. Show all posts

Tuesday, November 17, 2009

heres my menu.vbs made by a friend ( http://jagstechblog.blogspot.com )

ok 1st open notepad
then copy and past this

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Option Explicit


Dim oWSH, oEXE, oIE, iHeight, iWidth, sHTML, sEXE


Set oWSH = CreateObject("WScript.Shell")
Set oEXE = CreateObject("Scripting.Dictionary")
Set oIE = WScript.CreateObject("InternetExplorer.Application", "IE_")


' § Add Programs to the dictionary §
oEXE("Notepad") = "%SystemRoot%\system32\notepad.exe"
oEXE("Calculator") = "%SystemRoot%\system32\calc.exe"
oEXE("Paint") = "%SystemRoot%\system32\mspaint.exe"
oEXE("DOS Window") = "%comspec%"


' § Configure the Internet Explorer window §
oIE.Navigate "about:blank"
Do Until oIE.ReadyState = 4
WScript.Sleep 100
Loop
iHeight = 60 + (oEXE.Count * 25)
iWidth = 300
oIE.document.parentWindow.resizeTo iWidth, iHeight
oIE.document.title = "Click on a button..." & String(50, Chr(160))
oIE.addressBar = False
oIE.toolBar = False
oIE.statusBar = False
oIE.document.body.scroll = "no"
sHTML = "
"


' § Loop through the dictionary & create application buttons §
For Each sEXE in oEXE
sHTML = sHTML & "
"
Next


' § Write the generated HTML to Internet Explorer §
sHTML = sHTML & "
"
oIE.document.body.innerHTML = sHTML


' § Create references for the buttons created above §
For Each sEXE in oEXE
oIE.document.getElementById(sEXE).onClick = GetRef("Click")
Next


' § Make the Internet Explorer windows visible & focus it §
oIE.visible = True
oWSH.AppActivate oIE.document.title


' § Sit in an endless loop until Internet Explorer is closed §
Do
WScript.Sleep 100
Loop


' § Terminate the VBScript when the IE window is closed §
Sub IE_OnQuit
WScript.Quit
End Sub


' § When a button is clicked, launch the associated program §
Sub Click
Dim sProgram
sProgram = oEXE(oIE.document.parentWindow.event.srcElement.id)
oWSH.Run """" & sProgram & """", 1, False
End Sub
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


then flie save as menu.vbs
and open it. it is going to look like this

Sunday, November 15, 2009

vbs

making a VBS file can be hard but here is an easy one that i call chatbox i didn't make this a friend did. ok here is how to make it
open a New Text Document
then copy and past this

dim fname
fname=inputbox("Hi! What's your name?")
fname=inputbox("How are you " & fname )
fname=inputbox("Why are you feeling " & fname)
fname=inputbox("That makes sense. So what are you doing?")
fname=inputbox("Of Course!!! I should have known you would be doing that! Well is it fun?")


same this as chatbox.vbs
then open it

VBS

Text Here