Been using WaitForEvent on multiple computers for a very long time with webToStr to in effect trigger each other. However been searching an answer to this for years - having a PAL in effect trigger another PAL on the same computer. Of course turning on a inactive script isn't possible (at lest as far as I know). But finally found a way to trigger a script that is in a WaitForEvent state on the same computer. It is so simple, can't believe that I had not tried it before. Here is an Example how a script can trigger two or more other scripts:
(The triggering script is Script 1):
Code:
Const url_1='http://localhost:1221/event/test1';
Const url_2='http://localhost:1221/event/test2';
Var httpClient:THttpClient;
Var url:String;
//
//----------------Triggering Script 2-----------------
url:=url_1;
httpClient:=THttpClient.Create(url);
httpClient.Get;
httpClient.Free;
//---------------------------------------------
PAL.WaitForTime('+00:00:10'); // Of course not necessary, only put this in here for testing.
//
//---------------- Triggering Script 3-------------------
url:=url_2;
httpClient:=THttpClient.Create(url);
httpClient.Get;
httpClient.Free;
//---------------------------------------------
The Second script WaitForEvent would be: PAL.WaitForEvent('test1');
The Third script WaitForEvent would be: PAL.WaitForEvent('test2');