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-07 23:33
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to switch windows using VBS scripts? View 1,946 Replies 9
Original Poster Posted 2006-11-17 06:33 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

Wait, I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

Wait, I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the official website, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help我想使用VBS脚本返回3个窗口的句柄,然后根据返回的句柄激活任意窗口按需。谁能帮我?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate任何窗口根据返回的句柄按需。谁能帮我?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script commands to return the window handles of 3 windows, and then activate any window according to the returned window handles as needed. Who can help me?

I want to use VBS script to落实返回3个窗口的句柄,然后根据返回的句柄激活任意窗口按需。谁能帮我?

Wait, let's start fresh with the original user query translation:

I want to use VBScript commands to return the window handles of 3 windows, and then activate any window as needed based on the returned window handles. Who can help me?
Floor 2 Posted 2006-11-18 00:18 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
CreateObject("WScript.Shell").AppActivate "Window title bar name"
Recent Ratings for This Post ( 3 in total) Click for details
RaterScoreTime
redtek +1 2006-11-18 00:21
ccwan +1 2006-11-18 00:40
maya0su +1 2006-11-18 23:55

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 3 Posted 2006-11-18 22:08 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
Floor 4 Posted 2006-11-18 22:18 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
Floor 5 Posted 2006-11-18 23:04 ·  中国 北京 联通
银牌会员
★★★
努力做坏人
Credits 1,185
Posts 438
Joined 2006-08-28 12:00
19-year member
UID 61449
From 北京
Status Offline
For activating the program window, using the appactivate method is correct. If activating, it is suggested that the moderator call the createobject("wscript.shell") object and then use its method.exec("program name") to start the program, and then use the appactivate program name.processid property to activate the program window.....
我今后在论坛的目标就是做个超级坏人!!!
Floor 6 Posted 2006-11-19 01:24 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
That won't work. Can the斗地主 game in QQ Games be started separately? The 3 windows need to be started first, and then the corresponding window is activated as needed. This is my requirement
Floor 7 Posted 2006-11-29 00:07 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
CreateObject("WScript.Shell").AppActivate "窗口标题栏的名字"
This is not very effective.
Sometimes it can't bring the activated window to the top.

Can it achieve the effect like pressing {AIT}+{TAB} where the activated window is on top?

[ Last edited by yishanju on 2006-11-29 at 12:12 AM ]
Floor 8 Posted 2006-12-01 06:50 ·  中国 广东 肇庆 四会市 电信
中级用户
★★
Credits 384
Posts 189
Joined 2005-10-19 13:12
20-year member
UID 43709
Gender Male
Status Offline
I remember that moderator 3742668 seems to have said that wmic can get the window title, but I don't know the specific usage, it is suggested to ask moderator 3742668 to see it.
Floor 9 Posted 2006-12-01 06:51 ·  中国 广东 肇庆 四会市 电信
中级用户
★★
Credits 384
Posts 189
Joined 2005-10-19 13:12
20-year member
UID 43709
Gender Male
Status Offline
Originally posted by yishanju at 2006-11-29 00:07:
CreateObject("WScript.Shell").AppActivate "Window title bar name"
This is not very effective.
Sometimes the activated window cannot be brought to the top.

Can achieve switching windows...


This is very useful. I often use this to switch windows.

As long as the window title is correct, plus appropriate delay, it can be done.
Floor 10 Posted 2008-03-27 22:59 ·  中国 浙江 嘉兴 海宁市 电信
中级用户
★★
Credits 360
Posts 216
Joined 2007-05-29 17:41
19-year member
UID 89677
Gender Male
Status Offline
I remember that moderator 3742668好像 said that wmic can get window titles.

I'm also looking for it. Does anyone know?

How to use wmic to get window titles??

wmic process get process ID number/process name/process path, why is there no title corresponding to the process???

[ Last edited by bd123456789 on 2008-3-27 at 11:04 PM ]
Forum Jump: