Originally Posted By: DEATHJ0KER
How can I find the location of Treebar mIRC
(top, bottom, left, right)
This I need to apply the fade effect to dialog box that clips to Treebar.

DCX.DLL Optimal Build: https://dl.dropboxusercontent.com/u/3462312/dcx200dev37git151Optimal.rar

is it possible using mirc.ini to determine the current position of Treebar?

Code:

;Internal dock to treebar

alias treebardialog {
  dialog -ma treebardialog treebardialog_table
  /xdialog -b treebardialog -mnszo
  /xdialog -R treebardialog +s $dcx(GetSystemColor, COLOR_WINDOW)
}

dialog treebardialog_table {
  title "treebardialog"
  size 0 0 300 1080
}

on *:dialog:treebardialog:*:*: {
  if ($devent == init) {
    /dcx Mark $dname treebardialog_cb
    /xdialog -b treebardialog -mnszo
    /xdialog -a $dname +so 10
    /xdialog -E $dname +c -defhmstCM
    /xdialog -V $dname -1 -1 1920 1080
    /xdialog -t $dname transparentcolor none
    /xdialog -t $dname alpha %chiaro
    /xdialog -g $dname +b $dcx(GetSystemColor, COLOR_WINDOW)
    /xdialog -T $dname +bp 
    /xdialog -t $dname bgcolor $dcx(GetSystemColor, COLOR_WINDOW)
    if (%cur_x == ON) /xdialog -q $dname +f %cursore 
    !if (!$dcx(IsUsingDirectX)) {
      /echo -a DirectX Is Disabled.
      halt
    }
    ;// Call initilisation alias
    treebardialog_init_dcx
  }
}

alias -l treebardialog_init_dcx {
  tree_close
  background_color_tree
  text_color_tree
  line_color_tree
  selected_color_tree
  messagebg_color_tree
  messages_color_tree
  hottext_color_tree
  event_color_tree
  .timer 1 0 /xdock -b $dialog(treebardialog).hwnd +s
}


;// Callback alias for treebardialog
alias treebardialog_cb {
  if ($2 != mouse) { echo $color(info) -s */ treebardialog_cb: $1- }
  if ($2 == close) { dcxtreebar }
  if ($2 == sclick) {
    if ($3 == 1) { /set %treebarbg $dll(dlls\color.dll,Color,.) | background_color_tree | dcxtreebar }
    elseif ($3 == 2) { /set %treetext $dll(dlls\color.dll,Color,.) | text_color_tree | dcxtreebar }
    elseif ($3 == 3) { /set %treeline $dll(dlls\color.dll,Color,.) | line_color_tree | dcxtreebar }
    elseif ($3 == 4) { /set %treetextsb $dll(dlls\color.dll,Color,.) | selected_color_tree | dcxtreebar }
    elseif ($3 == 5) { /set %messagebg $dll(dlls\color.dll,Color,.) | messagebg_color_tree | dcxtreebar }
    elseif ($3 == 6) { /set %treemess $dll(dlls\color.dll,Color,.) | messages_color_tree | dcxtreebar }
    elseif ($3 == 7) { /set %treeh $dll(dlls\color.dll,Color,.) | hottext_color_tree | dcxtreebar }
    elseif ($3 == 8) { /set %treevent $dll(dlls\color.dll,Color,.) | event_color_tree | dcxtreebar }
    elseif ($3 == 8008) { /xdialog -h treebardialog | /xdialog -x treebardialog | /xdock -R 0 | /xdock -R 1 } 
  }
  if ($2 == mouseenter) { echo $color(info) -s */ treebardialog_cb: $1- }
  if ($2 == mouseleave) {  }
}

alias tree_close {
  if ($xdialog(treebardialog, 8008).isid == $true) { /xdid -h treebardialog 8008 +c 5 | /xdialog -d treebardialog 8008 }
  ;// Initialising control: xButton (Button 8008)
  if ($xdialog(treebardialog, 8008).isid != $true) {
    /xdialog -c treebardialog 8008 button 2 2 300 36 tabstop default group tooltips bitmap shadow notheme transparent 
    /xdid -s treebardialog 8008 +c 10
    if (%lang == en) xdid -T treebardialog 8008 Save and Close
    if (%lang == it) xdid -T treebardialog 8008 Salva e Chiudi
    if (%lang == es) xdid -T treebardialog 8008 Guardar y Cerrar
    if (%lang == fr) xdid -T treebardialog 8008 Enregistrer et fermer
    xdid -f treebardialog 8008 %quality %chars %xdim %xcar
    xdid -m treebardialog 8008 1
    xdid -l treebardialog 8008 %icosize
    xdid -x treebardialog 8008 -mnswyz
    xdid -s treebardialog 8008 +c 5
    xdid -w treebardialog 8008 +ng 0 themes\icons\close.ico
    xdid -w treebardialog 8008 +hd 0 themes\icons\close.ico
    if (%cur_x == ON) /xdid -J treebardialog 8008 +f %butt
    /xdid -C treebardialog 8008 +b $dcx(GetSystemColor, COLOR_WINDOW)
  }
}

