Jump to content

No Icons


Haggis

Recommended Posts

maing an aop with icons

 

alias mdx { return mdx.dll }
alias ctl { return CTL_GEN.MDX }
alias bars { return BARS.MDX }
alias views { return views.mdx }
alias icon { return icons\ $+ $1- }


dialog auto {
 title "List View example"
 size -1 -1 100 91
 option dbu
 list 1, 1 3 98 73, size
 button "&OK", 2, 49 78 37 12, ok
}

on *:dialog:auto:init:0: {
 dll $mdx SetMircVersion $version 
 dll $mdx MarkDialog $dname
 dll $mdx SetControlMDX $dname 1 ListView report single grid > $views
 did -i $dname 1 1 headerdims 200
 did -i $dname 1 1 headertext Autolist

 did -i $dname 1 1 seticon list $icon(gold.ico)

 did -i $dname 1 1 seticon list $icon(host.ico)
 set -u %x 0
 while (%x < $lines(auto.txt)) {
   did -a auto 1 +b 1 $read(auto.txt)
   inc %x
 }
}

 

 

the list comes up

 

it reads the list fromt he txt file

 

there red squares instead of icons

 

 

MIRC DIR

auto.mrc

mdx.dll

ctl_gen.mdx

views.mdx

bars.mdx

icons

gold.ico

host.ico

 

 

 

 

i just dont know why they wont show

Link to comment
Share on other sites


alias mdx { return mdx.dll }
alias ctl { return CTL_GEN.MDX }
alias bars { return BARS.MDX }
alias views { return views.mdx }
alias icon { return icons\ $+ $1 $+ .ico }


dialog auto {
title "List View example"
size -1 -1 100 91
option dbu
list 1, 1 3 98 73, size
button "&OK", 2, 49 78 37 12, ok
}

on *:dialog:auto:init:0: {
dll $mdx SetMircVersion $version 
dll $mdx MarkDialog $dname
dll $mdx SetControlMDX $dname 1 ListView report single grid > $views
did -i $dname 1 1 headerdims 200
did -i $dname 1 1 headertext Autolist

did -i $dname 1 1 seticon list $icon(gold)

did -i $dname 1 1 seticon list $icon(host)
set -u %x 0
while (%x < $lines(auto.txt)) {
  did -a auto 1 +b 1 $read(auto.txt)
  inc %x
}
} 

 

and make sure the icons are in a folder called icons

how you have the coding , this folder must be in the main mirc folder

Link to comment
Share on other sites

if the icon script you are working on is in another folder besides your main mirc folder you will need to add $mircdir to the path then. Better yet, try this out...

 

alias mdx { return $findfile($shortfn($mircdir),mdx.dll,1) }
alias ctl { return $findfile($shortfn($mircdir),CTL_GEN.MDX,1) }
alias bars { return $findfile($shortfn($mircdir),BARS.MDX,1) }
alias views { return $findfile($shortfn($mircdir),views.mdx,1) }
alias icon { return $findfile($shortfn($mircdir) $+ icons\ ,$1-,1) }


dialog auto {
title "List View example"
size -1 -1 100 91
option dbu
list 1, 1 3 98 73, size
button "&OK", 2, 49 78 37 12, ok
}

on *:dialog:auto:init:0: {
dll $mdx SetMircVersion $version 
dll $mdx MarkDialog $dname
dll $mdx SetControlMDX $dname 1 ListView report single grid > $views
did -i $dname 1 1 headerdims 200
did -i $dname 1 1 headertext Autolist

did -i $dname 1 1 seticon list $icon(gold.ico)

did -i $dname 1 1 seticon list $icon(host.ico)
set -u %x 0
while (%x < $lines(auto.txt)) {
  did -a auto 1 +b 1 $read(auto.txt)
  inc %x
}
}

Edited by Warrior124
Link to comment
Share on other sites

i am going insane

 

i have triwed another way

 

i now have

 

alias mdx { return $findfile($shortfn($mircdir),mdx.dll,1) }

alias ctl { return $findfile($shortfn($mircdir),CTL_GEN.MDX,1) }

