Need some help on a baja compare statement. I want to compare a current users name (Handle) with the last entry of a file im keeping created by baja.
I'll use me as an example
What I want is if I was the last entry "Desotofireflite" in the log file called call.dat, I want it to do nothing, but if I wasn't the last entry in the call.dat, I want it to write to the call.dat my name. My problems is I don't know how to compare a handle to the last entry of a file. My guess would be
COMPARE_ARS Handle c:\sbbs\data\call.dat
If True
Goto end
end_if
FOPEN FILE O_WRONLY|O_CREAT|O_APPEND "%Jcalls.dat"
:end
none of this code is correct and your fopen file is doing nothing.
you are better off doing a batchfile using the tail program and then getting an error lvl after using the file or grep command on a temporary file created by tail. you will need win32 unix programs,btw.
17 years ago i could seek into a file and load it up into a string that
I think echicken gave me what I ndde to make this happen, but I really need to take the time to learn the js language and re do the entire baja script. It is one of your older scripts, that has worked well for me, but
If your current script works and you've customized it over the years, there may not be a compelling reason to redo it in JS. Could be a lot of work for little benefit, taking the learning curve into account. Both languages are suitable for most simple BBS tasks.
If you want to learn JS, though, replicating one of your existing Baja modules in it is a good way to learn. In the long run it's a more useful language to know, makes a lot of tasks simpler, and enables some stuff that just can't be done in Baja.
As soon as I get my current script going, and working, I think your idea about trying to redo it in js will help me learn the language, and I can take my time doing it. Right now, when I look at js, it just looks greek to me, at least with baja, I can somewhat follow what is going on. Thanks for your help ec.
I think echicken gave me what I ndde to make this happen, but I really need to take the time to learn the js language and re do the entire baja script. It is one of your older scripts, that has worked well for me, but I'm trying to update it a bit for my system. I've been updating it through the years to do things I want it to do, but I just could not figure out haw to make it compare a file entry to a result, even after reading the baja docs. Thanks for jumping in and replying.
is it a last callers mod?
Re: Correct BAJA Command
By: MRO to DesotoFireflite on Thu Dec 14 2017 05:51 pm
is it a last callers mod?
Yes. it's the last version you had. I took it from there, and have updated throughout the years. I have it now doing just about everything I want. This last mod is to keep the same user from showing up if they log on and off the system alot of times in one session and fill up the screen with their name only.
Yes. it's the last version you had. I took it from there, and have
updated throughout the years. I have it now doing just about
everything I want. This last mod is to keep the same user from showing
up if they log on and off the system alot of times in one session and
fill up the screen with their name only.
i think you can check the ARS of U_LTODAY and have it display and not write to the last calls based on how many logons that day.
i think you can check the ARS of U_LTODAY and have it display and not write to the last calls based on how many logons that day.
Ok, thanks, I will see if I can figure that out.
but if you have it stop writing to the last callers, it really doesnt serve a purpose anymore.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 991 |
Nodes: | 10 (1 / 9) |
Uptime: | 74:48:52 |
Calls: | 12,948 |
Calls today: | 2 |
Files: | 186,574 |
Messages: | 3,264,511 |