Page 1 of 1

logfile to alpha list device

Posted: Mon Jun 15, 2009 8:07 am
by wallebalboa
Hi.
i would like to see logfile in reverse order, like last alarm or last caller on top.
i guess its easy to do with a script but it would be a nice feature to "logfile to alpha list device". (pls help if its just a "RFM" problem :oops: )
kind regs

Re: logfile to alpha list device

Posted: Wed Apr 21, 2010 4:08 pm
by raptor_demon
Hi,

I was just wondering how you resolved this?

thanks
Raptor

Re: logfile to alpha list device

Posted: Wed Apr 21, 2010 6:00 pm
by wallebalboa
Hi..
not solved....
i log all devices in MySQL now... so it would be nice to display the result of a SQL (probably in a list device...) have anybody done any thing like that?

regs

Re: logfile to alpha list device

Posted: Wed Apr 21, 2010 6:57 pm
by raptor_demon
Ok thanks

How did you do the logging to sql?

thanks

Raptor

Re: logfile to alpha list device

Posted: Wed Apr 21, 2010 7:34 pm
by Steve Horn
Wallebalboa,
Suggest you look at the Jukebox VB script - see the THC Jukebox HB app - There are a lot of good examples in the Jukebox.VBS of displaying the result of an SQL query to a list box. The actual SQL version may differ (SQLITE vs MySQL), but the technique should be the same.

Re: logfile to alpha list device

Posted: Sat Apr 24, 2010 2:22 pm
by Richard Naninck
All my logs display the newest line on the first line.. like it should.
In script you can do something like this:


Sub HandleLog(Data)
Dim strLog

strLog = GetPropertyValue("My Device.Log")
strLog = Data & vbLF & strLog
SetPropertyValue "My Device.Log", strLog
End Sub

Obviously you need to handle the vbTAB etc in your code, but this would be the simplest way to do this.

Steve is right. There are lots of SQL examples around. Scott posted Excel and Access examples and I posted many SQLite2 examples.