Display Custom Toolbar and/or Screen Refresh? [Solved]

Cayman StudiosCayman Studios Posts: 1,135

I've written a script which creates and enables a custom toolbar, but for some reason it will not display immediately.  If I refresh the screen by going into and out of Full Screen mode (Shift+F11), the toolbar will then show, so I have tried reproducing this in script by using MainWindow.goFullScreen() and then MainWindow.exitFullScreen(), but it has no effect. 

Does anyone know a way of mimicking a screen refresh in script?  I know it can be done because maclean has done it in his Room Creator, but the script is encrypted so I can't nab his trick. 

Post edited by Cayman Studios on

Comments

  • Try telling the Pane Manager to save and then reload the session layout - as I recall that worked for another person though I don't have a script to had to test it.

  • Cayman StudiosCayman Studios Posts: 1,135
    edited December 2015

    Thank you, Richard.  I finally managed to fathom the syntax and it works a treat:

    var oPaneMgr = MainWindow.getPaneMgr();var oLayout = oPaneMgr.getSessionLayout();oPaneMgr.saveLayout(oLayout);oPaneMgr.restoreLayout(oLayout);

     

     

    Post edited by Cayman Studios on
  • macleanmaclean Posts: 2,438

    Cayman,

    Just so you know. The Room Creator script was written for me (as a paid project) by Guandalug, who has since vanished from the forums. One of his conditions was that the script only be distributed in its encrypted form. He did give me an unencrypted version so I could modify it for later versions of DS, and Richard did all the work to keep it updated.

    Anyway, glad you got yours to work. I just wanted to let you know that I'm not deliberately keeping the info private. It was part of the deal.

    mac

  • I'm not complaining, mac.  If it wasn't for your program I wouldn't have realised it could be done at all.  yes  I understand and accept that scripts may need to be encrypted for commercial purposes.

Sign In or Register to comment.