Ok, I missed that for sure. Does that apply to all the settings in the startup dialog or just RunAtLogInScreen? Jeff Weiss
-----Original Message----- From: Doug Geoffray [mailto:[email protected]] Sent: Wednesday, February 25, 2009 3:23 PM To: [email protected] Subject: Re: Startup options Jeff, As per the documentation, StartupOptions.RunAtLoginScreen is a read only property. You can't set it to anything. Regards, Doug Jeff Weiss wrote: Here is the error message I got: startupOptions.VBS - Microsoft VBScript runtime error Line 55 Column 1 Wrong number of arguments or invalid property assignment: 'sObj.RunAtLoginScreen' < 0x800A01C2 > Here is the text of the script: ' StartupOptions Dim isVisible : isVisible = 0 Dim myHotkey : Set myHotkey = Keyboard.RegisterHotkey("Alt-Control-Shift-I","LaunchDialog") ' Dim sObj : Set sObj = StartupOptions Sub LaunchDialog() If isVisible = 0 Then Queue "DisplayDialog" End If End Sub Sub DisplayDialog() Dialog "StartupOptions.xml", "StartupOptions", "DialogEventHandler" End Sub Function DialogEventHandler(dObj, dEvent, dId, dControl) DialogEventHandler = False End Function Function DialogEventHandler(dObj, dEvent, dId, dControl) DialogEventHandler = False Select Case (dId) Case "button_cancel" If dEvent = buttonClicked Then Speak "Cancel" isVisible = 0 dObj.Close DialogEventHandler = True Exit Function End If Case "button_ok" If dEvent = buttonClicked Then Speak "ok" GetSettings dObj, dEvent, dId, dControl isVisible = 0 dObj.Close DialogEventHandler = True Exit Function End If Case Else If dEvent = dialogCreated Then isVisible = 1 DialogEventHandler = True End If End Select End Function Function GetSettings (dObj, dEvent, dId, dControl) Dim sObj : Set sObj = StartupOptions If dObj.Control("checkbox_RunAtLoginScreen").Checked Then Speak "Window-Eyes will be run at Log in!" SObj.RunAtLoginScreen = True Else Speak "Window-Eyes will not be run at log in" sObj.RunAtLoginScreen = False End If If dObj.Control("checkbox_RunAfterLoginScreen").Checked Then Speak "Window-Eyes will be run for all users after log in!" ' Set sObj.RunAfterLoginScreen = 1 Else Speak "Window-Eyes will not be run after log in for all users." ' Set sObj.RunAfterLoginScreen = 0 End If If dObj.Control("radiobutton_RunAfterLoginCurrentUser").checked Then Speak "Window-Eyes will be run using the above configuration" ' Set sObj.RunAfterLoginCurrentUser = sObjscuUseCurrent end If If dObj.Control("radiobutton_Always").checked Then Speak " Window-Eyes will always be run after log in for the current user" ' Set sObj.RunAfterLoginCurrentUser = scuAlways End If If dObj.Control("radiobutton_Never").checked Then Speak "Window-Eyes will never be run automatically after log in" ' Set sObj.RunAfterLoginCurrentUser = scuNever End If ActiveSettings.Save End Function -----Original Message----- From: Aaron Smith [mailto:[email protected]] Sent: Wednesday, February 25, 2009 2:47 PM To: [email protected] Subject: Re: Startup options Jeff, You only use the Set statement with object, and RunAtLoginScreen isn't an object. It is, rather, a property of the StartupOptions object. You'll note from the documentation that RunAtLoginScreen is a boolean, so you'd just do: sObj.RunAtLoginScree = False You had it right, minus the Set statement. Aaron Jeff Weiss wrote: I am trying to get the startup options script from the UI section of the manual to work. The dialog is set up and responds correctly when the items are set. My problem again, is still understanding the objects. This is how I got the startupOptions object: Dim sObj : Set sObj = StartupOptions This is what I tried to have Window-Eyes not run at the login screen: Set sObj.RunAtLoginScreen = False Can some one explain this to me? I am sorry, but I'm still having trouble with the objects. Jeff Weiss __________ Information from ESET NOD32 Antivirus, version of virus signature database 3889 (20090225) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- 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 __________ Information from ESET NOD32 Antivirus, version of virus signature database 3889 (20090225) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- Doug Geoffray GW Micro, Inc. Voice 260-489-3671 Fax 260-489-2608 http://www.gwmicro.com