alias background_color_tree {
  if ($xdialog(treebardialog, 1).isid == $true) /xdialog -d treebardialog 1
  if ($xdialog(treebardialog, 1).isid != $true) {
    ;// Initialising control: BG (Button 1)
    xdialog -c treebardialog 1 button 2 40 200 40 tabstop default group tooltips bitmap shadow notheme transparent 
    if (%lang == en) { xdid -t treebardialog 1 ██ BackGround | xdid -T treebardialog 1 Back Ground Color } 
    if (%lang == it) { xdid -t treebardialog 1 ██ colore di Fondo | xdid -T treebardialog 1 Colore di Fondo }
    if (%lang == es) { xdid -t treebardialog 1 ██ color de Fondo | xdid -T treebardialog 1 Color de Fondo }
    if (%lang == fr) { xdid -t treebardialog 1 ██ couleur de Fond | xdid -T treebardialog 1 Couleur de Fond }
    xdid -f treebardialog 1 %quality %chars %xdim %xcar
    xdid -m treebardialog 1 1
    xdid -C treebardialog 1 +b $dcx(GetSystemColor, COLOR_WINDOW)
    xdid -x treebardialog 1 -mnswyz
    xdid -s treebardialog 1 +c 10
    xdid -c treebardialog 1 +h %treebarbg
    xdid -c treebardialog 1 +d %treebarbg
    xdid -c treebardialog 1 +n %treebarbg
    xdid -c treebardialog 1 +s %treebarbg
    if (%cur_x == ON) xdid -J treebardialog 1 +f %butt
  }
}

alias text_color_tree {
  if ($xdialog(treebardialog, 2).isid == $true) /xdialog -d treebardialog 2
  if ($xdialog(treebardialog, 2).isid != $true) {
    ;// Initialising control: Text  (Button 2)
    xdialog -c treebardialog 2 button 2 80 200 40 tabstop default group tooltips bitmap shadow notheme transparent
    if (%lang == en) { xdid -t treebardialog 2 ██ Text | xdid -T treebardialog 2 Set Text Color }
    if (%lang == it) { xdid -t treebardialog 2 ██ Testo | xdid -T treebardialog 2 Imposta il colore del testo }
    if (%lang == es) { xdid -t treebardialog 2 ██ Texto | xdid -T treebardialog 2 Ajuste el color de texto }
    if (%lang == fr) { xdid -t treebardialog 2 ██ Texte | xdid -T treebardialog 2 Régler la couleur du texte }
    xdid -f treebardialog 2 %quality %chars %xdim %xcar
    xdid -m treebardialog 2 1
    xdid -C treebardialog 2 +b $dcx(GetSystemColor, COLOR_WINDOW)
    xdid -x treebardialog 2 -mnswyz
    xdid -s treebardialog 2 +c 10
    xdid -c treebardialog 2 +h %treetext
    xdid -c treebardialog 2 +d %treetext
    xdid -c treebardialog 2 +n %treetext
    xdid -c treebardialog 2 +s %treetext
    if (%cur_x == ON) /xdid -J treebardialog 2 +f %butt
  }
}

