dbTalk Databases Forums  

Scripting object model with vbscript

comp.databases.pick comp.databases.pick


Discuss Scripting object model with vbscript in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Scripting object model with vbscript - 05-19-2006 , 07:44 PM






Is anyone using the ActiveX object model of Wintegrate to script with?
I am have gotten a session established and sent my username and pw but
it won't log in, seems like the host displays the login banner
"/dev/pts/4: Connected to Virtual Machine 'pick0:LINUX'."
but not the "username" prompt.

When manually logging in you have to hit Enter a few times to get the
username prompt.

I tried doing
wIntSession.Send "", wSendOptionsAppendCr
a couple of times but don't get the prompt.

I can see my username and password show up on the screen so I know they
are getting there.

My script so far:


Set wIntApp = CreateObject ("wIntegrate.document")
Set wIntSession = wIntApp.Session

wIntApp.WindowState = wWindowStateNormal

Set wWindow = wIntSession.Window

With wIntSession
..Setting("Emulation") = "wyse50"
..Setting("Port") = "Windows Sockets"
..Setting("Host") = "192.168.0.17"
' open the port
..Setting("PortOpen") = "1"
End With
' should wait for "username" to appear
WScript.Sleep 3500
wIntSession.Send " ", wSendOptionsAppendCr
WScript.Sleep 500
wIntSession.Send " ", wSendOptionsAppendCr
WScript.Sleep 500

' Send my user name to the login prompt
wIntSession.Send "TT", wSendOptionsAppendCr
WScript.Sleep 500
' should wait for "password" to appear
wIntSession.Send "LLLL.1", wSendOptionsAppendCr

wintext = wWindow.Text
WScript.Echo "window text:"
WScript.Echo wintext
WScript.Echo "end of script"

WScript.Quit


Reply With Quote
  #2  
Old   
GVP
 
Posts: n/a

Default Re: Scripting object model with vbscript - 05-19-2006 , 10:44 PM






Hi
All scripts working with Variant type only (or using simple type
conversion to variant).
for example scripts can't working with Variant as string array.
Probable check this.


Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: Scripting object model with vbscript - 05-20-2006 , 03:48 PM



[Note-I have reposted my question with "wIntegrate" in subject line:
"Scripting wIntegrate object model with vbscript"]

Sorry I don't understand. What should be Variant type? Can you post an
example of a working script? There is no example of log in in the
Object Model manual.


Reply With Quote
  #4  
Old   
GVP
 
Posts: n/a

Default Re: Scripting object model with vbscript - 05-21-2006 , 12:08 AM



Hi
Every language working with set of data types and can have default
type.
For VB default type is Variant, but VB also have other types (Integer,
Boolean, Object ....)
Scripts (VBScript and JScript) have only Variant type and working with
other types as Variant subtypes.
For example String in VB is Variant (VT_BSTR).
If You define in VB
Dim myArray(10) as String ' myArray is pointer to array of strings)
or
Dim myArray as Variant
Redim myArray(10) as String '' myArray is Variant that have pointer to
array of strings)

This forms are not possible in VBS and Js. JS can't work with
Middleware If Middleware ( JS <> MiddleWare <> DBEngine) working with
such types.
I don't now is it right in Your case.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.