Page 30 of 49
Posted: Sat Sep 10, 2011 12:38 pm
by Andrey_A_A
Lenchik, попробуй вписать вместо hFont числа , пример
Code: Select all
AkelPad.SendMessage(hCtrlWnd, 48 /*WM_SETFONT*/, "-418749268", true)
Arial 14 "-418749268"
Arial 12 "-871756172"
Tahoma 14 "671774494"
Tahoma 12 "1628076145"
=========
у меня Виста 32 - всё работает
Posted: Sat Sep 10, 2011 12:51 pm
by KDJ
Lenchik wrote:Если шрифт подгружается автономно, через плагин Font, то этот скрипт не работает?
On WinXP works properly.
In AkelPad, you must have at least one file open.
Because the script retrieves the font from AkelPad edit window.
Posted: Sat Sep 10, 2011 1:49 pm
by Instructor
KDJ
Code: Select all
var hFont=AkelPad.SendMessage(hMainWnd, 1233 /*AKD_GETFONTW*/, 0, 0);
Posted: Sat Sep 10, 2011 3:51 pm
by Lenchik
Instructor wrote:Code: Select all
var hFont=AkelPad.SendMessage(hMainWnd, 1233 /*AKD_GETFONTW*/, 0, 0);
Выдаёт ошибку, дескать hMainWnd не назначен.
У меня заработало. Оказывается нельзя закрывать окошко плагина ContextMenu. Жаль, что бесполезно назначать горячую клавишу для скрипта. И в ToolBar хотелось бы то же.
Instructor, может быть возможно добавить в формы ContextMenu и ToolBar кнопочки, по нажатию которых брались бы настройки шрифта Акельпада (те, которые по command(4201))?
Posted: Sat Sep 10, 2011 4:14 pm
by KDJ
Instructor
Thank you for the hint.
Please tell me, what is the difference between AKD_GETFONT and AKD_GETFONTW.
Posted: Sat Sep 10, 2011 4:25 pm
by KDJ
Lenchik wrote:Выдаёт ошибку, дескать hMainWnd не назначен.
Replace hMainWnd on AkelPad.GetMainWnd().
Code: Select all
var hFont = AkelPad.SendMessage(AkelPad.GetMainWnd(), 1233 /*AKD_GETFONTW*/, 0, 0);
Posted: Sat Sep 10, 2011 4:40 pm
by Lenchik
Script called from opened tab in MDI mode shows Contextmenu window without any changes. Called next without closing Contextmenu window change font as supposed.
Похоже не получает изменения вызванное окошко под Win 7 x64 (Akelpad x86).
Posted: Sat Sep 10, 2011 4:59 pm
by KDJ
Lenchik
Try lengthening the waiting time.
In the script replace:
WScript.Sleep(20);
with
WScript.Sleep(100);
Posted: Sat Sep 10, 2011 5:13 pm
by Lenchik
Great! It works now!

Posted: Wed Sep 14, 2011 8:28 pm
by KDJ
KDJ wrote:Instructor
Thank you for the hint.
Please tell me, what is the difference between AKD_GETFONT and AKD_GETFONTW.
Do I well understand, that can use AKD_GETFONT instead AKD_GETFONTA and AKD_GETFONTW.
Posted: Wed Sep 14, 2011 8:46 pm
by FeyFre
KDJ
AKD_GETFONT is equal to AKD_GETFONTW on Windows NT derivatives(2000,XP,2003,Vista,7,8 in Unicode systems), and is equal to AKD_GETFONTA on Windows98.
Posted: Wed Sep 14, 2011 9:01 pm
by KDJ
FeyFre
So AKD_GETFONT may be apply universally.
Posted: Mon Sep 19, 2011 6:55 pm
by KDJ
In the file ContextMenu-Eng.txt I found Russian words (line 209):
Icon(["файл"], [индекс])
Posted: Tue Sep 20, 2011 3:00 am
by Instructor
KDJ
Corrected.
Posted: Tue Sep 20, 2011 7:22 am
by San_dr
Подскажите, в чем проблема:
У меня при Автообновлении не обновляются ContextMenu и TulBar пишет "Ошибок: 2"

(7. Использую свой шрифт)
--------------------------------------------------
В ХР нормально обновляет