alias line_color_tree {
  if ($xdialog(treebardialog, 3).isid == $true) /xdialog -d treebardialog 3
  if ($xdialog(treebardialog, 3).isid != $true) {
    ;// Initialising control: Line (Button 3)
    xdialog -c treebardialog 3 button 2 120 200 40 tabstop default group tooltips bitmap shadow notheme transparent
    if (%lang == en) { xdid -t treebardialog 3 ██ Line | xdid -T treebardialog 3 Set Line Color }   
    if (%lang == it) { xdid -t treebardialog 3 ██ Linea | xdid -T treebardialog 3 Imposta il colore della Linea } 
    if (%lang == es) { xdid -t treebardialog 3 ██ Linea | xdid -T treebardialog 3 establece el color de la Línea } 
    if (%lang == fr) { xdid -t treebardialog 3 ██ Ligne | xdid -T treebardialog 3 définit la couleur de la ligne } 
    xdid -f treebardialog 3 %quality %chars %xdim %xcar
    xdid -m treebardialog 3 1
    xdid -C treebardialog 3 +b $dcx(GetSystemColor, COLOR_WINDOW)
    xdid -x treebardialog 3 -mnswyz
    xdid -s treebardialog 3 +c 10
    xdid -c treebardialog 3 +h %treeline
    xdid -c treebardialog 3 +d %treeline
    xdid -c treebardialog 3 +n %treeline
    xdid -c treebardialog 3 +s %treeline
    if (%cur_x == ON) /xdid -J treebardialog 3 +f %butt
  }
}

alias selected_color_tree {
  if ($xdialog(treebardialog, 4).isid == $true) /xdialog -d treebardialog 4
  if ($xdialog(treebardialog, 4).isid != $true) {
    ;// Initialising control: Select BG (Button 4)
    xdialog -c treebardialog 4 button 2 160 200 40 tabstop default group tooltips bitmap shadow notheme transparent
    if (%lang == en) { xdid -t treebardialog 4 ██ Selected BG | xdid -T treebardialog 4 Set Selected BG }
    if (%lang == it) { xdid -t treebardialog 4 ██ fondo Selezione | xdid -T treebardialog 4 Imposta il colore sotto il testo selezionato }
    if (%lang == fr) { xdid -t treebardialog 4 ██ Sous Sélectionné | xdid -T treebardialog 4 Définit la couleur sous le texte sélectionné }
    if (%lang == es) { xdid -t treebardialog 4 ██ Bajo Seleccionada | xdid -T treebardialog 4 Establece el color bajo el texto seleccionado }    
    xdid -f treebardialog 4 %quality %chars %xdim %xcar
    xdid -m treebardialog 4 1
    /xdid -C treebardialog 4 +b $dcx(GetSystemColor, COLOR_WINDOW)
    xdid -x treebardialog 4 -mnswyz
    xdid -s treebardialog 4 +c 10
    xdid -c treebardialog 4 +h %treetextsb
    xdid -c treebardialog 4 +d %treetextsb
    xdid -c treebardialog 4 +n %treetextsb
    xdid -c treebardialog 4 +s %treetextsb
    if (%cur_x == ON) /xdid -J treebardialog 4 +f %butt
  }
}

alias messagebg_color_tree {
  if ($xdialog(treebardialog, 5).isid == $true) /xdialog -d treebardialog 5
  if ($xdialog(treebardialog, 5).isid != $true) {
    ;// Initialising control: Messages BG Colors (Button 5)
    xdialog -c treebardialog 5 button 2 200 200 40 tabstop default group tooltips bitmap shadow notheme transparent
    if (%lang == en) { xdid -t treebardialog 5 ██ MessagesBG | xdid -T treebardialog 5 Set Messages Background Colors }
    if (%lang == it) { xdid -t treebardialog 5 ██ sotto Messaggio | xdid -T treebardialog 5 Imposta il colore di fondo del Messaggio }
    if (%lang == es) { xdid -t treebardialog 5 ██ Mensajes fondo | xdid -T treebardialog 5 Establece el color de fondo del mensaje }
    if (%lang == fr) { xdid -t treebardialog 5 ██ message fond | xdid -T treebardialog 5 Définit la couleur du message de fond }
    xdid -f treebardialog 5 %quality %chars %xdim %xcar
    xdid -m treebardialog 5 1
    /xdid -C treebardialog 5 +b $dcx(GetSystemColor, COLOR_WINDOW)
    xdid -x treebardialog 5 -mnswyz
    xdid -s treebardialog 5 +c 10
    xdid -c treebardialog 5 +h %messagebg
    xdid -c treebardialog 5 +d %messagebg
    xdid -c treebardialog 5 +n %messagebg
    xdid -c treebardialog 5 +s %messagebg
    if (%cur_x == ON) /xdid -J treebardialog 5 +f %butt
  }
}

