WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Samples from Users
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Synchronizing multiple Winbatch scripts

Keywords: sync synchronizing 

Occasionally someone needs to have multiple Winbatch scripts running in parallel, and to both synchronize them and pass data to and fro. The usual method was to poll an INI file. But one of our more advanced users came up with a much better way...

The idea is to use the Window title of the WinBatch window itself. In this example there is a "server" application waiting to be told what to do, and a "client" application telling it what to do.

Server Code

mynormaltitle="Fruitcake Server"     ;pick a unique name
WinTitle("",mynormaltitle)	     ;set winbatch window to unique name
while 1
   WinWaitClose(mynormaltitle)	     ;wait for title to change
   command=WinName("")		     ;grab new title
   WinTitle("",mynormaltitle)	     ;reset original title
   Message("Passed Command was",command)
end while

Client Code

   command=AskLine("Test","Enter command","yoo hoo")
   WinTitle("Fruitcake Server",command)

Article ID:   W13803
Filename:   Syncing Multiple Winbatch Scripts.txt
File Created: 1999:04:15:16:56:28
Last Updated: 1999:04:15:16:56:28