mIRC Home    About    Download    Register    News    Help

Print Thread
#251835 06/03/15 12:51 AM
Joined: Apr 2012
Posts: 48
Ameglian cow
OP Offline
Ameglian cow
Joined: Apr 2012
Posts: 48
How can I find the location of Treebar mIRC
(top, bottom, left, right)
This I need to apply the effect popup dialog box that clips to Treebar.

is it possible?

[img:center]http://www.imageupload.co.uk/image/5nnx[/img]

Code:
on *:start: {
  if (%treex == ON) dcxtreebar
}

;====================================================================================================================================================================================;
; xtreebar_callback | Ook http://www.mircscripting.info/                                                                                                                             ;
;====================================================================================================================================================================================;

alias xtreebar_callback { 
  !if ($1 == geticons) { 
    ; geticons <type> <text> 
    !if ($2 == status) return 1 1 
    !if ($2 == channel) return 2 2 
    !if ($2 == custom) return 3 3 
    !if ($2 == send) return 4 4 
    !if ($2 == get) return 5 5 
    !if ($2 == notify) return 6 6 
    !if ($2 == query) return 7 7 
    !if (*folder iswm $2) return 8 8 
    !return 0 0 
  } 
  !if ($1 == gettooltip) { 
    !if ($2 == channel) { 
      !if ($3 == $chan($active)) return $chan($active) 
      !if ($chan($active)* iswm $3) return $chan($active) Channel 
    } 
    !if ($2 == status) return $3 
    !if ($2 == WindowFolder) return Custom Windows Folder 
  } 
} 

;===========================================================================================================================;
; alias dcxtreebar | Valentino Decaroli ~ caronte.ade@gmail.com                                                           ;
;===========================================================================================================================;

alias dcxtreebar { 
  xtreebar -w clear 
  if ($isfile(%icostatus)) xtreebar -w 0 +a 1 %icostatus 
  if ($isfile(%icochan)) xtreebar -w 0 +a 2 %icochan
  if ($isfile(%icocust)) xtreebar -w 0 +a 3 %icocust 
  if ($isfile(%icosend)) xtreebar -w 0 +a 4 %icosend
  if ($isfile(%icoget)) xtreebar -w 0 +a 5 %icoget
  if ($isfile(%iconot)) xtreebar -w 0 +a 6 %iconot 
  if ($isfile(%icoq)) xtreebar -w 0 +a 7 %icoq  
  if ($isfile(%icodir)) xtreebar -w 0 +a 8 %icodir  
  xtreebar -c +b %treebarbg
  xtreebar -c +t %treetext 
  xtreebar -c +l %treeline 
  xtreebar -c +m %treemess 
  xtreebar -c +e %treevent
  xtreebar -c +M %messagebg
  xtreebar -c +S %treetextsb
  xtreebar -c +E %treetextevo
  xtreebar -c +z %treevent
  xtreebar -c +Z %treetextevo
  xtreebar -c +h %treeh
  xtreebar -c +H %treehot
  xtreebar -s tooltips infotip transparent 
  xtreebar -s balloon trackselect scroll rootlines showsel fadebuttons richtooltip
  xtreebar -f %textmode %xchartree %xdimtree %xcartree
  xtreebar -T 1 
} 

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 200 200 300 1080
}

