0

SendKeys 関数を介して自動化するために、RogueWave HostAccess のセッションを開こうとしています。会社から提供されたコードを以下に示しますが、コードを実行するとターミナル エミュレータの新しいウィンドウが開きますが、GetObject() [2 行目] でフリーズします。

エラーを受け取りました: Microsoft Excel は、別のアプリケーションが OLE アクションを完了するのを待っています。実行時エラー 429 - ActiveX コンポーネントはオブジェクトを作成できません。

RogueWave が提供するコード:

Rem Define the variable HostAccess as the data type object.
Rem This represents the HostAccess application when used for
Rem OLE automation
Dim HostAccess
Rem Create an OLE object that corresponds to HostAccess.
Rem We will use this object to invoke
Rem published automation methods.
Set HostAccess = GetObject("", "Session.Setting")
Rem Start a session with the given name
result = HostAccess.LoadSession("TEST.SES", "", True)
Rem Once HostAccess has loaded, tell it to print something
Rem on the terminal window.
result = HostAccess.ScriptExec("print ""hello world""")
Rem Close the HostAccess session
HostAccess.EndSession
Rem Unload/Exit HostAccess
HostAccess.Unload

ソース: http://docs.roguewave.com/HostAccess/7.40j/HostAccessUserGuide.pdf

ありがとう、

4

0 に答える 0