Author Topic: Variables in .ini files  (Read 4878 times)

thetribe

  • Newbie
  • *
  • Posts: 3
Variables in .ini files
« on: June 17, 2008, 04:02:59 PM »
I have no idea what is or isn't possible with regards .ini files. I'll explain what I'd like and maybe someone can tell me what's possible and point me in a direction to go looking :-)

I have some users who'd like to have sounds active in their IRC client and they'd like others to hear them too. For example a drum roll if they're about to say something that needs noticed etc.

Currently all I've managed to come up with is the Text Highlight  setting and have come up with
Text to highlight - *DrumRoll*
Sound to play - C:\Documents and Settings\Phil\Application Data\IceChat\Wavs\DrumRoll.wav (on my machine)

Easy enough so far but I'd like to be able to save the HighLite.ini file and send it to users to use in place of their own file along with the sounds so they all have the same triggers and sound files. So instead of the .ini file saying
n1=*DrumRoll*,1,-1,0,C:\Documents and Settings\Phil\Application Data\IceChat\Wavs\DrumRoll.wav,
it would have
n2=*DrumRoll*,1,-1,0,<AutoInsertionOfLocationOfIceChatWavFolder>\DrumRoll.wav,
so no matter who downloaded and used the file it would work on their system

<Phew> that took some getting out, I hate explanations  :-D

Or is someone going to tell me I'm gong about it the hard way and there's an easier option?  :?

Thanks for any help offered.

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1787
    • IceChat IRC Client
Re: Variables in .ini files
« Reply #1 on: June 18, 2008, 08:30:38 AM »
If you do not give the DrumRoll.wav file a path, it will read it from the Application Data\IceChat\Wavs folder by default.
So they just need to place the WAV files into that folder.
The IceChat God

thetribe

  • Newbie
  • *
  • Posts: 3
Re: Variables in .ini files
« Reply #2 on: June 18, 2008, 02:50:02 PM »
Wow, that was easy  :-D

Thanks very much.  :-)

thetribe

  • Newbie
  • *
  • Posts: 3
Re: Variables in .ini files
« Reply #3 on: June 18, 2008, 03:10:17 PM »
That option works very well and does exactly what is required, however I found out something strange. Once you've added your item and given the sound a filename but no full path, if you go back into the Text Highlight box then go to edit one of the sounds when you click the 'Browse' button next to the sound the client exits immediately. No warning, no error just total shutdown.

I seem to have made myself very (un)popular by forgetting to remove some of my channels when I was testing this time and time again, yo-yo seemed to be one polite way of describing me  :-D

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1787
    • IceChat IRC Client
Re: Variables in .ini files
« Reply #4 on: June 18, 2008, 03:36:48 PM »
Wow, thats a nasty little bug. Will have to get that fixed.
Thanks
The IceChat God