on *:dialog:treebardialog:*:*: {
  if ($devent == init) {
    /dcx Mark $dname treebardialog_cb
    /xdialog -b treebardialog -mnszo
    /xdialog -a $dname +so 200
    /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
  ; .timer 1 0 /xdock -b $dialog(treebardialog).hwnd +so
  .timer 1 0  /xdock -m $dialog(treebardialog).hwnd +l
}


;// 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 == 8008) { /xdialog -h treebardialog | /xdialog -x treebardialog } 
  }
  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 5
    ; xdid -t treebardialog 8008 text
    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 100
    xdid -c treebardialog 1 +h $dcx(GetSystemColor, COLOR_HOTLIGHT)
    xdid -c treebardialog 1 +d $dcx(GetSystemColor, COLOR_HIGHLIGHT)
    xdid -c treebardialog 1 +n %treebarbg
    xdid -c treebardialog 1 +s $dcx(GetSystemColor, COLOR_HIGHLIGHTTEXT)
    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 100
    xdid -c treebardialog 2 +h $dcx(GetSystemColor, COLOR_HOTLIGHT)
    xdid -c treebardialog 2 +d $dcx(GetSystemColor, COLOR_HIGHLIGHT)
    xdid -c treebardialog 2 +n %treetext
    xdid -c treebardialog 2 +s $dcx(GetSystemColor, COLOR_HIGHLIGHTTEXT)
    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 Set Line Color } 
    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 100
    xdid -c treebardialog 3 +h $dcx(GetSystemColor, COLOR_HOTLIGHT)
    xdid -c treebardialog 3 +d $dcx(GetSystemColor, COLOR_HIGHLIGHT)
    xdid -c treebardialog 3 +n %treeline
    xdid -c treebardialog 3 +s $dcx(GetSystemColor, COLOR_HIGHLIGHTTEXT)
    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 100
    xdid -c treebardialog 4 +h $dcx(GetSystemColor, COLOR_HOTLIGHT)
    xdid -c treebardialog 4 +d $dcx(GetSystemColor, COLOR_HIGHLIGHT)
    xdid -c treebardialog 4 +n %treetextsb
    xdid -c treebardialog 4 +s $dcx(GetSystemColor, COLOR_HIGHLIGHTTEXT)
    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 100
    xdid -c treebardialog 5 +h $dcx(GetSystemColor, COLOR_HOTLIGHT)
    xdid -c treebardialog 5 +d $dcx(GetSystemColor, COLOR_HIGHLIGHT)
    xdid -c treebardialog 5 +n %messagebg
    xdid -c treebardialog 5 +s $dcx(GetSystemColor, COLOR_HIGHLIGHTTEXT)
    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 100
    xdid -c treebardialog 6 +h $dcx(GetSystemColor, COLOR_HOTLIGHT)
    xdid -c treebardialog 6 +d $dcx(GetSystemColor, COLOR_HIGHLIGHT)
    xdid -c treebardialog 6 +n %treemess
    xdid -c treebardialog 6 +s $dcx(GetSystemColor, COLOR_HIGHLIGHTTEXT)
    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 100
    xdid -c treebardialog 7 +h $dcx(GetSystemColor, COLOR_HOTLIGHT)
    xdid -c treebardialog 7 +d $dcx(GetSystemColor, COLOR_HIGHLIGHT)
    xdid -c treebardialog 7 +n %treeh
    xdid -c treebardialog 7 +s $dcx(GetSystemColor, COLOR_HIGHLIGHTTEXT)
    if (%cur_x == ON) /xdid -J treebardialog 7 +f %butt
  }
}

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


Last edited by DEATHJ0KER; 06/03/15 12:57 AM.

