Page 1 of 1

Conditional parameter for OnCartPause?

Posted: 18 Nov 2021 16:14
by franksiegers
Hi Bernd,

I would like the have different commands for OnCartPause based on what cart is being paused.

Is it possible (and if yes, could you please provide the command?) to create to commands?

if cartid=1,2,3,4,9,10,11,12 do_something
if cartid=5,6,7,8,13,14,15,16 do_something_else

Thank you!

Re: Conditional parameter for OnCartPause?

Posted: 18 Nov 2021 17:08
by radio42

Code: Select all

EXEC_COMMAND2 ${cartid}|InList(1;2;3;4;9;10;11;12)|SHOW_ALERT_WINDOW Something

Code: Select all

EXEC_COMMAND2 ${cartid}|InList(5;6;7;8;13;14;15;16)|SHOW_ALERT_WINDOW Something Else

Re: Conditional parameter for OnCartPause?

Posted: 18 Nov 2021 17:54
by franksiegers
Hi Bernd,

Unfortunately something went wrong when trying the custom commands causing PFOA to freeze. I guess I created some sort of loop. The commands I tried were:

EXEC_COMMAND2 ${cartid}|InList(1;2;3;4;9;10;11;12)|EXEC_SEND_DRAIRLITE_SETLEDBLINK ${cartid}|2|2|0
EXEC_COMMAND2 ${cartid}|InList(5;6;7;8;13;14;15;16)|EXEC_SEND_DRAIRLITE_SETLEDBLINK ${cartid}|1|1|0

Now PFOA freezes immediately upon start. Is there an events file I can open with Notepad to remove the commands or some way to open ProppFrexx in safe mode?

Re: Conditional parameter for OnCartPause?

Posted: 18 Nov 2021 20:17
by radio42
The commands given are only fired when an event is triggered and can not freeze ProppFrexx. So it must be something else.
When you say it freezes, what does it mean? Is ProppFrexx not responding anymore at all? Is it crashing?
Is there any message in the file called Error.log?
Sounds all a bit strange to me?

The events are stored in the global configuration file (ProppFrexx ONAIR.config, located in the AppDataUser folder, e.g. %appdata%\radio42\ProppFrexx ONAIR\4.0). Note, that any miss-configuration might cause a serious damage. I.e. you might need to delete the entire file.
But as said, the posted message can not cause this, as I even tested them and they are working fine.

Re: Conditional parameter for OnCartPause?

Posted: 18 Nov 2021 21:06
by franksiegers
Hi Bernd,

I had added more commands in the same attempt. Thanks to your reply, I have now found what's causing the loop/freeze.

I tried to change OnStandbyPause from:

Code: Select all

EXEC_SEND_DRAIRLITE_SETTRACKSTATE 6|0
EXEC_SEND_DRAIRLITE_REMOTEON 6|0
to:

Code: Select all

EXEC_SEND_DRAIRLITE_SETTRACKSTATE 6|0
EXEC_SEND_DRAIRLITE_REMOTEON 6|0
EXEC_COMMAND STANDBY_REWIND 1
I've also changed the last command to STANDBY_REWIND 1 (without 'EXEC_COMMAND') but rewinding Standby Player 1 seems to cause a loop and PFOA becomes unresponsive. I still don't know why. Do you?

Re: Conditional parameter for OnCartPause?

Posted: 18 Nov 2021 21:14
by radio42
Yes.
When calling desinf. The event OnPause is triggered.
And in the even you again call Rewind.
That creates the loop.

There is a) no need to call Rewind when the player is paused, as this happens automatically.
And b) you can call Rewind directly without the EXEC_COMMAND infront of it.