Discussion Locked

.vbs-script problem

0 helpful
30 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

----"problem script":---------------
Set MyIE = CreateObject("InternetExplorer.Application")
MyIE.height="230"
MyIE.width="700"
MyIE.visible=TRUE
MyIE.toolbar=FALSE
MyIE.statusbar=FALSE
MyIE.scrollbar=FALSE
MyIE.resizable=FALSE
MyIE.Navigate "test.htm"
-------- questions :------------
1.
script should start test.htm in 700x230 iexplorer-window.

even when script is in same folder as test.htm iexplorer try to find "http://test.htm"

when i use the path f.e. "d:\test.htm" page open fine.

is there any solution to use relative path "test.htm" in script??

2.
script should start "naked" browser window:
no tool/status/scrollbars
the lines: "MyIE.toolbar=FALSE / MyIE.statusbar=FALSE / MyIE.resizable=FALSE" are workingas expected, but line: MyIE.scrollbar=FALSE produce runtime error.

how to "descript" the scrollbar??

thx4u

30 replies

by saihib

For the first part of your question you will need to create a virtual directory that maps to d:\ through the IIS Administration API.
For the second part you will need to find the properties for the object. You can do this at MSDN online help. It could be that you need to use "scrollbars" or "v-scrollbar" or "h-scrollbar" for vertical and horizontal bars.

by deamaik

For the first part of your answer:
Where is my benefit when I have "...to create a virtual directory that maps to d:\ through the IIS Administration API"... ?? I?d prefer to simply keep using "D:\test.htm" what works fine, you remember?
What I need is a syntax to enable the script to open my test.htm just by being
in the same directory using the html-file?s name.

For the second part of your answer:
When I find my solutions at MSDN online help, you?ll never have the chance to earn my points, will you?
I already used "scrollbars" or "v-scrollbar" or "h-scrollbar" for vertical and horizontal bars with the same result.

Thank?s for trying.

Try again harder! Please.

by deamaik

"The page you're looking for has been moved or removed from the site"

Nice try too.

by compsci

Cut and paste the previously sent url, then remove the space in the word "reference" in the Address Bar to get to the page. Hope that it is helpful.

by deamaik

sorry ?bout the undetected "spacefault".
i just copypaste your url without checking for gaps.

this time i was really linked to a detail description of the properties, methods, and events of the IE object.

unfortunately i?m not a programmer(and, of course, i?ve no contact to one)
so i don?t know what to do with all this
funny little tags what look so different from the ones in my "script-from-the-top-of-this-page".

pleasepleaseplease one of you skilled programmerprofs copypaste this script,
put it in your answer and change the syntax to enable the script to open my test.htm by just by being in the same directory using the html-file?s name.
(and kill the scrollbar if possible)

i level up to 500 points for the working script (sorry i?m still a fresh and poor tech-republican)

hope 2cu soon

by saihib

Please note: The "scrollbars=" line must be the last line of the script or it will not fully execute. You must also use a valid URL or the script will return a blank page. You can't use Navigate "C:\test.htm." That's why I suggested a virtual directory before.

by deamaik

thanx, but did?nt work for me.
I?ve no problem to open the perfectly shaped html-site from withhin a first html-site.

I?m to tired to rewrite my special needs
again (andagainandagainand...)

by olivier_de-polignac

You can use WScript to know the current path and then "Navigate" using the full path. Here is the code:

Dim ms_Path
ms_Path = wScript.ScriptFullName

ms_Path = Left(ms_Path, InStrRev(ms_Path, "\"))

Set MyIE = CreateObject("InternetExplorer.Application")
MyIE.height="230"
MyIE.width="700"
MyIE.visible=True
MyIE.toolbar=True
MyIE.statusbar=True
'MyIE.scrollbar=FALSE
MyIE.resizable=True
MyIE.Navigate ms_Path & "test.htm"

This discussion is closed to new replies.