alias bars { return $findfile($shortfn($mircdir),BARS.MDX,1) }

alias views { return $findfile($shortfn($mircdir),views.mdx,1) }

 

 

 

dialog auto {

title "Auto Lists"

size -1 -1 169 83

option dbu

list 1, 1 1 167 81, size vsbar

}

 

 

 

On *:Dialog:auto:init:0:{

dll $mdx SetMircVersion $version

dll $mdx MarkDialog $dname

dll $mdx SetMircVersion $version

dll $mdx MarkDialog $dname

dll $mdx SetColor $dname

dll $mdx SetFont $dname

dll $mdx SetFont $dname 1 14 50 verdana

 

dll $mdx SetControlMDX $dname 1 ListView report single grid > $views

did -i $dname 1 1 headerdims 300

did -i $dname 1 1 headertext Autolist

did -i $dname 1 1 iconsize normal small

did -i $dname 1 1 seticon normal gold.ico

did -i $dname 1 1 seticon normal host.ico

set -u %x 0

while (%x < $lines(auto.txt)) {

did -a $dname 1 +b 1 $read(auto.txt)

inc %x

}

 

}

 

 

and still the same

 

 

 

user posted image

Edited by Haggis
Link to comment
Share on other sites

okay, do you have the icons in the same folder as your main mirc folder? If not, then that is why you are getting the red boxes. You will need to specify the directory to the icons. I also noticed that you have a folder listed as "icons". Try replacing your code with this...

 

did -i $dname 1 1 headerdims 300
did -i $dname 1 1 headertext Autolist
did -i $dname 1 1 iconsize normal small
did -i $dname 1 1 seticon normal icons\gold.ico
did -i $dname 1 1 seticon normal icons\host.ico

 

This way it will look for the icons in the folder "icons". smile.gif

Link to comment
Share on other sites

no diff

 

i had been chaning stuff about i got icons in both mircdir and icons folder to make sure they were there

 

still no diff though

 

 

can one of u try it on ur mirc and see if it someit to do wi me

 

i am on mirc 6.16

Link to comment
Share on other sites

Okay, just tried out this code, and made a few changes. It now works. Just make a few changes to how you'd like it to work, and it should work. Here is the code. smile.gif

 

alias mdx { return $findfile($shortfn($mircdir),mdx.dll,1) }
alias ctl { return $findfile($shortfn($mircdir),CTL_GEN.MDX,1) }
alias bars { return $findfile($shortfn($mircdir),BARS.MDX,1) }
alias views { return $findfile($shortfn($mircdir),views.mdx,1) }
alias icon { return images\ $+ $1 $+ .ico }


alias auto { dialog -md auto auto }
dialog auto {
title "Auto Lists"
size -1 -1 169 83
option dbu
list 1, 1 1 167 81, size vsbar
}



on *:Dialog:auto:init:*:{
dll $mdx SetMircVersion $version
dll $mdx MarkDialog $dname
dll $mdx SetMircVersion $version
dll $mdx MarkDialog $dname
dll $mdx SetColor $dname
dll $mdx SetFont $dname
dll $mdx SetFont $dname 1 14 50 verdana
dll $mdx SetControlMDX $dname 1 ListView report single grid > $views
did -i $dname 1 1 headerdims 300
did -i $dname 1 1 headertext Autolist
did -i $dname 1 1 iconsize normal small
did -i $dname 1 1 seticon normal $icon(gold)
did -i $dname 1 1 seticon normal $icon(host)
set -u %x 0
while (%x < $lines(auto.txt)) {
did -a $dname 1 +b 1 $hosticon(%nickz($1,%x),$1) $replace($read(auto.txt,%x),owner,,host,)
inc %x
 }
}
$hosticon($nick($1,%x),$1) 
alias hosticon {
 if (owner == $left($read(auto.txt,%x),5)) { return 1 }
}

 

I didn't know what you were going to use it for. So, I just made it this way to test it out, and it works. Basically, it looks for the word "owner" in the list with the nickname, and if found returns the gold hammer code, and replaces the word owner thereby just showing the nickname.

 

Yours might be different though. However way you modify it, it should work. Hope things goes well with you. smile.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...