Computing.Net > Forums > Programming > VBS combo box in batch

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VBS combo box in batch

Reply to Message Icon

Name: brockey01
Date: May 27, 2009 at 19:56:54 Pacific
OS: Windows XP
CPU/Ram: 1024
Product: Hewlett-packard / Sd2100
Subcategory: Batch
Comment:

ok Reno has help me figure out/show me that i can use VBS input and VBS yes no box.

does VBS have combo boxes? i googled it but didnt get much.

is it possible to add a combobox in batch?

Thank you
Brock



Sponsored Link
Ads by Google

Response Number 1
Name: reno
Date: May 28, 2009 at 01:37:03 Pacific
Reply:

i check the vbscript documentation, it seems there is no combo box.

here is the dirty way using ie combobox, i am struggling the html code, since i've little knowledge on html:

set ie=createobject("internetexplorer.application")
ie.addressbar=0:ie.menubar=0:ie.toolbar=0:ie.statusbar=0
ie.width=300
ie.height=100
ie.navigate2 "about:blank"

ie.document.body.innerHtml= _
	"<select size='1' name='Listbox1'>" & _
	"<option value='1'>Option 1</option>" & _
	"<option value='2'>Option 2</option>" & _
	"<option value='3'>Option 3</option>" & _
	"<option value='4'>Option 4</option>" & _
	"</select>" & _
	"<input type=hidden id=selected value=0>" & _
	"<input type=submit onclick='vbscript:selected.value=listbox1.value'>"

ie.visible=true
do while ie.document.getelementbyid("selected").value=0:wsh.sleep 200:loop
selected=ie.document.getelementbyid("selected").value
ie.quit:set ie=nothing

wsh.echo "you selected " & selected


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: VBS combo box in batch

Combo Boxes in VBA www.computing.net/answers/programming/combo-boxes-in-vba/9015.html

Combo Box Programming on Access using VB www.computing.net/answers/programming/combo-box-programming-on-access-using-vb/2256.html

Text Input Box in a Batch File www.computing.net/answers/programming/text-input-box-in-a-batch-file/15016.html