Jump to content

Docking Problem


CharmedOne

Recommended Posts

The thing is I dont get any errors but when I try to get them to dock after clicking next or back each one docks differently which to me is wierd cause i am sure the codes right I attached a small video with this to see docking problem :lolwave: with a title :lolwave: .

 

I amready know about the bracket mismatch but i remove it dialog stops working so i leave it, i dont think thats the problem.

 

on *:START: {
  /dialog -m switchbar2 switchbar2 | /dialog -m sidebar1 sidebar1 | /dialog -m sidebar4 sidebar4 | .splay start.mp3
}



;;;;;;;;;;;;;;;;;;;;;;;;;;;;SWITCH BAR 1;;;;;;;;;;;;;;;;;;;;;;;;;;;;


:/dialog -m sidebar1 sidebar1
}
dialog sidebar1 {
alias sb1 { dialog -m sidebar1 sidebar1 }
alias csb1 { dll $rebar UnDock left | dialog -x sidebar1 sidebar1 }
alias rebar { return dll/rebar.dll }
dialog sidebar1 {
  title "sidebar1"
  size 0 0 188 776
  option pixels
  icon 77, 0 0 188 800, $mircdirimages\leftbar.jpg, 0
  text "", 1, 51 23 87 16, center
  button "<< Back", 2, 22 531 67 25, disable
  button "Next >>", 3, 92 531 67 25
  text "Script Options", 4, 54 510 77 16, center
}
on *:dialog:sidebar1:sclick:*:{
  if ($did == 3) { /dialog -m sidebar2 sidebar2 | /dialog -x sidebar1 sidebar1 }
}

on *:dialog:sidebar1:init:*: { 
  dll $mdx SetMircVersion $version 
  dll $mdx MarkDialog $dname
  dll dll\mdx.dll SetBorderStyle 1 staticedge  14 50 Georgia Bold
  dll $mdx SetMircVersion $version
  dll $mdx MarkDialog $dname
  dll dll\mdx.dll SetColor $dname 1 text $rgb(%list1colour,%list2colour,%list3colour)
  dll $mdx SetFont $dname 1 40 Georgia Bold
  mdx SetFont 1 +a 12 100 Verdana

  dll $rebar Dock $dialog($dname).hwnd > left | /splay zip.wav  
  did -a sidebar1 1 $time(h:nn:ss tt)

  colorize

  .timerNOW 0 1 timer.now
}

;Aliases
alias mdx_fullpath { return $+(",$mircdir\dll/mdx.dll,") }
alias mdxinit { dll $mdx_fullpath SetMircVersion $version | dll $mdx_fullpath MarkDialog $dname }
alias -l timer.now {
  if ($dialog(sidebar1)) { did -ra sidebar1 1 $time(h:nn:ss tt) }
  else .timerNOW  OFF
}
alias SideBarRFH {
  did -a sidebar1 1 $time(h:nn:ss tt)
  .timerNOW 0 1 timer.now
}

alias colorize {
  var %x 1
  :lp
  dll $mdx SetDialog $dname bgcolor $rgb(0,0,0)
  dll $mdx SetColor $dname %x background $rgb(0,0,0)
  dll $mdx SetColor $dname %x text $rgb(255,255,255)
  dll $mdx SetColor $dname %x textbg $rgb(0,0,0)
  inc %x
  if (%x == 100) { goto nd }
  else { goto lp }
  :nd
}


;--------------------------------------------------------------------------------------------------------------

:/dialog -m sidebar2 sidebar2
}
dialog sidebar2 {
alias sb2 { dialog -m sidebar2 sidebar2 }
alias csb2 { dll $rebar UnDock left | dialog -x sidebar2 sidebar2 }
alias rebar { return dll/rebar.dll }
dialog sidebar2 {
  title "sidebar2"
  size 0 0 188 776
  option pixels
  icon 77, 0 0 188 800, $mircdirimages\leftbar2.jpg, 0
  button "<< Back", 2, 22 531 67 25
  button "Next >>", 3, 92 531 67 25
  text "Script Options", 4, 54 510 77 16, center
}
on *:dialog:sidebar2:sclick:*:{
  if ($did == 2) { /dialog -m sidebar1 sidebar1 | /dialog -x sidebar2 sidebar2 }
  if ($did == 3) { /dialog -m sidebar3 sidebar3 | /dialog -m sidebarx sidebarx }
}

on *:dialog:sidebar2:init:*: { 
  dll $mdx SetMircVersion $version 
  dll $mdx MarkDialog $dname
  dll dll\mdx.dll SetBorderStyle 1 staticedge  14 50 Georgia Bold
  dll $mdx SetMircVersion $version
  dll $mdx MarkDialog $dname
  dll dll\mdx.dll SetColor $dname 1 text $rgb(%list1colour,%list2colour,%list3colour)
  dll $mdx SetFont $dname 1 40 Georgia Bold
  mdx SetFont 1 +a 12 100 Verdana

  dll $rebar Dock $dialog($dname).hwnd > left | /splay zip.wav  

  colorize
}

;--------------------------------------------------------------------------------------------------------------

:/dialog -m sidebar3 sidebar3
}
dialog sidebar3 {
alias sb3 { dialog -m sidebar3 sidebar3 }
alias csb3 { dll $rebar UnDock left | dialog -x sidebar2 sidebar2 }
alias rebar { return dll/rebar.dll }
dialog sidebar3 {
  title "sidebar3"
  size 0 0 188 776
  option pixels
  icon 77, 0 0 188 800, $mircdirimages\leftbar2.jpg, 0
  button "<< Back", 2, 22 531 67 25
  button "Next >>", 3, 92 531 67 25, disable
  text "Script Options", 4, 54 510 77 16, center
}
on *:dialog:sidebar3:sclick:*:{
  if ($did == 2) { /dialog -x sidebar3 sidebar3 | /dialog -m sidebar2 sidebar2 }
}

on *:dialog:sidebar3:init:*: { 
  dll $mdx SetMircVersion $version 
  dll $mdx MarkDialog $dname
  dll dll\mdx.dll SetBorderStyle 1 staticedge  14 50 Georgia Bold
  dll $mdx SetMircVersion $version
  dll $mdx MarkDialog $dname
  dll dll\mdx.dll SetColor $dname 1 text $rgb(%list1colour,%list2colour,%list3colour)
  dll $mdx SetFont $dname 1 40 Georgia Bold
  mdx SetFont 1 +a 12 100 Verdana

  dll $rebar Dock $dialog($dname).hwnd > left | /splay zip.wav  

  colorize
}

Movie_0001.wmv

Link to comment
Share on other sites

Hey there,

 

Well I dont mean to be too mean, but your code is fair messy especially with the Mis match of Brackets and dialog sidebar* { function which is left there.. and Obviously there is either other code in the same remote file which has an open bracket! I would highly recommend sorting it, because I do not believe things can function properly with mismatched Brackets, and especially if you close brackets in not the correct order...

 

However By saying this, there could be many issues relating to your general problem... Some including...

 

1. Opening a new sidebar dialog and making it automatically dock, especially when there is already another dialog docked in the same position.

2. Your version of mIRC and your version of Rebar.dll for docking.. That could be an issue ??

 

 

Solutions....

A simple solution could be, just using 1 dialog structure, and hiding specific dialog controls?? So that when you click Next or back it hides and shows certain controls :) Including Icons and Images :)

