mIRC Home    About    Download    Register    News    Help

Page 1 of 2 1 2 >
Topic Options
#209623 - 19/02/09 08:28 PM dialog question
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
I want to change the default icon in the dialog's left corner, but i can't get it to work, this is the test dialog i using.
Code:
alias test { if (!$dialog(test)) { dialog -m test test } }
dialog test { 
  title "A simple test"
  icon $mircdir\icons\ico.icl, $+ %icon <- don't work
  size 550 250 142 52
  option dbu
  button "&Ok", 1, 55 39 35 10, ok
  icon 2, 118 20 19 19, $mircdir\icons\ico.icl, $+ %icon , small <- working
}

as you see it working if i place the icon in the dialog (ID 2), but not if i try place it in the left corner, ideas please.
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#209624 - 19/02/09 09:00 PM Re: dialog question [Re: sparta]
LittleJohn Offline
Babel fish

Registered: 07/07/04
Posts: 59
Sparta try this

dialog control {
title "Control Panel (/cp)"
size -1 -1 215 155
option dbu
icon $mircdir\icons\ico.icl, $+ %icon, 0

Try placing the icon call after the Size and option. I dont have the ico.icl library For me it workes with my ICON library

Just a thaught I also gave it an ID of 0

Anyway good luck

Top
#209626 - 19/02/09 10:16 PM Re: dialog question [Re: LittleJohn]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
Didn't work, any other ideas? smirk im stuck here and want do fix this dialog before bed time.. smirk

;---- Edit

it's like the %var isn't there, or the number i add isn't there..


Edited by sparta (19/02/09 10:18 PM)
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#209627 - 19/02/09 10:51 PM Re: dialog question [Re: sparta]
Wims Offline
Planetary brain

Registered: 31/07/06
Posts: 3496
Loc: France
I cant understand why you can't figure this out by yourself, I'm sure you don't even tried with another icon file...
A simple test using $mircexe and a number show that you can't use a %var as an index number here (bug?).


Edited by Wims (19/02/09 10:52 PM)
_________________________
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net

Top
#209628 - 19/02/09 11:10 PM Re: dialog question [Re: Wims]
argv0 Offline
Planetary brain

Registered: 13/10/03
Posts: 3918
Loc: Montreal, QC, Canada
Not a bug, just unimplemented behaviour-- %vars don't work in dialogs unless in places specified explicitly in the help or versions.txt. A feature suggestion would be the way to go.
_________________________
- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Top
#209629 - 19/02/09 11:14 PM Re: dialog question [Re: argv0]
Horstl Offline
Hoopy frood

Registered: 03/11/06
Posts: 1559
Loc: Germany
But custom identifiers don't work either, be it to return the filepath and indexNr, or the indexNr only (At least I don't get it work). Custom identifiers work well to return an iconpath - it's all about the index number parsing.

Assume you have:
Code:
alias myicon { return $mircexe  }
alias myicon2 { return $mircexe , 10 }
alias iconnr { return 10 }

work:
Code:
icon $mircexe , 10
icon $myicon
icon $myicon , 10

don't work:
Code:
icon $myicon2
icon $myicon , $iconnr
icon $mircexe , $iconnr



Edited by Horstl (19/02/09 11:21 PM)

Top
#209630 - 19/02/09 11:23 PM Re: dialog question [Re: Wims]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
Originally Posted By: Wims
I cant understand why you can't figure this out by yourself, I'm sure you don't even tried with another icon file...


I tested with the 19 icons i have stored in my *.icl file (in different formats, depending on where they are used), i also tested to call a alias that return the full path to the *.icl file and the icon i wanted to use, and been testing it a couple of hours now, and since i can use it in the dialog as a id i believed it could be used in the left corner too (with a %var), if it working on one place, why not on the other.. that's why i asked here. so don't say i didn't try if before i asked. and i guess i need to make two dialogs, only two that need the icons to be set true %var, it's my error and info dialog, tested to make them both of one, just change the text before i opened the dialog, using a %var for the text too.
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#209631 - 19/02/09 11:24 PM Re: dialog question [Re: Horstl]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
Thnx, i think i need to remake the dialog. and make two instead of one smile
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#209632 - 19/02/09 11:30 PM Re: dialog question [Re: sparta]
Horstl Offline
Hoopy frood

