1.

Solve : Calling user input results in vbs??

Answer»

Hi, I'm making a web 'client' through vbs, but i'm having problems with the code syntax. Here's the code:
Code: [Select]set Window = CreateObject("InternetExplorer.Application")

Function myFunction()
fname=InputBox("Enter Website address","Userinput")
fmane=InputBox("Enter WIDTH (Max = 1024)","Userinput")
fmene=InputBox("Enter Height (Max = 768)","Userinput")
END Function


Window.RegisterAsBrowser = True
Window.Navigate("") ' Inputbox fname
Window.MenuBar = False
Window.ToolBar = False
Window.AddressBar = False
Window.StatusBar = False
Window.FullScreen = False
Window.Resizable = False
Window.Visible = True
Window.Width = ' Inputbox fmane
Window.Heigh = ' Inputbox fmene
Window.Left = 0
Window.Top = 0Would I have to separate the inputbox's into different functions? and how is the syntax (where noted) used?
Thanks for any time spent answering.I took the LIBERTY of moving the visible property to the end. It's better to have all the window properties established before showing the IE window.

Code: [Select]Set Window = CreateObject("InternetExplorer.Application")

Window.RegisterAsBrowser = True
Window.Navigate(InputBox("Enter Website address","User Input"))
Window.MenuBar = False
Window.ToolBar = False
Window.AddressBar = False
Window.StatusBar = False
Window.FullScreen = False
Window.Resizable = False
Window.Width = InputBox("Enter Width (Max = 1024)","User Input")
Window.Height = InputBox("Enter Height (Max = 768)","User Input")
Window.Left = 0
Window.Top = 0
Window.Visible = True

Good luck.



Discussion

No Comment Found