Posted: Sat Aug 20, 2011 7:58 am
You assigned hotkey in HotKey plugin or in Scripts plugin? In any case that plugin should be setup for autoload.assigned it to a hotkey
Support forum
http://akelpad.sourceforge.net/forum/
You assigned hotkey in HotKey plugin or in Scripts plugin? In any case that plugin should be setup for autoload.assigned it to a hotkey
You can do it by the script SetWindowTitle.js:martz wrote:2. Can one also somehow change the title of AkelPad window? Ie "AkelPad Notes" and "AkelPad Writing"?
Code: Select all
var sWndTitle = "AkelPad Notes";
var hMainWnd = AkelPad.GetMainWnd();
var lpText;
if ((hMainWnd) && (lpText = AkelPad.MemAlloc((sWndTitle.length + 1) * _TSIZE)))
{
AkelPad.MemCopy(lpText, sWndTitle, _TSTR);
AkelPad.SystemFunction().Call("user32::SetWindowText" + _TCHAR, hMainWnd, lpText);
AkelPad.MemFree(lpText);
}
Code: Select all
AkelPad.SystemFunction().Call("user32::SetWindowText" + _TCHAR, AkelPad.GetMainWnd(), "AkelPad Notes")Indeed, it works.FeyFre wrote:KDJ, your code can be much simpler - only one statement.Code: Select all
AkelPad.SystemFunction().Call("user32::SetWindowText" + _TCHAR, AkelPad.GetMainWnd(), "AkelPad Notes")
Yes, and Call method automatically detects argument as string and converts it internally into LPCSTR representation.(This feature was introduced a while ago into Scripts plugin)But, the description on msdn shows, that the second argument of SetWindowText() is of type LPCTSTR - a pointer to the string.
Code: Select all
AkelPad.SendMessage(AkelPad.GetMainWnd(), 0x000C /*WM_SETTEXT*/, 0, "AkelPad Notes");I think, it would be good to improve SendMessage().KDJ wrote:Well, yes, but in SendMessage() method can not use a string, it must be a pointer.
While, with some reservations, you can try the to Scroll-plugin, see the description of the Scroll::Settings-function for call an external in plug-in documentation.martz wrote:So, as for now, I've only got one slight annoyance. When the whole screen is already filled with text and I continue typing, then the caret stays on the very bottom line of the screen. In the long run this is inconvenient for the eyes.
This is possible with AEM_SETRECT, but maybe next variant will be more suitable.martz wrote:a) Add customizable top and bottom margins to the full screen window...
"Next variant"martz wrote:b) As a workaround, enable a "page break". That is, after reaching the bottom of the screen, the script would always empty the screen and I could start typing from the top line of the window again.
Infocatcher wrote:I think, it would be good to improve SendMessage().KDJ wrote:Well, yes, but in SendMessage() method can not use a string, it must be a pointer.
Code: Select all
oSys.Call("user32::SendMessage" + _TCHAR, hWndFind, 0x143 /*CB_ADDSTRING*/, 0, "12345");Yes, but why not make a similar improvement in SendMessage() ?Instructor wrote:Code: Select all
oSys.Call("user32::SendMessage" + _TCHAR, hWndFind, 0x143 /*CB_ADDSTRING*/, 0, "12345");
Hmm, this doesn't do the trick for me. Instead it shows me the beginning of the file (line 1).Instructor wrote:"Next variant"martz wrote:b) As a workaround, enable a "page break". That is, after reaching the bottom of the screen, the script would always empty the screen and I could start typing from the top line of the window again.Add new shortcut in Hotkeys plugin:
Name: EnterNoscroll
Command: Call("Scroll::Settings", 5)
Hotkey: Enter or Ctrl+Enter
P.S. of course Scroll plugin must be installed.