mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#209623 19/02/09 08:28 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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,.) }
sparta #209624 19/02/09 09:00 PM
Joined: Jul 2004
Posts: 59
L
Babel fish
Offline
Babel fish
L
Joined: Jul 2004
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

Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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..

Last edited by sparta; 19/02/09 10:18 PM.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #209627 19/02/09 10:51 PM
Joined: Jul 2006
Posts: 4,144
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
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?).

Last edited by Wims; 19/02/09 10:52 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #209628 19/02/09 11:10 PM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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"
argv0 #209629 19/02/09 11:14 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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


Last edited by Horstl; 19/02/09 11:21 PM.
Wims #209630 19/02/09 11:23 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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,.) }
Horstl #209631 19/02/09 11:24 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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,.) }
sparta #209632 19/02/09 11:30 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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.

sparta #209634 19/02/09 11:51 PM
Joined: Jul 2006
Posts: 4,144
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
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

Last edited by Wims; 19/02/09 11:51 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Horstl #209636 19/02/09 11:52 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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,.) }
sparta #209641 20/02/09 12:37 AM
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
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

DJ_Sol #209643 20/02/09 01:21 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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,.) }
sparta #209651 20/02/09 02:46 AM
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Icon libraries are best for sure. What abotu changing the variable, closing the dialog and re-opening it?

DJ_Sol #209670 20/02/09 10:45 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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,.) }
sparta #209712 21/02/09 05:29 PM
Joined: Mar 2007
Posts: 218
V
Fjord artisan
Offline
Fjord artisan
V
Joined: Mar 2007
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..

Last edited by vexed2; 21/02/09 05:31 PM.
vexed2 #209715 21/02/09 06:01 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
How do you call this 12 dynamically (variable / identifier) ?

Horstl #209716 21/02/09 06:10 PM
Joined: Mar 2007
Posts: 218
V
Fjord artisan
Offline
Fjord artisan
V
Joined: Mar 2007
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.

vexed2 #209717 21/02/09 06:21 PM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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"
vexed2 #209720 21/02/09 07:11 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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,.) }
Page 1 of 2 1 2

Link Copied to Clipboard