Skip to Content
It is currently March 1st, 2021, 5:45 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: June 13th, 2017, 8:46 am 
Offline
New User
New User

Joined: November 14th, 2012, 5:49 pm
Posts: 8
Is there a way to call a new script at the conclusion of the current running script, or just call a new script from inside a running script?


Top
 Profile  
Reply with quote  
PostPosted: June 13th, 2017, 9:20 am 
Offline
SVS Member
SVS Member

Joined: May 8th, 2004, 9:00 am
Posts: 10524
Location: Denver, CO
No, however you can affect a field (column) in the database and have the script you want to call reading that field and act (begin) when the field is changed to a pre-determined value. Example set a field to value of 1 when you want the script to continue and set it to 0 when you don't.

_________________
- Rob Oyler, SVS
Image


Top
 Profile  
Reply with quote  
PostPosted: June 13th, 2017, 10:03 am 
Offline
New User
New User

Joined: November 14th, 2012, 5:49 pm
Posts: 8
this means the script has to be running already and in a wait for state. I need to start a script that is not running from an already running script that is about to terminate.


Top
 Profile  
Reply with quote  
PostPosted: June 13th, 2017, 2:44 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8152
Location: Cologne (Germany)
Script execution cannot be controlled from within PAL.

If a script is running you can't terminate it by a PAL command.
You can't prematurely end a script and can't trigger a new one to be executed.

Maybe we can suggest a workaround if you outline your use case?

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: June 28th, 2019, 1:27 pm 
Offline
New User
New User

Joined: April 21st, 2004, 3:51 pm
Posts: 14
Location: Indianapolis
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');


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 29 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group