Registered: 03/11/06
Posts: 1559
Loc: Germany
Maybe I missed some simple workaround.
For the moment I'd separate the *.icl file to individual icons and use a custom identifier that returns path and filename, where the individual filenames may be your %variable or get passed as parameter.

Top
#209634 - 19/02/09 11:51 PM Re: dialog question [Re: sparta]
Wims Offline
Planetary brain

Registered: 31/07/06
Posts: 3496
Loc: France
Lol ok, sorry, but this mean that you're asking wrong question to yourself, use the Horstl's suggestion and make a feature request, a /dialog switch could be added to change this too


Edited by Wims (19/02/09 11:51 PM)
_________________________
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net

Top
#209636 - 19/02/09 11:52 PM Re: dialog question [Re: Horstl]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
I was hoping it could be solved with a switch, like you can change a existing icon in a dialog with the -g switch (even if the icon is called from a %var), and i can't figure out what the %var should do, if you do //echo -a %var it echo 2, and if i place a 2 instead of the %var it working, well i just try a bit more before i giving it up and make 2 dialogs instead. smile thnx for the help.. smile
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#209641 - 20/02/09 12:37 AM Re: dialog question [Re: sparta]
DJ_Sol Offline
Hoopy frood

Registered: 04/01/07
Posts: 1156
Loc: Seattle
This is what I do.

dialog invite {
title "Invite"
size -1 -1 160 80
option dbu
icon %tbar

On my start event if (!%tbar) I set it to the default:

set %tbar imgs\1x.ico


Granted this isnt an icon library so I dont need to use the index. Hope this helps. smile

Top
#209643 - 20/02/09 01:21 AM Re: dialog question [Re: DJ_Sol]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
I need to change the icon depending on what it is, if it's a error i need one icon, if it's a information i need another one, and that's the problem. smirk i made two dialogs and calling them depending on what i need. thnx for the example tho smile maybe it's the icon library that creating the problem, but since i don't want like 30+ icons in one folder i stick with the icon library smile
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#209651 - 20/02/09 02:46 AM Re: dialog question [Re: sparta]
DJ_Sol Offline
Hoopy frood

Registered: 04/01/07
Posts: 1156
Loc: Seattle
Icon libraries are best for sure. What abotu changing the variable, closing the dialog and re-opening it?

Top
#209670 - 20/02/09 10:45 AM Re: dialog question [Re: DJ_Sol]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
it didn't show up at all.. that's why i end up with 2 dialogs instead of one, then i can use a number instead of the %var.. smirk
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#209712 - 21/02/09 05:29 PM Re: dialog question [Re: sparta]
vexed2 Offline
Fjord artisan

Registered: 31/03/07
Posts: 218
I don't see how this is a problem.
I have the same kind of thing, a certain icon for a different situation on the same dialog.


icon system/icon/panel.icl,12

Then change the number for the corresponding icon in the .icl
etc..


Edited by vexed2 (21/02/09 05:31 PM)

Top
#209715 - 21/02/09 06:01 PM Re: dialog question [Re: vexed2]
Horstl Offline
Hoopy frood

Registered: 03/11/06
Posts: 1559
Loc: Germany
How do you call this 12 dynamically (variable / identifier) ?

Top
#209716 - 21/02/09 06:10 PM Re: dialog question [Re: Horstl]
vexed2 Offline
Fjord artisan

Registered: 31/03/07
Posts: 218
I'm not using one, 12 represents the 12th icon in the library.
The dialog closes and re-opens giving the effect of icon change.
Works perfectly.
The only other alternative is to use DCX. I use this method as well for an Sbar.

Top
#209717 - 21/02/09 06:21 PM Re: dialog question [Re: vexed2]
argv0 Offline
Planetary brain

Registered: 13/10/03
Posts: 3918
Loc: Montreal, QC, Canada
how exactly does the dialog close and reopen to give the "effect of" an icon change? Isn't this "12" in there the whole time? Or are you adding it to the remote file dynamically?
_________________________
- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Top
#209720 - 21/02/09 07:11 PM Re: dialog question [Re: vexed2]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
closing the dialog and change the icon that way, it would look like it open a new dialog every time it change the icon. since the icon's aren't the same but the dialog is, and i couldn't get it to show any icon when using a %var.

first: /set %var 12
then open your dialog: icon system/icon/panel.icl, %var

it wont work, not on the one in the left corner of the dialog..
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
Page 1 of 2 1 2 >