From 56bcba056a8f7463f6fdd24a10b871ac23d72e5d Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:15:07 +0000 Subject: Utilisateur : Fcolin Date : 3/10/02 Heure : 10:55 Créé Commentaire: (vss 1) --- comIvy/ivyscript.vbs | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 comIvy/ivyscript.vbs (limited to 'comIvy/ivyscript.vbs') 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 -- cgit v1.1 From 558785ec45f86c748800e443741e513ffa3ca0ac Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:15:08 +0000 Subject: Utilisateur : Fcolin Date : 18/04/03 Heure : 15:43 Archivé dans $/Bus/comIvy Commentaire: ajout GetDomain (vss 2) --- comIvy/ivyscript.vbs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'comIvy/ivyscript.vbs') diff --git a/comIvy/ivyscript.vbs b/comIvy/ivyscript.vbs index be16094..3d81256 100644 --- a/comIvy/ivyscript.vbs +++ b/comIvy/ivyscript.vbs @@ -9,9 +9,10 @@ dim bus,all_message,pp,count set bus = WScript.CreateObject("comIvy.Bus", "bus_") -'WScript.Echo " bus type " & TypeName(bus) +WScript.Echo " bus type " & TypeName(bus) bus.Create "IvyScript", "IvyScript Ready" +WScript.Echo " bus domain " & bus.GetDomain() set all_message= bus.Bind( "(.*)") @@ -49,6 +50,8 @@ 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) -- cgit v1.1 From e702a1b7036e0c25a93e9761f4538da6224b8f31 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:15:10 +0000 Subject: Utilisateur : Fcolin Date : 7/06/04 Heure : 10:56 Archivé dans $/Bus/comIvy Commentaire: (vss 3) --- comIvy/ivyscript.vbs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'comIvy/ivyscript.vbs') diff --git a/comIvy/ivyscript.vbs b/comIvy/ivyscript.vbs index 3d81256..a8e6527 100644 --- a/comIvy/ivyscript.vbs +++ b/comIvy/ivyscript.vbs @@ -33,8 +33,11 @@ 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() '-------------------------------------------- -- cgit v1.1 From 1931a74f1e727d974a5a12d3ee6661cd9b6093b7 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:15:12 +0000 Subject: Utilisateur : Fcolin Date : 4/01/05 Heure : 14:48 Archivé dans $/Bus/comIvy Commentaire: (vss 4) --- comIvy/ivyscript.vbs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'comIvy/ivyscript.vbs') diff --git a/comIvy/ivyscript.vbs b/comIvy/ivyscript.vbs index a8e6527..f8efd5a 100644 --- a/comIvy/ivyscript.vbs +++ b/comIvy/ivyscript.vbs @@ -40,6 +40,9 @@ 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 -- cgit v1.1