A Creative & Interactive mIRC Scripting
Joined: Apr 2012
Posts: 48
Ameglian cow
OP Offline
Ameglian cow
Joined: Apr 2012
Posts: 48
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 &#9608;&#9608; BackGround | xdid -T treebardialog 1 Back Ground Color } 
    if (%lang == it) { xdid -t treebardialog 1 &#9608;&#9608; colore di Fondo | xdid -T treebardialog 1 Colore di Fondo }
    if (%lang == es) { xdid -t treebardialog 1 &#9608;&#9608; color de Fondo | xdid -T treebardialog 1 Color de Fondo }
    if (%lang == fr) { xdid -t treebardialog 1 &#9608;&#9608; 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 &#9608;&#9608; Text | xdid -T treebardialog 2 Set Text Color }
    if (%lang == it) { xdid -t treebardialog 2 &#9608;&#9608; Testo | xdid -T treebardialog 2 Imposta il colore del testo }
    if (%lang == es) { xdid -t treebardialog 2 &#9608;&#9608; Texto | xdid -T treebardialog 2 Ajuste el color de texto }
    if (%lang == fr) { xdid -t treebardialog 2 &#9608;&#9608; 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 &#9608;&#9608; Line | xdid -T treebardialog 3 Set Line Color }   
    if (%lang == it) { xdid -t treebardialog 3 &#9608;&#9608; Linea | xdid -T treebardialog 3 Imposta il colore della Linea } 
    if (%lang == es) { xdid -t treebardialog 3 &#9608;&#9608; Linea | xdid -T treebardialog 3 establece el color de la Línea } 
    if (%lang == fr) { xdid -t treebardialog 3 &#9608;&#9608; 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 &#9608;&#9608; Selected BG | xdid -T treebardialog 4 Set Selected BG }
    if (%lang == it) { xdid -t treebardialog 4 &#9608;&#9608; fondo Selezione | xdid -T treebardialog 4 Imposta il colore sotto il testo selezionato }
    if (%lang == fr) { xdid -t treebardialog 4 &#9608;&#9608; Sous Sélectionné | xdid -T treebardialog 4 Définit la couleur sous le texte sélectionné }
    if (%lang == es) { xdid -t treebardialog 4 &#9608;&#9608; 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 &#9608;&#9608; MessagesBG | xdid -T treebardialog 5 Set Messages Background Colors }
    if (%lang == it) { xdid -t treebardialog 5 &#9608;&#9608; sotto Messaggio | xdid -T treebardialog 5 Imposta il colore di fondo del Messaggio }
    if (%lang == es) { xdid -t treebardialog 5 &#9608;&#9608; Mensajes fondo | xdid -T treebardialog 5 Establece el color de fondo del mensaje }
    if (%lang == fr) { xdid -t treebardialog 5 &#9608;&#9608; 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 &#9608;&#9608; Messages | xdid -T treebardialog 6 Set Messages Colors }
    if (%lang == it) { xdid -t treebardialog 6 &#9608;&#9608; Messaggi | xdid -T treebardialog 6 Imposta il colore del Messaggio }
    if (%lang == es) { xdid -t treebardialog 6 &#9608;&#9608; Mensajes | xdid -T treebardialog 6 Establece el color del Mensaje }
    if (%lang == fr) { xdid -t treebardialog 6 &#9608;&#9608; 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 &#9608;&#9608; Hot Text | xdid -T treebardialog 7 Set Hot Text Color }
    if (%lang == it) { xdid -t treebardialog 7 &#9608;&#9608; Evidenziato | xdid -T treebardialog 7 Imposta il colore in Evidenza }
    if (%lang == es) { xdid -t treebardialog 7 &#9608;&#9608; punto Culminante | xdid -T treebardialog 7 Ajuste el color a ver }
    if (%lang == fr) { xdid -t treebardialog 7 &#9608;&#9608; 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 &#9608;&#9608; Events | xdid -T treebardialog 8 Sets the color Events } 
    if (%lang == it) { xdid -t treebardialog 8 &#9608;&#9608; Eventi | xdid -T treebardialog 8 Imposta il colore Eventi }
    if (%lang == es) { xdid -t treebardialog 8 &#9608;&#9608; Eventos | xdid -T treebardialog 8 Establece los Eventos de color }
    if (%lang == fr) { xdid -t treebardialog 8 &#9608;&#9608; É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
Joined: Dec 2002
Posts: 253
T
Fjord artisan
Offline
Fjord artisan
T
Joined: Dec 2002
Posts: 253
Code:
alias treebarinfo {
  var %menu = $menubar , %tree = $treebar , %tool = $toolbar
  if (%menu) .menubar off
  if (%tool) .toolbar off
  if (!%tree) .treebar on

  var %tree.bw = $window(-2).w - $window(-2).dw , %tree.bh = $window(-2).h - $window(-2).dh
  var %tree.w = $window(-2).dw - $window(-3).w , %tree.h = $window(-2).dh - $window(-3).h
  var %tree.x = $window(-3).x - $window(-2).x , %tree.y = $window(-3).y - $window(-2).y

  var %orientation = $iif(!%tree.w,horizontal,$iif(!%tree.h,vertical))
  if (%orientation == horizontal) { var %position = $iif(%tree.y > %tree.bh,top,bottom) }
  else { var %position =  $iif(%tree.x > %tree.bw,left,right) }

  if (%menu) .menubar on
  if (%tool) .toolbar on
  if (!%tree) .treebar off
  return %orientation %position
}


I couldn't really find a good method to figure out where the treebar was located, but by hiding the menubar and toolbar and using some $window() calculations I came up with a method to derive it's docked location and orientation. Because this switches visuals off and on it might not be the most optimal solution, and probably should be cached rather than constantly tested, but I hope this helps some smile

Code:
//echo -a $treebarinfo
vertical left


on another note: it turns out it is available in the mIRC.ini options section

I had to open and close mIRC each time as the INI file wasn't updated upon moving the treebars location but:

Code:
//echo -a $readini($mircini,options,n8)
1,0,1,168,1,1,0,2,0,0,1,1,0,0,1,0,0,0,0,0,0,0,168,1,0,1,1,1,0,0,0,1,1,0,3,0,0


apparently the 2nd token within the list is the toolbar dock location, 0 = bottom, 1 = top, 2 = left, 3 = right.

Talon #251996 13/03/15 09:07 PM
Joined: Apr 2012
Posts: 48
Ameglian cow
OP Offline
Ameglian cow
Joined: Apr 2012
Posts: 48
This alias is important and can be used for different purposes. In addition to determining the position of the Treebar mIRC, eliminates troublesome bands fund that remain impressed when you resize a dialog box through the style of the borders edges.
This produces a refresh of the entire mIRC window.

thanks again...
Great job Talon smile

Last edited by DEATHJ0KER; 13/03/15 11:55 PM. Reason: Update notes

A Creative & Interactive mIRC Scripting
Joined: Apr 2012
Posts: 48
Ameglian cow
OP Offline
Ameglian cow
Joined: Apr 2012
Posts: 48
The code is not complete yet, but you can see how it works with the alias of Talon Tables Script Treebar position

thanks again...
Great job Talon smile [/quote]

Last edited by DEATHJ0KER; 14/03/15 11:40 PM. Reason: Update notes

A Creative & Interactive mIRC Scripting
Talon #252013 15/03/15 03:30 PM
Joined: Jul 2006
Posts: 4,186
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,186
Quote:
I had to open and close mIRC each time as the INI file wasn't updated upon moving the treebars location
you can use /saveini to get mIRC to save all its ini files settings on the disk.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #252126 23/03/15 02:55 PM
Joined: Apr 2012
Posts: 48
Ameglian cow
OP Offline
Ameglian cow
Joined: Apr 2012
Posts: 48
My consideration about... using the alias of Talon i solved the problem besides other refresh issues that occur when you resize the dialogs windows attached via "xdock" without using the mirc.ini
Is an excellent solution smile


A Creative & Interactive mIRC Scripting
Talon #254415 09/08/15 09:55 PM
Joined: Apr 2012
Posts: 48
Ameglian cow
OP Offline
Ameglian cow
Joined: Apr 2012
Posts: 48
DCX mIRC Tables Script only for Windows 10

One of its features and to change the colors through the theme of Windows Tables Script How to change the theme with Windows 10

Tables Script ~ Pre Alpha 1.A ~ Under construction - Treebar Xpopup - Test version Download

Last edited by DEATHJ0KER; 09/08/15 10:05 PM. Reason: More information

A Creative & Interactive mIRC Scripting
Joined: Sep 2003
Posts: 35
O
Ook Offline
Ameglian cow
Offline
Ameglian cow
O
Joined: Sep 2003
Posts: 35
since you are using dcx, why not just use the dcx command?

Code:
/*! \brief $xdock(hwnd|mIRC).prop
 *
 * $xdock(mIRC).switchBarPos
 * $xdock(mIRC).toolBarPos
 * $xdock(mIRC).treeBarPos
 * $xdock(mIRC).switchBarSize
 * $xdock(mIRC).toolBarSize
 * $xdock(mIRC).treeBarSize
 * $xdock(mIRC).isSwitchBar
 * $xdock(mIRC).isToolBar
 * $xdock(mIRC).isTreeBar
 * $xdock(mIRC).isMenuBar
 * $xdock(mIRC).switchBarHwnd
 * $xdock(mIRC).toolBarHwnd
 * $xdock(mIRC).treeBarHwnd
 * $xdock(mIRC).text
 *
 * $xdock(hwnd).isDocked
 * $xdock(hwnd).hasDocked
 * $xdock(hwnd).isAutoV
 * $xdock(hwnd).isAutoH
 * $xdock(hwnd).isAutoS
 * $xdock(hwnd).dockSide
 * $xdock(hwnd).text
 *
 */

Ook #257501 15/04/16 10:09 PM
Joined: Apr 2012
Posts: 48
Ameglian cow
OP Offline
Ameglian cow
Joined: Apr 2012
Posts: 48
I tried, but i could not make it work... lacking specific information in my code.
$xdock(mIRC).treeBarPos did not return the position of Treebar
even the error and do not understand where i'm wrong.

.echo $xdock(mIRC).treeBarPos

Code:
alias treebardialog { 
  if ($xdock(mIRC).treeBarPos == left) {
    /set %pos_or -500
    /set %pos_vr -100
    /set %pos_lr 320
    /set %pos_lu 1080
  }
  if ($xdock(mIRC).treeBarPos == right) {
    /set %pos_or 1920
    /set %pos_vr -100
    /set %pos_lr 320
    /set %pos_lu 1080
  }
  if ($xdock(mIRC).treeBarPos == top) {
    /set %pos_or -100
    /set %pos_vr -100
    /set %pos_lr 1920
    /set %pos_lu 400
  }
  if ($xdock(mIRC).treeBarPos == bottom) {
    /set %pos_or -100
    /set %pos_vr 1600
    /set %pos_lr 1920
    /set %pos_lu 400
  }
  dialog -ma treebardialog treebardialog_table
  /xdialog -b treebardialog -hmnsvxzo
  /xdialog -R treebardialog +s $dcx(GetSystemColor, COLOR_WINDOW)
  if ($xdock(mIRC).treeBarPos == left) { cla_tree_lr } 
  if ($xdock(mIRC).treeBarPos == right) { cla_tree_lr } 
  if ($xdock(mIRC).treeBarPos == top) { cla_tree_tb } 
  if ($xdock(mIRC).treeBarPos == bottom) { cla_tree_tb } 
  .timer 1 0 xdialog -l treebardialog update
}


Now work, perfect, it works well... LOL³
Thanks for the advice.

Last edited by DEATHJ0KER; 16/04/16 12:23 AM. Reason: added sample code

A Creative & Interactive mIRC Scripting

Link Copied to Clipboard