vbscript custom buttons??

November 19, 2011 at 19:10:52
Specs: Windows xp
My friend and I make a program at school that all students can use. We usually write it in a batch file, but I wanted mouse clicks, so I have been learning VBS. I want to make a menu that uses "custom" buttons that instead of saying yes or no says "notepad, web browser, log off", but I can't find any tutorials or help on it. I don't want to have to type in a number. Here is the code so far:

login = inputbox ("Enter Login:")
if login = password then
msgbox "hello"

msgbox "Incorrect"
End If

if login = password then
strt = inputbox ("What Program would you like to start?")
sub shell(cmd)
' Run a command as if you were running from the command line
dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
Set objShell = Nothing
end sub
shell strt
End If

Thank you in advance!

See More: vbscript custom buttons??

Report •

November 20, 2011 at 05:44:54
You really only have two options.
1) Use IE as a front end. Note that you'd need to keep the script outside of IE, because IE won't allow you to run an application while inside IE.

2) Pick up a language that allows you to design a window. The only scripting language that comes to mind would be VBA, but then you'd be tied to Excel or Word. I suppose Powershell could do it, as it can run arbitrary C# code, but at that point you might as well just use C# without the Powershell wrapping.

How To Ask Questions The Smart Way

Report •
Related Solutions

Ask Question