// http://akelpad.sourceforge.net/forum/viewtopic.php?p=9380#9380
// Version: 2014-12-20
// Author: KDJ
//
// *** Changing selection mode (column on/off) ***
//
// Usage:
//   Call("Scripts::Main", 1, "SelectionSwitch.js")

var hEditWnd = AkelPad.GetEditWnd();

if (hEditWnd)
{
  if (AkelPad.SendMessage(hEditWnd, 3127 /*AEM_GETCOLUMNSEL*/, 0, 0))
    AkelPad.SendMessage(hEditWnd, 3128 /*AEM_UPDATESEL*/, 0x0 /*column off*/, 0);
  else
    AkelPad.SendMessage(hEditWnd, 3128 /*AEM_UPDATESEL*/, 0x1 /*AESELT_COLUMNON*/, 0);
}
