mIRC Home    About    Download    Register    News    Help

Print Thread
#114582 15/03/05 04:52 PM
Joined: Mar 2004
Posts: 155
D
Darkmnm Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Mar 2004
Posts: 155
Here is what I am getting myself involved in at the moment. I started playing with a clean mIRc and so far I am in the stages of setting the aliases for MDX. What I am curious of is it possible to do the following:

Below is the code for the config dialog

Code:
 
dialog config {
  title "Detox - Configuration [ _/conf ]"
  size -1 -1 241 165
  option dbu
  list 1, 3 3 67 146, size
  icon 2, 72 3 164 16
  button "Cancel", 14, 3 152 32 10, cancel
  button "Apply", 15, 38 152 32 10, ok
  menu "File", 3
  item "Apply", 4, 3
  item "Cancel", 5, 3
  item "Close", 6, 3
  menu "Options", 7
  item "Fserve", 8, 7
  item "Xdcc", 9, 7
  item "Tdcc", 10, 7
  menu "Info", 11
  item "Help", 12, 11
  item "About", 13, 11
}

on *:dialog:config:init:0:{
  $mdx.load
  $mdx.font
  $style
}
 


Below is the alias i am interested in

Code:
 
alias mdx.font { $mdx SetFont $dname[color:red] ?? [/color]-a 10 400 Tahoma }
alias mdx.font1 { $mdx SetFont $dname[color:red] ?? [/color]-a 11 600 Tahoma }
 


Is it any way possible to use the font and font1 alias's within the init code so I am not hogging up space and lines with every init that I am going to use? The problem I am having is with the id's (red ??"s) if the alias is used over and over for all the dialog init's throughout the script.

Basically I want to know if i can use the font and font1 alias' as i do with the mdx.load alias shown below.

Code:
 alias mdx.load { $mdx SetMircVersion $version | $mdx MarkDialog $dname } 


Any help is greatly appreciated and sorry for the "indepth" constant explanation of what I am looking to accomplish here but I don't want to be misunderstood.

#114583 15/03/05 04:58 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
on *:dialog:config:init:0: {  
  mdx.load
  mdx.font
  mdx.font1
  style
}


Will be fine..

Code:
on *:dialog:config:init:0: {  
  $mdx.load
  $mdx.font
  $mdx.font1
  $style
}


Will also be fine..

Last edited by SladeKraven; 15/03/05 05:01 PM.
#114584 15/03/05 05:06 PM
Joined: Mar 2004
Posts: 155
D
Darkmnm Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Mar 2004
Posts: 155
How would it know which id to set to which font alias? Usually I would have to put


Code:
 alias mdx { return dll $shortfn(system\dll\mdx.dll) }


Code:
$mdx SetFont $dname[color:red] 1,2,3,4,5 [/color]-a 10 400 Tahoma 
$mdx SetFont1 $dname[color:red] 6,7,8,9,10 [/color]-a 11 600 Tahoma

id's being in red so mdx knows which to make which font and size.

I'm trying to avoid the constant rewriting of the $mdx set font id blah blah blah coding.

Last edited by Darkmnm; 15/03/05 05:10 PM.

Link Copied to Clipboard