alias messages_color_tree {
  if ($xdialog(treebardialog, 6).isid == $true) /xdialog -d treebardialog 6
  if ($xdialog(treebardialog, 6).isid != $true) {
    ;// Initialising control: Messages Colors (Button 6)
    xdialog -c treebardialog 6 button 2 240 200 40 tabstop default group tooltips bitmap shadow notheme transparent
    if (%lang == en) { xdid -t treebardialog 6 ██ Messages | xdid -T treebardialog 6 Set Messages Colors }
    if (%lang == it) { xdid -t treebardialog 6 ██ Messaggi | xdid -T treebardialog 6 Imposta il colore del Messaggio }
    if (%lang == es) { xdid -t treebardialog 6 ██ Mensajes | xdid -T treebardialog 6 Establece el color del Mensaje }
    if (%lang == fr) { xdid -t treebardialog 6 ██ Messages | xdid -T treebardialog 6 Définit la couleur du message }
    xdid -f treebardialog 6 %quality %chars %xdim %xcar
    xdid -m treebardialog 6 1
    /xdid -C treebardialog 6 +b $dcx(GetSystemColor, COLOR_WINDOW)
    xdid -x treebardialog 6 -mnswyz
    xdid -s treebardialog 6 +c 10
    xdid -c treebardialog 6 +h %treemess
    xdid -c treebardialog 6 +d %treemess
    xdid -c treebardialog 6 +n %treemess
    xdid -c treebardialog 6 +s %treemess
    if (%cur_x == ON) /xdid -J treebardialog 6 +f %butt
  }
}

alias hottext_color_tree {
  if ($xdialog(treebardialog, 7).isid == $true) /xdialog -d treebardialog 7
  if ($xdialog(treebardialog, 7).isid != $true) {
    ;// Initialising control: Messages Colors (Button 7)
    xdialog -c treebardialog 7 button 2 280 200 40 tabstop default group tooltips bitmap shadow notheme transparent
    if (%lang == en) { xdid -t treebardialog 7 ██ Hot Text | xdid -T treebardialog 7 Set Hot Text Color }
    if (%lang == it) { xdid -t treebardialog 7 ██ Evidenziato | xdid -T treebardialog 7 Imposta il colore in Evidenza }
    if (%lang == es) { xdid -t treebardialog 7 ██ punto Culminante | xdid -T treebardialog 7 Ajuste el color a ver }
    if (%lang == fr) { xdid -t treebardialog 7 ██ Surligner | xdid -T treebardialog 7 Réglez la couleur à Lire }
    xdid -f treebardialog 7 %quality %chars %xdim %xcar
    xdid -m treebardialog 7 1
    /xdid -C treebardialog 7 +b $dcx(GetSystemColor, COLOR_WINDOW)
    xdid -x treebardialog 7 -mnswyz
    xdid -s treebardialog 7 +c 10
    xdid -c treebardialog 7 +h %treeh
    xdid -c treebardialog 7 +d %treeh
    xdid -c treebardialog 7 +n %treeh
    xdid -c treebardialog 7 +s %treeh
    if (%cur_x == ON) /xdid -J treebardialog 7 +f %butt
  }
}

alias event_color_tree {
  if ($xdialog(treebardialog, 8).isid == $true) /xdialog -d treebardialog 8
  if ($xdialog(treebardialog, 8).isid != $true) {
    ;// Initialising control: BG (Button 8)
    xdialog -c treebardialog 8 button 2 320 200 40 tabstop default group tooltips bitmap shadow notheme transparent
    if (%lang == en) { xdid -t treebardialog 8 ██ Events | xdid -T treebardialog 8 Sets the color Events } 
    if (%lang == it) { xdid -t treebardialog 8 ██ Eventi | xdid -T treebardialog 8 Imposta il colore Eventi }
    if (%lang == es) { xdid -t treebardialog 8 ██ Eventos | xdid -T treebardialog 8 Establece los Eventos de color }
    if (%lang == fr) { xdid -t treebardialog 8 ██ Événements | xdid -T treebardialog 8 Définit la couleur Événements }
    xdid -f treebardialog 8 %quality %chars %xdim %xcar
    xdid -m treebardialog 8 1
    xdid -C treebardialog 8 +b $dcx(GetSystemColor, COLOR_WINDOW)
    xdid -x treebardialog 8 -mnswyz
    xdid -s treebardialog 8 +c 10
    xdid -c treebardialog 8 +h %treevent
    xdid -c treebardialog 8 +d %treevent
    xdid -c treebardialog 8 +n %treevent
    xdid -c treebardialog 8 +s %treevent
    if (%cur_x == ON) xdid -J treebardialog 8 +f %butt
  }
}

;// quick-access menu item
menu status,channel {
  treebar: { treebardialog }
  -
}




Last edited by DEATHJ0KER; 12/03/15 01:04 PM.

A Creative & Interactive mIRC Scripting