How to asign scripts to different user logins

You have a question or need an advice about how to do something? Ask it here!
Mike_C
Posts: 15
Joined: 14 Jul 2015 20:16
Location: Apeldoorn
Contact:
How to asign scripts to different user logins

Post by Mike_C »

hi Bernd,

i was looking into the manual how to automate some actions (load a cartwall and load a specified pls) when a user is logging in.

i have about 4 different users.
i create in events/commands, custom, onsuser1 (load a specified playstist and Cardwall)
but can't find where i can load the pls in the actions?

how i asign this when someone is loggin on?

greetz Mike.
User avatar
radio42
Site Admin
Posts: 9140
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: How to asign scripts to different user logins

Post by radio42 »

The OnUser1...OnUser50 are actually not used for any user login/logoff things, but are the 50 custom events to which you can assign any control-commands for the 'User Commands' window.

You might use the general event 'Application.OnUserLogin' resp. 'Application.OnUserLogoff' (see section 'Events/Commands' in the general settings) to trigger things when any user logs-in resp. logs-off.
Use the ${username} macro to identify the current user.
(as a small trick: you might also save any user specific control-command(s) in the User-Description and then trigger that e.g. via the command EXEC_COMMAND ${userdescription})

User Cartwall Libs can already be defined.
Just click on the User icon to the very top-right to open the user menu and the select 'Change User Settings...'.
In the User Settings dialog go to the 'Library' tab and specify a
User Cartwall II Path:
Specifies an optional directory which might contain user specific cartwall media libraries. All supported playlists (.pfp, .m3u, .m3u8, .pls) within this directory are loaded as additional cartwall libraries to the Cartwall II for this user. If empty only the default global cartwall libraries will be used.
Use Audio Files for Cartwall II:
If checked, audio files contained in the user cartwall path (and its sub-directories) will also be scanned.
In this case an additional user cartwall library will be created for each folder found in the user cartwall path.
If not checked, only playlist files will be scanned.

This allows you specify user cartwalls.

To open/create/load a new playlist window you might use the control-command PLS_CURRENT_NEW followed by the command PLS_CURRENT_LOAD_PLAYLIST or PLS_CURRENT_APPEND_PLAYLIST.

You can close any playlist window by the commands PLS_CLOSE_ALL, PLS_CLOSE_ALL_NOPROGRAM, PLS_CURRENT_CLOSE or PLS_CLOSE - depending on what you try to achieve.
Mike_C
Posts: 15
Joined: 14 Jul 2015 20:16
Location: Apeldoorn
Contact:
Re: How to asign scripts to different user logins

Post by Mike_C »

thanks for the quick anwser, i wil look into it.

Gr. Mike
Mike_C
Posts: 15
Joined: 14 Jul 2015 20:16
Location: Apeldoorn
Contact:
Re: How to asign scripts to different user logins

Post by Mike_C »

Thanks for giving directions, i got it working.

Greetz Mike.
XTended
Re: How to asign scripts to different user logins

Post by XTended »

Hi Bernd,

I was looking for a command to automatic close the already played playlists without saving. Can I use this command for it PLS_CLOSE_ALL_NOPROGRAM ? And where do I put a command like that?
User avatar
radio42
Site Admin
Posts: 9140
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: How to asign scripts to different user logins

Post by radio42 »

Yes you can use it eg. in the global Application.OnUserLogoff event.
XTended
Re: How to asign scripts to different user logins

Post by XTended »

Thanks for your reply Bernd. Is the use of that command also possible without different user logins?
As you know I'm the only one that works with the software. Every morning I have to close manually all open (already played) playlists, by selecting "close all but this". So if I can put the command in all existing playlists, that would save time .
User avatar
radio42
Site Admin
Posts: 9140
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: How to asign scripts to different user logins

Post by radio42 »

You might also use the command with any other event or put that on a user button.
Or you create a Reminder within the program scheduler to trigger it every morning automatically.
XTended
Re: How to asign scripts to different user logins

Post by XTended »

Thanks Bernd for your solutions !
XTended
Re: How to asign scripts to different user logins

Post by XTended »

Bernd,

the command PLS_CLOSE_ALL_NOPROGRAM closes only the manual created playlists and not the playlists started and used by the scheduler. Which command can I use for closing the playlists started and used by the scheduler ?

Post Reply