logfile to alpha list device

Have an idea for a new feature? Voice your opinion here.
Post Reply
wallebalboa
Senior Member
Posts: 111
Joined: Wed Aug 11, 2004 6:52 pm
Location: Sweden

logfile to alpha list device

Post 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
raptor_demon
Senior Member
Posts: 141
Joined: Tue Jul 07, 2009 12:55 pm
Location: NC

Re: logfile to alpha list device

Post by raptor_demon »

Hi,

I was just wondering how you resolved this?

thanks
Raptor
wallebalboa
Senior Member
Posts: 111
Joined: Wed Aug 11, 2004 6:52 pm
Location: Sweden

Re: logfile to alpha list device

Post 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
raptor_demon
Senior Member
Posts: 141
Joined: Tue Jul 07, 2009 12:55 pm
Location: NC

Re: logfile to alpha list device

Post by raptor_demon »

Ok thanks

How did you do the logging to sql?

thanks

Raptor
Steve Horn
HouseBot Guru
Posts: 747
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: logfile to alpha list device

Post 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.
Steve
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: logfile to alpha list device

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