;--------------------------------------------- ;Copyright 2006 by Tom Garcia ;--------------------------------------------- on 1:text:*:#:{ if ($dialog(irchr_dialog) == irchr_dialog) { if (Next race isin $1-) && (Distance isin $1-) && (Track isin $1-) && (Prize Money isin $1-) { did -r irchr_dialog 5,16,18,20,22 did -a irchr_dialog 16 $strip($remove($gettok($1-,1,45),$left($gettok($1-,1,45),13))) did -a irchr_dialog 18 $strip($remove($gettok($1-,2,45),$left($gettok($1-,2,45),15))) did -a irchr_dialog 20 $strip($remove($gettok($1-,3,45),$left($gettok($1-,3,45),14))) did -a irchr_dialog 22 $strip($remove($gettok($1-,4,45),$left($gettok($1-,4,45),11))) } if (Runners isin $1-) { set %num $2 } if (%num) { if (. isin $1) && ($remove($1,.) != Record) && (FN !isin $1-) { did -a irchr_dialog 5 $strip($+($remove($1,.),.)) $chr(9) $gettok($1-,2,2) $chr(9) $upper($strip($right($remove($gettok($2-,1,41),$left),2))) $chr(9) $remove($gettok($1-,2,58),$chr(40),$chr(41)) $chr(9) $+($gettok($1-,3,58),kg) $chr(9) $strip($gettok($1-,5,58)) $chr(9) $strip($gettok($1-,6,58)) } } if (Please place your bets.. isin $1-) { unset %num } } } dialog irchr_dialog { title "IRCHorseRacing Dialog" size -1 -1 481 264 option dbu tab "Betting", 12, 6 7 464 252 list 5, 13 64 333 131, tab 12 size radio "Place", 10, 75 226 24 10, tab 12 radio "Win", 9, 52 226 20 10, tab 12 radio "Win/Place", 8, 15 226 36 10, tab 12 text "Amount", 6, 15 214 19 8, tab 12 edit "", 7, 36 213 61 10, tab 12 box "Horses", 1, 9 56 342 143, tab 12 box "Betting Options", 2, 9 203 342 41, tab 12 list 14, 359 64 99 188, tab 12 size box "Channel List", 33, 356 56 105 200, tab 12 box "Race Information", 23, 22 24 428 27, tab 12 text "Race:", 15, 59 35 14 8, tab 12 nowrap edit "", 16, 76 34 87 10, tab 12 read text "Prize Money:", 17, 168 35 31 8, tab 12 nowrap edit "", 18, 202 34 50 10, tab 12 read text "Distance:", 19, 258 35 23 8, tab 12 nowrap edit "", 20, 284 34 50 10, tab 12 read text "Track:", 21, 339 35 15 8, tab 12 nowrap edit "", 22, 358 34 50 10, tab 12 read radio "Trifecta", 27, 102 226 30 10, tab 12 radio "Quinella", 24, 134 226 32 10, tab 12 button "!Bet", 25, 204 216 37 12, tab 12 radio "Mystery", 26, 167 226 31 10, tab 12 tab "Settings", 13 } alias mdxit { if ($isid) return $mircdir $+ mdx\mdx.dll else dll $+(",$mircdir,mdx\mdx.dll,") $1- } alias mdxfile return $+($mircdir,mdx\,$1,.mdx) on *:DIALOG:irchr_dialog:dclick:5:{ var %old = $did(irchr_dialog, 7,text) $right($left($remove($left($did(irchr_dialog, 5, $did(irchr_dialog, 5).sel).text,14),.),14),2) did -r $dname 7 did -a $dname 7 %old } on *:DIALOG:irchr_dialog:sclick:25:{ if ($did(irchr_dialog,27).state == 1) { msg #IRCHorseRacing !trifecta $left($did(irchr_dialog, 7,text),5) } } on *:DIALOG:irchr_dialog*:init:0:{ ; Initializing and Marking the dialog mdxit SetMircVersion $version mdxit MarkDialog $dname ; Setting the positioner button with 3 properties. mdxit SetControlMDX 3 positioner size minbox maxbox > $mdxfile(dialog) ; Setting the listview with some various properties I chose, pick your own! mdxit SetControlMDX 5 listview showsel nosortheader report grid hottrack sortascending rowselect > $mdxfile(views) ; Setting Listview header column width did -i $dname 5 1 headerdims 50:1 200:2 50:3 100:4 70:5 70:6 70:7 ; Header column text with +c flag to center header and column text. did -i $dname 5 1 headertext +c ID $chr(9) $+ +c Horse $chr(9) $+ +c Rider $chr(9) $+ +c Owner $chr(9) $+ +c Weight $chr(9) $+ +c Win Odd $chr(9) $+ +c Place Odd ; Adding some text in listview separated by $chr(9) to divide text into both columns. }