|
vkill
金牌会员
     
积分 4103
发帖 1744
注册 2006-1-20 来自 甘肃.临泽
状态 离线
|
|
2006-10-19 21:20 |
|
|
3742668
荣誉版主
      
积分 2013
发帖 718
注册 2006-2-18
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
在倒计时中,时间还没倒数到0,有何方法可以中止计时呢?
方法比较多,无非就是设置一些标志,让脚本检测到标志后退出.比如判断某个文件是否存在,在则退出;或者判断注册表键值等等等等.
不过我建议还是在bat中用 taskkill /fi "WINDOWTITLE eq xxx"来实现,或者直接就结束wscript.exe.
另外由于昨天时间有限,没有完全解决你的问题.关于弹出窗口的指定坐标的问题,可以通过修改注册表来实现.
1.在HKEY_CURRENT_USER\Console下新建一个主键,名字就是 窗口标题名
2.然后在它右边建一reg_dword键:WindowPosition,取值为xxxxyyyy,其中xxxx是16进制的横坐标,yyyy为16进制的纵坐标,比如想让窗口基准坐标为10,10可以设置它的值为a000a
这样当你再打开一个 标题为上面步骤1建立的主键的字符时,窗口坐标就会出现在步骤2中指定的坐标处.
During the countdown, before the time reaches 0, what methods can be used to stop the timing?
There are many methods, basically setting some flags so that the script can detect the flag and exit. For example, judge whether a certain file exists, and if it does, exit; or judge the registry key value, and so on and so forth.
But I suggest using taskkill /fi "WINDOWTITLE eq xxx" in the bat to achieve it, or directly end wscript.exe.
In addition, due to limited time yesterday, the problem was not completely solved. Regarding the issue of specifying the coordinates of the pop-up window, it can be achieved by modifying the registry.
1. Under HKEY_CURRENT_USER\Console, create a new primary key, and the name is the window title name
2. Then create a reg_dword key on the right side: WindowPosition, the value is xxxxyyyy, where xxxx is the horizontal coordinate in hexadecimal, and yyyy is the vertical coordinate in hexadecimal. For example, if you want the window reference coordinates to be 10, 10, you can set its value to a000a
In this way, when you open a character with the title of the primary key established in the above step 1 again, the window coordinates will appear at the coordinates specified in step 2.
|
|
2006-10-20 08:05 |
|
|
voiL
中级用户
  
积分 384
发帖 189
注册 2005-10-19
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
Originally posted by 3742668 at 2006-10-20 08:05:
方法比较多,无非就是设置一些标志,让脚本检测到标志后退出.比如判断某个文件是否存在,在则退出;或者判断注册表键值等等等等.
不过我建议还是堮..
版主果真强人是也...
用taskkill来关闭进程比用Sendkeys要好得多也安全稳定得多...
不知是否系统因素...版主的命令行在我机子上测试还存在些小问题...
就是运行该命令后(指taskkill /fi....此命令),会提示 "信息: 没有运行的带有指定标准的任务。"
我看了一下taskkill的帮助之后,稍修改了一下: taskkill /fi "windowtitle eq xxx*"之后就没出错了.(标题后面加个通配符)
----------------------------------------------------------------------------
另外,希望无奈何版主看到此贴后能给小弟及各位坛友指点一下 msg 那命令...
我在CMD下看了N久msg的命令,也试着自己编写...
但都出现了 "获取会话名称时的错误 1702" 的错误提示(包括您给我写的命令)...
Originally posted by 3742668 at 2006-10-20 08:05:
There are many methods, nothing more than setting some flags so that the script detects the flag and exits. For example, determine whether a certain file exists; if it does, exit; or determine the registry key value, and so on and so forth.
But I suggest still...
The moderator is really powerful...
Using taskkill to close processes is much better and more stable and secure than using Sendkeys...
I don't know if it's a system factor... The command line of the moderator has some small problems when tested on my computer...
That is, after running this command (referring to taskkill /fi.... this command), it will prompt "Information: No running tasks with the specified criteria."
After I looked at the help of taskkill, I modified it a little: taskkill /fi "windowtitle eq xxx*" and then there was no error. (Add a wildcard after the title)
----------------------------------------------------------------------------
In addition, I hope that the helpless moderator will see this post and give me and all the forum friends some guidance on the msg command...
I have looked at the msg command in CMD for a long time and also tried to write it myself...
But all appeared the error prompt of "Error 1702 when getting the session name" (including the command you wrote for me)...
|
|
2006-10-20 09:09 |
|
|
3742668
荣誉版主
      
