Say what?

What exactly is the problem? Reading the file or applying the colors?

  ----- Original Message ----- 
  From: Chris 
  To: perl-win32-gui-users@lists.sourceforge.net 
  Sent: Tuesday, December 02, 2003 3:21 AM
  Subject: [perl-win32-gui-users] Coloring again,


  I'm trying to read in some custom colors though a configuration file. But 
they don't seem to work, here's what I have so far.

   

   

  sub skin {

              if ($settings{'skin'} ne 'default') {

                          if (-e("./$settings{'skin'}/skin.ini")){

                                      logit("Skinning file exists");

                                      $sk=1;

                          } else {

                                      logit("Skin Files isn't here");

                                      goto DefaultSkin;

                          }

                          if ($sk) {

                                      open(TMP, "./$settings{'skin'}/skin.ini");

                                      @skin = <TMP>;

                                      close(TMP);

                                      foreach $line (@skin) {

                                                  if ($line =~ /(.*?)=(.*?)$/i) 
{

                                                              $skin{$1}=$2;

                                                  }

                                      logit("\$skin{$1}=$skin{$1}");

                                      }

                          }

              } else {

                          DefaultSkin:

                          $skin{urlcolor} = 0xFF0000;

                          $skin{errorcolor} = 0x0000FF;

                          $skin{normalcolor} = 0x000000;

                          $skin{icon} = "icon.ico";          

              }

  }

   

  My custom skin file looks like

   

  urlcolor=0x00FF00

  errorcolor=0xFF0000

  normalcolor=0x0000FF

  icon=icon.ico

  if someone could help me resile my issue, it would help

   

Reply via email to