mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2004
Posts: 237
JAFO Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
I am trying to make a small script tha allows me to set all my colors to my pref. and i am stuck on the timestamp.
I have a dialog that allows me to choose colors for Hours , Mins. , Seconds , Brackets( [ :: ] ) , and AM/PM. I have 14 different timestamp choices ( [h:nn] , [hh:nn] , [hh:nn:ss] , etc. etc. etc. It works using variables but it has a flaw - [h:nn] becomes  $+ %Color14 $chr(91)  %Color5 h  %Color :  %Color7 nn  %Color14 $chr(93)  , but it returns 5 [  0 h  6 :  2 nn  5 ]  ........... as you can see theres a lot of spaces in that timestamp. And since its set up this way i have to write a line for each available timestamp choice using a seperate variable to store that choice ( thats what gives me the return of 5 [  0 h  6 :  2 nn  5 ]  ). So now my question is , is there a way to get around the spaces? Am i doing more work than i have to using variables this way? And if so what are my other options?

Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Everywhere a space appears, insert a $+ in your code.

echo -a %x %y will return 5 4
exho -a %x $+ %y will return 54


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Sep 2004
Posts: 237
JAFO Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
Ooops sorry, i thought i edited that.
I got an answer for it already , if i use ,'s in place of all spaces and enclose the timestamp like this $+(,%Colors14x,$chr(91),,%Colors5x,h,,%Colors16x,:,,%Colors7x,nn,,%Colors14x,$chr(93),)
it works fine , i just had to make my variables when set accept that they were double digit color codes , so /set 0 $+ %varname and that turns them into 00,01,02 etc. but thanks a lot!


Link Copied to Clipboard