LCDInfo.com

http://www.lcdinfo.com
It is currently Fri Nov 22, 2024 9:33

All times are UTC + 2 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Dec 29, 2003 21:55 
Offline

Joined: Mon Dec 29, 2003 21:48
Posts: 3
Stupid question probably, but I would be stupid to don't ask it... :?

LCDINFO has the possibility to enter code into the *.ini files, and display the variable on your LCD (like " $winamptitle$ "). :lol: :lol: :lol:

Now is my question if there is some kind of library with that kind of code :?: :?:

Greetz


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 0:58 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
I didn't quite get for what part you are looking the code for. Maybe you could be more specific in what you are after ?

If you'd like to know how to replace the $variable$ in the string with a value here's code for that:
Code:
std::string TLCDInfo::IniLineToLCDLine(std::string str2)
{
  std::string str = str2;

  int len = str.length();

  for(int i = 0; i < len; i++)
  {
        if(str[i] == '$')
        {
              int kw_beg = i + 1;
              int kw_end = str.find("$", kw_beg);
              int kw_len = kw_end - kw_beg;

              if(kw_len < 0)
                      continue;

              std::string keyword = str.substr(kw_beg, kw_len);
              std::stringstream stor;

              stor.clear();

              if(keyword == "mhzmuuttuja")
                      stor << 1400;
              else if(keyword == "mbmtemp")
                      stor << 53;
              else if(keyword == "lehma")
                      stor << "Mansikki";

              str.replace(kw_beg - 1, kw_len + 2, stor.str());

              i += stor.str().length() - 1;
              len = str.length();
        }
  }
  return str;
}


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 13:36 
Offline

Joined: Mon Dec 29, 2003 21:48
Posts: 3
It is very simple what I mean :lol:
When you go to the *.ini file *.*\lcd_info_v0.3.2\screens\128X64_ks0108.ini and open it whit notepad, you can add some screens to LCDINFO by adding some code like this. There are aprox 5 screens(winamp, memory status). This is screen 0, as you see.

[Screen0]
Enable=0
Interval=5000
Bitmap=screens\128x64_ks0108_images\image1_128x64.bmp
Graphic0=
Graphic1=
Graphic2=
Graphic3=
Graphic4=
Icon0=
Icon1=
Icon2=
Icon3=
Icon4=
Icon5=
Icon6=
Icon7=
Icon8=
Icon9=
Line0=
Line1=" :$mbmtemp(0)$ c"
Line2=" :$mbmtemp(1)$ c"
Line3=
Line4=
Line5=" :$mbmvolt(0)$ 12V:$mbmvolt(4)$"
Line6=" :$mbmvolt(2)$ 5V:$mbmvolt(3)$"
Line7=

You can see that there is in line1 of the screen an vriable for the temp. of the computer, line2 is an variable for the temp., etc.

Now my question was if there is more of this kind of code to find on the internet, like the online status on MSN messenger or something more usefull??

I am now beginning my education, but they only teach me Java :cry: :cry:

So don't laugh at me if this is a stupid question :oops: :oops:


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 30, 2003 22:31 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
The term "code" is still something I'm not sure how to interpret in your post. ;) This is in programming forum and not LCDInfo forum so I'd presume it means some source code but you might also mean the $variables$ with codes. :)

All $variables$ that you can use in LCDInfo are programmed into the program so you can't add more without modifying the source code.

Then again internet is full of source code that can be used to add more $variables$ in LCDInfo by modifying the LCDInfo source code.

For example MSN Messenger has some SDK's available that can be used to interface with it. I don't remember where to get the SDK but I'm sure google helps here.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 31, 2003 14:12 
Offline

Joined: Mon Dec 29, 2003 21:48
Posts: 3
Thank you very much for the information henry :D And sorry for the problems i caused :twisted: :twisted: :wink:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group