diff options
author | fcolin | 2007-02-01 13:29:31 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 13:29:31 +0000 |
commit | afe2e7dfc1388cad991e8d38dda7d648c137aa52 (patch) | |
tree | 92bf63d2b2b34a805927aa294c7c51912638f66a /comIvy/ivyscript.vbs | |
parent | 0be65f8a110ee9bf5da9c93e0bd5b5b62b3bad0c (diff) | |
parent | 04c263c314499e38d64af9d4a1aa5e2b8d9d5ead (diff) | |
download | ivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.zip ivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.tar.gz ivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.tar.bz2 ivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.tar.xz |
modif struct svnwindows@3001
Diffstat (limited to 'comIvy/ivyscript.vbs')
-rw-r--r-- | comIvy/ivyscript.vbs | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/comIvy/ivyscript.vbs b/comIvy/ivyscript.vbs new file mode 100644 index 0000000..f8efd5a --- /dev/null +++ b/comIvy/ivyscript.vbs @@ -0,0 +1,82 @@ +'--------------------------------------------
+' IVYscript.vbs
+'--------------------------------------------
+Option Explicit
+'On Error Resume Next
+
+dim bus,all_message,pp,count
+
+
+set bus = WScript.CreateObject("comIvy.Bus", "bus_")
+
+WScript.Echo " bus type " & TypeName(bus)
+
+bus.Create "IvyScript", "IvyScript Ready"
+WScript.Echo " bus domain " & bus.GetDomain()
+
+set all_message= bus.Bind( "(.*)")
+
+
+WScript.ConnectObject all_message, "all_"
+
+set pp= bus.Bind( "^PPilot(.*)")
+
+'WScript.Echo " all type " & TypeName(all)
+
+
+WScript.ConnectObject pp, "pp_"
+
+bus.Start ""
+
+WScript.Sleep 2000
+count= bus.Send( "ClockStart" )
+WScript.Echo "Sent " & count
+WScript.Sleep 25000
+
+WScript.Echo " Unbind Message " & TypeName(all_message)
+
+all_message.Unbind()
+
+WScript.Echo " Unbind Message " & TypeName(all_message)
+pp.Unbind()
+
+WScript.Echo " End Ivy Script Test " & TypeName(bus)
+
+'bus.Delete()
+'--------------------------------------------
+sub bus_ApplicationConnected(name)
+ WScript.Echo "Application Connected " & name
+end sub
+'--------------------------------------------
+'--------------------------------------------
+sub bus_ApplicationDisconnected(name)
+ WScript.Echo "Application Disconnect " & name
+end sub
+'--------------------------------------------
+'--------------------------------------------
+sub all_Received(name,args)
+ dim i,argc,argv
+ WScript.Echo " args type " & TypeName(args)
+
+ argc = UBound(args) - LBound(args) + 1
+ argv = " args: "
+ for i = LBound(args) to UBound(args)
+ argv = argv & args(i) & ","
+ next
+ WScript.Echo "Receive message argc=" & Cstr(argc ) & argv
+end sub
+'--------------------------------------------
+'--------------------------------------------
+sub pp_Received(name,args)
+ dim i,argc,argv
+ argc = UBound(args) - LBound(args) + 1
+ argv = " args: "
+ for i = LBound(args) to UBound(args)
+ argv = argv & args(i) & ","
+ next
+ WScript.Echo "Receive PPilot message argc=" & Cstr(argc ) & argv
+end sub
+'--------------------------------------------
+sub Received(args)
+ WScript.Echo "Unknown Receive message argc=" & Cstr(args)& "->" & args(0)
+end sub
\ No newline at end of file |