积分 2013
发帖 718
注册 2006-2-18
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
关于taskkill的问题,是由于你的标题与taskkill中的标题不一样导致的,尽管它们看上去一样.其实如果是我自己用的话我一定会用wmic process来结束进程,因为在它里面可以用commandline来判断启动的命令,绝对不会判断错误.
关于msg的问题,初步认为为没有开启相关的服务.个人猜测是和rpc相关的,建议看看Terminal Services服务是否启动,也可以运行wmic process where "caption='svchost.exe'" get commandline 查看是否存在C:\WINDOWS\system32\svchost -k DcomLaunch
C:\WINDOWS\system32\svchost -k rpcss
C:\WINDOWS\System32\svchost.exe -k netsvcs
C:\WINDOWS\system32\svchost.exe -k NetworkService
C:\WINDOWS\system32\svchost.exe -k LocalService
等服务.
当然,上面的都只是猜测,并不一定就是正确的.不过还是建议从服务上面下工夫.
p.s:我见过N多网上下的ghost版的XP都缺少不少功能的,特别是番茄花园的,另外home版的xp(你好象不是.)....
Regarding the issue with taskkill, it's because your title is different from the title in taskkill, although they seem the same. Actually, if I were using it myself, I would definitely use wmic process to end the process, because in it you can use commandline to judge the started command, and there will be absolutely no wrong judgment.
Regarding the issue with msg, it is initially considered that the relevant service is not enabled. Personally, I guess it is related to rpc. It is suggested to check whether the Terminal Services service is started, and you can also run wmic process where "caption='svchost.exe'" get commandline to see if there are services such as C:\WINDOWS\system32\svchost -k DcomLaunch, C:\WINDOWS\system32\svchost -k rpcss, C:\WINDOWS\System32\svchost.exe -k netsvcs, C:\WINDOWS\system32\svchost.exe -k NetworkService, C:\WINDOWS\system32\svchost.exe -k LocalService, etc.
Of course, the above are all just guesses and may not necessarily be correct. But it is still suggested to work on the services.
P.S: I have seen that many ghost versions of XP downloaded from the Internet are missing many functions, especially those of Tomato Garden, and also the home edition of XP (you don't seem to be...).
|
|
2006-10-20 09:28 |
|
|
voiL
中级用户
  
积分 384
发帖 189
注册 2005-10-19
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
版主果然厉害.
我用的是蕃茄的系统,不过不是Ghost的,是原版纯安装的...
另外是用了蕃茄的服务优化再手动开启了一些需要的服务...
wmic process where "caption='svchost.exe'" get commandline 之后显示如下:
C:\WINDOWS\system32\svchost -k DcomLaunch
C:\WINDOWS\system32\svchost -k rpcss
C:\WINDOWS\System32\svchost.exe -k netsvcs
C:\WINDOWS\system32\svchost.exe -k NetworkService
C:\WINDOWS\system32\svchost.exe -k imgsvc
非常感谢3742668版主的热心和耐心...
来这里一年有余,我学到了不少东西...
究其因就是因为这里在很多如版主般热心的朋友...
在此说声: 谢谢3742668版主,谢谢论坛上帮助过我的朋友...
The moderator is really powerful.
I'm using Tomato's system, but it's not a Ghost one, it's an original pure installation...
In addition, I used Tomato's service optimization and then manually enabled some needed services...
After executing "wmic process where "caption='svchost.exe'" get commandline", the following is displayed:
C:\WINDOWS\system32\svchost -k DcomLaunch
C:\WINDOWS\system32\svchost -k rpcss
C:\WINDOWS\System32\svchost.exe -k netsvcs
C:\WINDOWS\system32\svchost.exe -k NetworkService
C:\WINDOWS\system32\svchost.exe -k imgsvc
Thank you very much, moderator 3742668 for your enthusiasm and patience...
I've been here for more than a year, and I've learned a lot...
The reason is that there are many friends like the moderator who are enthusiastic...
Here I want to say: Thank you, moderator 3742668, and thank the friends who have helped me on the forum...
|
|
2006-10-20 11:02 |
|
|
voiL
中级用户
  
积分 384
发帖 189
注册 2005-10-19
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
嗯.对了,msg后的错误我想应该就是Terminal Services服务关闭产生的问题.
因为我计算机里Terminal Services服务正是关闭了的.
Well. By the way, the error after msg should be caused by the shutdown of the Terminal Services service. Because the Terminal Services service in my computer is exactly shut down.
|
|
2006-10-20 11:15 |
|
|