Vic,

You should print out the type name of objAction1 to verify that you got a CursorKeyAction object.

Aaron

Vic Beckley wrote:
Can anyone tell me why this script will not work?

Dim CursorKeyEvent : CursorKeyEvent = ConnectEvent(Application, "OnCursorKey", "OnCursorKey")

Function OnCursorKey(CursorKeyId, isBeforeAction, defaultActionAborted)

       If isBeforeAction Then

Dim objAction1 : Set objAction1 = CursorKeyId.FirstAction

Dim objAction2 : Set objAction2 = CursorKeyId.SecondAction

Dim strAction1 : strAction1 = objAction1.ActionID

Dim strAction2 : strAction2 = objAction2.ActionID

               Speak strAction1

               Speak strAction2

       End If

       OnCursorKey = False

End Function

I get this error when I use a cursor key with the script running.

CursorKeyTest.vbs - Microsoft VBScript runtime error

Line 7 Column 18

Object doesn't support this property or method: 'objAction1.ActionID'

< 0x800A01B6 >

Vic


--
To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information
pertinent to your situation when submitting a problem report to the GW
Micro Technical Support Team.

Aaron Smith
GW Micro
Phone: 260/489-3671
Fax: 260/489-2608
WWW: http://www.gwmicro.com
FTP: ftp://ftp.gwmicro.com
Technical Support & Web Development

Reply via email to