Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript with html... script does not launch application

Status
Not open for further replies.

mnik3

Technical User
May 11, 2009
10
US
Could someone please explain to me why my script is not launching the targeted application (it works just fine outside of the .html file as a .vbs file, and if you have some .html knowledge, why are my area maps not working correctly(there are blue borders around the enclosed area, but they are not entirely click-able: ie. only pieces of the area in the blue border make the mouse icon turn into a hand)?? By the way, this is being generated and launched by vba/excel from another application, if that helps anything. Thanks!

<html>

<Title>Trending Comparison - Systems Engineering</Title>

<head>
<script language="VBScript">
function openit(var)
Set objShell = CreateObject("Wscript.Shell")
objShell.Run("cmd.exe /c ~local location~\" & var & ".ezt"), 0, TRUE
end function
</script>
</head>

<img src="file://localhost/~local location~\24-ACU0702.bmp" width = "710" height = "463" USEMAP="#24-ACU0702" />
<MAP NAME=24-ACU0702>
<AREA SHAPE="RECT" COORDS="15,0,478,710" HREF="#"onclick=openit("24-ACU0702") >
</MAP>

<SPAN style="position: absolute; top: 15 px; left: 728 px;width: 710 px; height: 463 px"> <img src="file://localhost/~local location~\48-ACU0702.bmp" width = "710" height = "463" USEMAP="#48-ACU0702" /></span>
<MAP NAME=48-ACU0702>
<AREA SHAPE="RECT" COORDS="15,728,478,1438" HREF="#"onclick=openit("48-ACU0702") >
</MAP>

<img src="file://localhost/~local location~\1m-ACU0702.bmp" width = "710" height = "463" USEMAP="#1m-ACU0702" />
<MAP NAME=1m-ACU0702>
<AREA SHAPE="RECT" COORDS="478,0,941,710" HREF="#"onclick=openit("1m-ACU0702") >
</MAP>

<SPAN style="position: absolute; top: 486 px; left: 728 px;width: 710 px; height: 463 px"> <img src="file://localhost/~local location~\3m-ACU0702.bmp" width = "710" height = "463" USEMAP="#3m-ACU0702" /></span>
<MAP NAME=3m-ACU0702>
<AREA SHAPE="RECT" COORDS="486,728,949,1438" HREF="#"onclick=openit("3m-ACU0702") >
</MAP>

<img src="file://localhost/~local location~\24-ACU0705.bmp" width = "710" height = "463" USEMAP="#24-ACU0705" />
<MAP NAME=24-ACU0705>
<AREA SHAPE="RECT" COORDS="941,0,1404,710" HREF="#"onclick=openit("24-ACU0705") >
</MAP>

<SPAN style="position: absolute; top: 957 px; left: 728 px;width: 710 px; height: 463 px"> <img src="file://localhost/~local location~\48-ACU0705.bmp" width = "710" height = "463" USEMAP="#48-ACU0705" /></span>
<MAP NAME=48-ACU0705>
<AREA SHAPE="RECT" COORDS="957,728,1420,1438" HREF="#"onclick=openit("48-ACU0705") >
</MAP>

<img src="file://localhost/~local location~\1m-ACU0705.bmp" width = "710" height = "463" USEMAP="#1m-ACU0705" />
<MAP NAME=1m-ACU0705>
<AREA SHAPE="RECT" COORDS="1404,0,1867,710" HREF="#"onclick=openit("1m-ACU0705") >
</MAP>

</html>
 
Save your HTM file as an HTA and see if that does the trick.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top