This I'd recommend as a better alternative instead of closing and re-opening dialogs!

 

I'm a bit of a fan of DCX especially when people like yourself try a much more graphical interface...

The DCX dll also includes a docking system, plus loads more features, including a few more options which include panels and layers, which in your case, could be possibly make it easier to hide and show different controls... I don't know if you have looked at this etc.. but it's only a suggestion :)

 

Hope this helps :)

 

Kind Regards,

Daniel

Link to comment
Share on other sites

Ok ty or your suggestions tho i never really messed with DCX just MDX & have a tough time with that as far as using 1 dialog structure, and hiding specific dialog controls id have to see something done like that so i can study how it was done & reproduce same effect with my own dialog. But the suggestions do sound awsome.

Edited by CharmedOne
Link to comment
Share on other sites

Its better not to use those long pipes and breaks.. for example:

 

on *:START: { 
  /dialog -m switchbar2 switchbar2 | /dialog -m sidebar1 sidebar1 | /dialog -m sidebar4 sidebar4 | .splay start.mp3 
}

Can be done better this way..

 

on *:START: { 
  dialog -m switchbar2 switchbar2
  dialog -m sidebar1 sidebar1
  dialog -m sidebar4 sidebar4
  splay start.mp3 
}

 

 

 

Ok ty DJ i didnt know that using pipes & breaks was bad. :pizza:

Link to comment
Share on other sites

I agree with Dan.. start simple..

 

On DeeJay's note, I only stack commands once I know they are working right..

 

As far as your problem..

 

}
dialog sidebar1 {

should be erased

 

:/dialog -m sidebar2 sidebar2
}

should be erased

 

:/dialog -m sidebar3 sidebar3
}

should be erased

 

$mdx

should all be changed to dll\mdx.dll providing it is in dll\ folder. I do not even see an "alias mdx { .. }"

 

alias rebar { return dll/rebar.dll }

should be reduced to one only.

 

....

 

going back to what Dan said, maybe you should get rid of SB2 and SB3 first.. and only try to make SB1 work first. If you correct these errors, I can actually attempt to run the code.

Link to comment
Share on other sites

should all be changed to dll\mdx.dll providing it is in dll\ folder. I do not even see an "alias mdx { .. }"

 

alias rebar { return dll/rebar.dll }

should be reduced to one only.

 

....

 

going back to what Dan said, maybe you should get rid of SB2 and SB3 first.. and only try to make SB1 work first. If you correct these errors, I can actually attempt to run the code.

 

 

You do not see the alias for mdx because it is in my aliases in scripts editor like so.

mdx { return $shortfn($mircdirdll\mdx.dll) }
mdx.view { return $shortfn($mircdirdll\views.mdx)  }
mdx.bars { return $shortfn($mircdirdll\bars.mdx)  }
mdx.gen { return $shortfn($mircdirdll\CTL_GEN.MDX) }
mdx.dialog { return $shortfn($mircdirdll\dialog.mdx) }
nHTMLn_2.95 { return ($mircdirdll\nHTMLn_2.95.dll }

I origionally did have just the left side bar alone works perfect, also if I removed the

} 
dialog sidebar1 {

bracket mismatches the dialog quits working & dosent dock, i have tried many times to make it work without the mismatches & some reason side bars stop working so i just left them.

Edited by CharmedOne
Link to comment
Share on other sites

Hi again,

 

Well with the bracket mis-match, is there any other code in that file which your dialogs are in??

Like, do you have an on START event or other events or alias's which are above your dialogs code, so it may be a mis match with those features rather than your dialog code??

 

If you paste or attach the whole file, I'd be happy to help you correct bracket problems :)

 

Hope to hear from you soon :)

 

Daniel

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...