China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-02 00:33
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to use VBS to create a form that contains buttons, text boxes, and message boxes? View 1,628 Replies 9
Original Poster Posted 2006-08-04 08:50 ·  中国 浙江 宁波 慈溪市 电信
初级用户
★★
Credits 131
Posts 53
Joined 2006-07-31 09:06
20-year member
UID 59539
Status Offline
How to use VBS to create a form that includes buttons, text boxes, and message boxes?
Floor 2 Posted 2006-08-05 19:22 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
Floor 3 Posted 2006-08-06 18:38 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Keywords: AutoIt

This thing is really very powerful!

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 4 Posted 2006-08-11 22:50 ·  中国 浙江 宁波 电信
初级用户
★★
Credits 131
Posts 53
Joined 2006-07-31 09:06
20-year member
UID 59539
Status Offline
My English is not good, I don't know how to use it.
Floor 5 Posted 2006-08-11 23:13 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Using vbs's InternetExplorer.Application is also okay. Do you know how to write HTML directly?

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 6 Posted 2006-08-12 00:34 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
20-year member
UID 44210
Status Offline
These past two days I have indeed learned to use InternetExplorer.Application to create a form, and I can perform multiple variable settings within the form. However, I discovered a small issue with using a BAT to generate a VBS script from variable data and then generating an HTML form: when you haven't opened any IE windows, the generated HTML form automatically appears in front of the BAT's CMD window; but if there are IE windows open, the generated HTML form will be displayed behind the BAT's CMD window.
Floor 7 Posted 2006-08-12 10:36 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Then still use hta, with greater permissions

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 8 Posted 2006-08-12 11:35 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
20-year member
UID 44210
Status Offline
Originally posted by electronixtar at 2006-8-12 10:36:
Then still use HTA, which has more permissions

Another incomprehensible HTA
Floor 9 Posted 2006-08-12 12:36 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Changing a .html file to .hta makes it an HTA.

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 10 Posted 2006-08-12 12:53 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
Originally posted by zxcv at 2006-8-12 00:34:
These days I have learned to use InternetExplorer.Application to create forms, and can perform multiple variable settings in the form

But I found a way to generate a VBS script from a BAT with variable data and then generate an HTM...


AppActivate Method
See Also
Run Scripts | WshShell Object | SendKeys Method
Activates an application window.

object.AppActivate title
Parameters
object
WshShell object.
title
Specifies which application to activate. It can be a string containing the title of the application (the same as it appears in the title bar) or the process ID


------------Excerpted from "Microsoft Windows Script Technology"
Forum Jump: