I can build a text file generator action to append data to a text file so you can handle any event you like (user logged in - logged out for example) and generate a log file. I've created an issue about it here https://github.com/emreeren/SambaPOS-3/issues/270 . If you track that you'll get a notification when implemented.
i try to use the new accion, here are a print screen i need to generate new line every time thar it user change, but i cant get it, i sopuse that its the same at the printer template or the widget configuration, of course i was grong, this is what i get in the txt file:
The problem is that you cannot use Printer Template Tags with Rules & Actions. Thats why you are getting this result.
The easiest way is to call a Batch file at User Login to record date, time & user.
Create a file callled - c:\userlog.bat Insert the following into this file
@ECHO OFF FOR /F "TOKENS=2-4 DELIMS=/ " %%a IN ("%date%") DO SET dd=%%a&SET mm=%%b&SET yy=%%c FOR /F "TOKENS=1-3 DELIMS=:." %%a IN ("%time%") DO SET hh=%%a&SET tt=%%b&SET ss=%%c echo %yy%-%mm%-%dd% %hh%:%tt%:%ss% %1>>c:\userlog.txt
Create an Action - User Log Action Type - Start Process FileName - c:\userlog.bat Arguments - [:Value] UseShell - True IsHidden - True
Create a Rule - User Log Event - User Login Action - User Log, Value - [:UserName] Mapping - *,*,*,*
When you login, the Date, Time & Username is logged into c:\userlog.txt
2 answers
I can build a text file generator action to append data to a text file so you can handle any event you like (user logged in - logged out for example) and generate a log file. I've created an issue about it here https://github.com/emreeren/SambaPOS-3/issues/270 . If you track that you'll get a notification when implemented.
i try to use the new accion, here are a print screen i need to generate new line every time thar it user change, but i cant get it, i sopuse that its the same at the printer template or the widget configuration, of course i was grong, this is what i get in the txt file:
{DATE}{TIME} | {USER NAME}
{DATE}{TIME} | {USER NAME}
{DATE}{TIME} | {USER NAME}
{DATE}{TIME} | {USER NAME}
{DATE}{TIME} | {USER NAME}
{DATE}{TIME} | {USER NAME}
{DATE}{TIME} | {USER NAME}
{DATE}{TIME} | {USER NAME}
<L10>{DATE}{TIME} | {USER NAME}
The problem is that you cannot use Printer Template Tags with Rules & Actions. Thats why you are getting this result.
The easiest way is to call a Batch file at User Login to record date, time & user.
Create a file callled - c:\userlog.bat
Insert the following into this file
@ECHO OFF
FOR /F "TOKENS=2-4 DELIMS=/ " %%a IN ("%date%") DO SET dd=%%a&SET mm=%%b&SET yy=%%c
FOR /F "TOKENS=1-3 DELIMS=:." %%a IN ("%time%") DO SET hh=%%a&SET tt=%%b&SET ss=%%c
echo %yy%-%mm%-%dd% %hh%:%tt%:%ss% %1>>c:\userlog.txt
Create an Action - User Log
Action Type - Start Process
FileName - c:\userlog.bat
Arguments - [:Value]
UseShell - True
IsHidden - True
Create a Rule - User Log
Event - User Login
Action - User Log, Value - [:UserName]
Mapping - *,*,*,*
When you login, the Date, Time & Username is logged into c:\userlog.txt