ContributionsMost RecentMost LikesSolutionsChanging Drag Speed playback property from scriptHi, Is there a way to modify the playback property that controls drag speed through my script? Thanks, RebeccaRe: Sending a response through an event handlerHi Helen, The parameter is a BSTR*, yes. I used GetVarType to check what it was coming in as and whether or not I have ByRef there it is an OLEStr. It's not possible to get the source code changed as far as I know - do you have any other thoughts? I'm still waiting to hear a response on my support ticket, which I submitted Friday. Thanks, RebeccaRe: Sending a response through an event handlerI've pursued the private support route, thank you.Sending a response through an event handlerThe event that I am handling in my current test needs to send a response back to its source. The script that handles the event include a string parameter that had to be updated to send the response back to the source. I am not having any trouble receiving the event in TestComplete but the system that is supposed to receive the response is getting absolutely nothing. Sub MyEventControl_OnViewportQuery(Sender, nTransactionID, lQueryType, pszwQueryPrompt, ppszwResponse, nUserPassBack) If lQueryType = 8 Then ppszwResponse = "Yes" Log.Message ppszwResponse End If End Sub Does anyone have experience with a similar situation or problem?Re: Adding Event Control and Event Handler through script?That would work just fine if I could change the Event Control file from a script, but I can't. The problem is the source object for the event control is in different places on different OSes and I can't change that on the system where I don't have TestComplete, only TestExecute.Re: Adding Event Control and Event Handler through script?The reason I would have used the functionality is because the COM object we need to handle events from installs in different places depending on the system. I am building the test framework on a Windows 7 64-bit machine so it's in C:\Program Files (x86)\... but on the Windows XP server that the tests will be running nightly on it's in C:\Program Files\... The server that the tests are going to run on also does not have TestComplete, only TestExecute, so it's not just as simple as readding the control there.Adding Event Control and Event Handler through script?Is there a way to add an event control and event handlers through a script routine?Re: AddMethod method of Object object calls the new method when it's addedHi, Yes, the code had a syntax error - I had already removed it from my code to work around the problem and had to rewrite it, and I missed that. What I had was AddMethod("Name", MainUnit.Name) so that seems to be where my problem was. I didn't realize it was calling the method there. Thank you for your help!Re: AddMethod method of Object object calls the new method when it's addedNot sure how to separate my code, sorry. My object structure was a class called Test which holds an array of checkpoint objects which each hold a trigger object. The trigger object is different based on the type of input it gets so I need to add methods to the object based on what type it is. When any Run"Type"Trigger method is called it logs ""Type" Trigger Running" and every time this code ran I would get a log saying something like: Adding Method Running Digital Trigger Calling Trigger's Method Running Digital Trigger I hoped after I discovered the problem that I could just get the returned results from the function that was called through AddMethod but it did not give me the output, instead I got what I expected which was the method object. The problem with that is that I need to call the function only once and if it runs without giving me the output my test doesn't run properly. I've since worked around it but I hope this helps you replicate and solve this issue. VBScript: Function RunTrigger If This.type = "click" Then Log.Message "Adding Method" Call This.AddMethod("RunClickTrigger", MainUnit.RunClickTrigger") Log.Message "Calling Trigger's Method" RunTrigger = This.RunClickTrigger ElseIf This.type = "drag" Then Log.Message "Adding Method" Call This.AddMethod("RunDragTrigger", MainUnit.RunDragTrigger") Log.Message "Calling Trigger's Method" RunTrigger = This.RunDragTrigger ElseIf This.type = "digital" Then Log.Message "Adding Method" Call This.AddMethod("RunDigitalTrigger", MainUnit.RunDigitalTrigger") Log.Message "Calling Trigger's Method" RunTrigger = This.RunDigitalTrigger ElseIf This.type = "analog" Then Log.Message "Adding Method" Call This.AddMethod("RunAnalogTrigger", MainUnit.RunAnalogTrigger") Log.Message "Calling Trigger's Method" RunTrigger = This.RunAnalogTrigger ElseIf This.type = "serial" Then Log.Message "Adding Method" Call This.AddMethod("RunSerialTrigger", MainUnit.RunSerialTrigger") Log.Message "Calling Trigger's Method" RunTrigger = This.RunSerialTrigger ElseIf This.type = "wait" Then Log.Message "Adding Method" Call This.AddMethod("RunWaitTrigger", MainUnit.RunWaitTrigger") Log.Message "Calling Trigger's Method" RunTrigger = This.RunWaitTrigger 'If the type value is not one of the specified types, log it Else Log.Message "Unknown Trigger Type" Log.Message This.type End If End FunctionAddMethod method of Object object calls the new method when it's addedI am trying to use the AddMethod method to add a new method to an object that I want to call later and do NOT want to call when it's being added. AddMethod calls the new method anyway. This would be annoying but usable if the result from AddMethod was what the new function returned, but it isn't. Is there a way to add a method to an object in a script without calling the method at the time of creation?