So anyway here goes. I have the following script in my launch button for an ActiveX object that functions as a basic note editor:
Dim IsVisible
Dim IsState
Sub Object_OnScriptEnter
IsVisible = False
End Sub
Sub Object_OnStateChange(state)
IsState = state
If IsState = "Mouse Down" Then (this needs to be "Mouse down") thx rabidrobot
If IsVisible Then
DesktopX.Object("PadText").Text = DesktopX.ScriptObject("TextEditor").Control.Text
IsVisible = False
Else
DesktopX.ScriptObject("TextEditor").Control.Text = DesktopX.Object("PadText").Text
IsVisible = True
End If
End If
End Sub
'Called when the script is terminated
Sub Object_OnScriptExit
IsVisible = False
End Sub
My intention behind this VB script is to pass text between these 2 objects. It doesn't work. The only way I have found to even have anything functional with this ActiveX object (it's a DesktopX Edit Control) is with this script:
Sub Control_OnKeyPress(Key)
DesktopX.Object("PadText").text = Control.text
End Sub
This of course is from within the ActiveX control object and only works one-way. I simply can't find any conceivable way to put text into the edit control for editing. Anyone have any ideas? I am new to VB scripting and it's been slow and painful to learn. Is there anyway to test if the ActiveX object is visible? If so, how? How can you pass text to an ActiveX edit control?