summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfcolin2007-02-01 13:15:07 +0000
committerfcolin2007-02-01 13:15:07 +0000
commit56bcba056a8f7463f6fdd24a10b871ac23d72e5d (patch)
treea30de94030f80fe1d601b8aff37763b1ddadcf41
parente454d7cb2c6eac2c632ada8b494ef895a760e6b1 (diff)
downloadivy-cplusplus-56bcba056a8f7463f6fdd24a10b871ac23d72e5d.zip
ivy-cplusplus-56bcba056a8f7463f6fdd24a10b871ac23d72e5d.tar.gz
ivy-cplusplus-56bcba056a8f7463f6fdd24a10b871ac23d72e5d.tar.bz2
ivy-cplusplus-56bcba056a8f7463f6fdd24a10b871ac23d72e5d.tar.xz
Utilisateur : Fcolin Date : 3/10/02 Heure : 10:55 Créé Commentaire: (vss 1)
-rw-r--r--comIvy/ivyscript.vbs73
1 files changed, 73 insertions, 0 deletions
diff --git a/comIvy/ivyscript.vbs b/comIvy/ivyscript.vbs
new file mode 100644
index 0000000..be16094
--- /dev/null
+++ b/comIvy/ivyscript.vbs
@@ -0,0 +1,73 @@
+'--------------------------------------------
+' 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"
+
+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
+
+
+all_message.Unbind()
+pp.Unbind()
+
+'--------------------------------------------
+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
+ 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