Conditional parameter for OnCartPause?

You have a question or need an advice about how to do something? Ask it here!
Post Reply
franksiegers
Posts: 122
Joined: 15 Nov 2019 14:24
Conditional parameter for OnCartPause?

Post 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!
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Conditional parameter for OnCartPause?

Post 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
franksiegers
Posts: 122
Joined: 15 Nov 2019 14:24
Re: Conditional parameter for OnCartPause?

Post 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?
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Conditional parameter for OnCartPause?

Post 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.
franksiegers
Posts: 122
Joined: 15 Nov 2019 14:24
Re: Conditional parameter for OnCartPause?

Post 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?
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Conditional parameter for OnCartPause?

Post 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.

Post Reply