|
Bill, This is taken from our VB.NET script
shell, and it connects directly to our WinScript object. Notice the error
handler at the end of the script that inserts the DoEvents for the Pause
commands. Option Strict Off Option Explicit Off Imports
System.Windows.Forms.Application Imports WS32Lib Imports WS32Lib.enumScriptError Imports WS32Lib.enumStreamType Module basScript Sub ObjectScript()
On Error GoTo scripterror
W = New WinScript()
W.Connect("demo2", stStream)
W.Key("{F1}")
W.Pause("DEMO2 [EMAIL PROTECTED],7")
W.Enter()
W.Pause("DEMO2 [EMAIL PROTECTED],1")
For I = 1001 To 1010
Account = I
W.Note = Account
W.Connect("demo1", stStream)
W.Key("{F1}")
W.Pause("DEMO1 [EMAIL PROTECTED],7") ...
W.Enter(Part)
W.Enter(Quantity)
W.Enter(Zip)
W.Pause(",4")
Next I
W.Key("{F1}")
W.Pause("DEMO2 [EMAIL PROTECTED],7")
W.Note = "Done."
Exit Sub scripterror:
If Err.Number =
seDoEvents Then
System.Windows.Forms.Application.DoEvents() : Resume
If Err.Number =
seTimeOut Then End
If Err.Number = seHalt Then Exit Sub End Sub Rich McNeil 866 653 5105 www.bostonworkstation.com From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Palmer I have been using .NET With Boston Workstaton for about 2
years and have never been able to get the object scripts to work. The
simple form of script works great and I have always been able to do what I
needed with that form. If someone else is using the object form of
scripting with .NET, please tell us the secret. Bill Palmer O yeah, optional parameters in COM objects
are required to be put in .NET. Try: oBs.Connect(,
BostonWorkStation70.enumStreamType.stMeditech, ); Rich McNeil 866 653 5105 www.bostonworkstation.com From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Osar, Eric The 3rd parameter is
required. We figured out that the third parameter must have a value of
5. Also, apparently in .Net, when a runtime
error is encountered, an exception is not thrown, but the entire application is
halted resulting in the errors found below. Thank you Eric From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Rich McNeil Try this for the second line: oBs.Connect(, BostonWorkStation70.enumStreamType.stMeditech); It assumes that t.exe is in one of the
default directories. Rich McNeil 866 653 5105 www.bostonworkstation.com From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Osar, Eric Hello, I am beginning some development with BWS and .Net. I
seem to be having an issue with executing the application if any BWS objects
are called. I can instantiate the BostonWorkStation70
object, but as soon as I add any calls, the execute produces (builds fine): 'DefaultDomain': Loaded 'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll',
No symbols loaded. 'IECDS': Loaded 'C:\Documents and Settings\is-exo\My
Documents\Visual Studio Projects\IECDS\bin\Debug\IECDS.exe', Symbols loaded. 'IECDS.exe': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', No
symbols loaded. 'IECDS.exe': Loaded 'c:\documents and
settings\is-exo\my documents\visual studio
projects\iecds\bin\debug\interop.bostonworkstation70.dll', No symbols loaded. 'IECDS.exe': Loaded 'c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll',
No symbols loaded. The program '[4064] IECDS.exe' has exited with code
0 (0x0). Example code added would be as simple as, oBs = new
BostonWorkStation70.BostonWorkStation(); oBs.Connect(IECDS.Global.Constants._MeditechConsolePath+"t.exe",
BostonWorkStation70.enumStreamType.stMeditech,stMeditech); Can someone offer me some assistance in getting this
issue resolved? I am sure I am missing something essential to executing
this. Thanks, Eric This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed.. If you have received this email in error please notify the system
manager. This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system. If you are not the intended recipient you are
notified that disclosing, copying, distributing or taking any action in
reliance on the contents of this information is strictly prohibited. This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed.. If you have received this email in error please notify the system
manager. This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system. If you are not the intended recipient you are
notified that disclosing, copying, distributing or taking any action in
reliance on the contents of this information is strictly prohibited. |
- [Talk] .Net Connection Osar, Eric
- RE: [Talk] .Net Connection Rich McNeil
- RE: [Talk] .Net Connection Osar, Eric
- RE: [Talk] .Net Connection Rich McNeil
- RE: [Talk] .Net Connection Bill Palmer
- RE: [Talk] .Net Connection Rich McNeil
- RE: [Talk] .Net Connection Osar, Eric
- RE: [Talk] .Net Connection Osar, Eric
