加入收藏 | 设为首页 | Life家族 | SCMLife | RMLife | PMLife | SQALife | TESTLife | 企业VIP专区 | 中文化荣誉殿堂
 
发新话题
打印

[已解决] CQ Hook 中不能调用WScript对象的sleep方法( 此文章被查看:1222次,被回复:5篇!! )

CQ Hook 中不能调用WScript对象的sleep方法

最近在试验在 CQ Hook 中用VBScript脚本中调用Winsocket API发送信息给另外一测试系统,但是WScript对象的sleep方法在CQ Hook中不能用,总是报错:The reason for the failure was:  Object required: 'Wscript'

请教该如何处理?


问题已经解决 [打开主题]
本主题的最佳答案为 [ 4 楼].



© 本文为 wqj104SCMLife 共同所有,未经同意,请勿转载 ©如该文侵犯了您的版权,请联系管理员

TOP

回复 #1 wqj104 的帖子

刚到IBM Support上看了,
ClearQuest是不支持这个的~

[ 本帖最后由 yunshan 于 2007-5-25 15:58 编辑 ]



© 本文为 yunshanSCMLife 共同所有,未经同意,请勿转载 ©如该文侵犯了您的版权,请联系管理员

TOP

WScript是WSH的根对象,脚本中应该可以直接使用的。

请问该如何创建WScript对象呢?



© 本文为 wqj104SCMLife 共同所有,未经同意,请勿转载 ©如该文侵犯了您的版权,请联系管理员

TOP

http://www-1.ibm.com/support/docview.wss?uid=swg1IC42825

IC42825: UNABLE TO USE THE VBSCRIPT SLEEP METHOD FOR THE WSCRIPT METHOD.

APAR status
Closed as Permanent restriction.

Error description When you use the "Sleep" method for the Wscript object in aVBScript hook, an error message is generated:ERROR! Execution of a hook failed during action <action name>.It was the <action type> hook attached to theDefect <defect number>.  The reason for the failure was:  Objectrequired: 'Wscript' Steps to Reproduce:*******************1.) Create an action hook with the VBScript code:Set MyShell = CreateObject("WScript.Shell")WScript.Sleep 5000MyShell.Run shell_cmd, 7, 12.) Execute the action from within the ClearQuest native windowsclient.  You will receive the error message.Local fix No Known Workaround.Problem summary this can be reproduced in a VB app.  Please contact Microsoftfor  patches to VB that may address this.Problem conclusion no plan to fix in ClearQuestTemporary fix Comments
APAR information
APAR numberIC42825
Reported component nameRATL CLRQUEST V
Reported component ID5724F2000
Reported releaseALL
StatusCLOSED PRS
PENoPE
HIPERNoHIPER
Special AttentionNoSpecatt
Submitted date2004-09-22
Closed date2005-05-17
Last modified date2005-05-17

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:

Modules/Macros
DEFSRXXX

Publications Referenced

Fix information
Applicable component levels



最佳答案
该回答被楼主/管理员列为正解!

© 本文为 yunshan 所有,未经同意,请勿转载
©如该文侵犯了您的版权,请联系管理员

TOP

看来没有办法了。

谢谢版主提供的信息。

© 本文为 wqj104 所有,未经同意,请勿转载
©如该文侵犯了您的版权,请联系管理员

TOP

试了一下在CQ Hook中调用外部写好的脚本或程序来进行socket通讯,可以暂时绕过这个问题。

© 本文为 wqj104 所有,未经同意,请勿转载
©如该文侵犯了您的版权,请联系管理员

TOP

发新话题