There's another way to show / hide tool-windows. For most / all tool-windows there is an activate-command to show the window and a toggle command to show/ hide. So you can make a "hide" command by combining them.
_command void hide_clipboards() name_info(',')
{
activate_clipboards();
toggle_clipboards();
}
This doesn't let you set the location or size of the window though. Use the keybindings dialog and find commands that start with activate to find them all - activate_defs etc.
I've sent the code below to slickedit support - they should be able to reproduce a crash I think - in a clean config using V25.0.1.
#include "slick.sh"
#pragma option(strictsemicolons,on)
#pragma option(strict,on)
#pragma option(autodecl,off)
#pragma option(strictparens,on)
#if 1
static bool layout_is_default;
static int my_layout_timer_handle;
static int my_layout_startup_counter;
static _str my_layout_current_buf_name;
static void my_layout_timer_callback1()
{
if (!_use_timers || my_layout_timer_handle < 0)
return;
if (++my_layout_startup_counter < 6)
return;
my_layout_startup_counter = 6;
if (_no_child_windows()) {
return;
}
if (my_layout_current_buf_name != _mdi.p_child.p_buf_name){
my_layout_current_buf_name = _mdi.p_child.p_buf_name;
}
else {
if ( get_extension(_mdi.p_child.p_buf_name) == "html" )
{
//say("html " :+ layout_is_default :+ " x " :+ oldbuffname );
if (layout_is_default)
load_named_layout("minimal");
layout_is_default = false;
}
else
{
//say("nothtml " :+ layout_is_default :+ " x " :+ oldbuffname );
if (!layout_is_default)
load_named_layout("default");
layout_is_default = true;
}
}
_kill_timer(my_layout_timer_handle);
my_layout_timer_handle = _set_timer(1000, my_layout_timer_callback1);
}
void _switchbuf_my_layout_timer()
{
if (my_layout_startup_counter < 6)
return;
_kill_timer(my_layout_timer_handle);
my_layout_timer_handle = _set_timer(50, my_layout_timer_callback1);
}
definit()
{
if (arg(1) == "L") {
_kill_timer(my_layout_timer_handle);
}
my_layout_timer_handle = _set_timer(1000, my_layout_timer_callback1);
my_layout_startup_counter = 0;
my_layout_current_buf_name = "";
}
#endif