| View previous topic :: View next topic |
| Author |
Message |
Andrey_A_A
Joined: 03 Jun 2010 Posts: 477 Location: Сочи, Хоста
|
Posted: Sat Sep 10, 2011 12:38 pm Post subject: |
|
|
Lenchik, попробуй вписать вместо hFont числа , пример
| Code: | | AkelPad.SendMessage(hCtrlWnd, 48 /*WM_SETFONT*/, "-418749268", true) |
Arial 14 "-418749268"
Arial 12 "-871756172"
Tahoma 14 "671774494"
Tahoma 12 "1628076145"
=========
у меня Виста 32 - всё работает |
|
| Back to top |
|
 |
KDJ
Joined: 06 Mar 2010 Posts: 1067 Location: Poland
|
Posted: Sat Sep 10, 2011 12:51 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
Instructor Site Admin
Joined: 06 Jul 2006 Posts: 4640
|
Posted: Sat Sep 10, 2011 1:49 pm Post subject: |
|
|
KDJ
| Code: | | var hFont=AkelPad.SendMessage(hMainWnd, 1233 /*AKD_GETFONTW*/, 0, 0); |
|
|
| Back to top |
|
 |
Lenchik
Joined: 10 Jan 2011 Posts: 151
|
Posted: Sat Sep 10, 2011 3:51 pm Post subject: |
|
|
| Instructor wrote: | | Code: | | var hFont=AkelPad.SendMessage(hMainWnd, 1233 /*AKD_GETFONTW*/, 0, 0); |
|
Выдаёт ошибку, дескать hMainWnd не назначен.
У меня заработало. Оказывается нельзя закрывать окошко плагина ContextMenu. Жаль, что бесполезно назначать горячую клавишу для скрипта. И в ToolBar хотелось бы то же.
Instructor, может быть возможно добавить в формы ContextMenu и ToolBar кнопочки, по нажатию которых брались бы настройки шрифта Акельпада (те, которые по command(4201))? |
|
| Back to top |
|
 |
KDJ
Joined: 06 Mar 2010 Posts: 1067 Location: Poland
|
Posted: Sat Sep 10, 2011 4:14 pm Post subject: |
|
|
Instructor
Thank you for the hint.
Please tell me, what is the difference between AKD_GETFONT and AKD_GETFONTW. |
|
| Back to top |
|
 |
KDJ
Joined: 06 Mar 2010 Posts: 1067 Location: Poland
|
Posted: Sat Sep 10, 2011 4:25 pm Post subject: |
|
|
| Lenchik wrote: | | Выдаёт ошибку, дескать hMainWnd не назначен. |
Replace hMainWnd on AkelPad.GetMainWnd().
| Code: | | var hFont = AkelPad.SendMessage(AkelPad.GetMainWnd(), 1233 /*AKD_GETFONTW*/, 0, 0); |
|
|
| Back to top |
|
 |
Lenchik
Joined: 10 Jan 2011 Posts: 151
|
Posted: Sat Sep 10, 2011 4:40 pm Post subject: |
|
|
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). |
|
| Back to top |
|
 |
KDJ
Joined: 06 Mar 2010 Posts: 1067 Location: Poland
|
Posted: Sat Sep 10, 2011 4:59 pm Post subject: |
|
|
Lenchik
Try lengthening the waiting time.
In the script replace:
WScript.Sleep(20);
with
WScript.Sleep(100); |
|
| Back to top |
|
 |
Lenchik
Joined: 10 Jan 2011 Posts: 151
|
Posted: Sat Sep 10, 2011 5:13 pm Post subject: |
|
|
Great! It works now!  |
|
| Back to top |
|
 |
KDJ
Joined: 06 Mar 2010 Posts: 1067 Location: Poland
|
Posted: Wed Sep 14, 2011 8:28 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
FeyFre
Joined: 07 Aug 2007 Posts: 1888 Location: Vinnitsa, Ukraine
|
Posted: Wed Sep 14, 2011 8:46 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
KDJ
Joined: 06 Mar 2010 Posts: 1067 Location: Poland
|
Posted: Wed Sep 14, 2011 9:01 pm Post subject: |
|
|
FeyFre
So AKD_GETFONT may be apply universally. |
|
| Back to top |
|
 |
KDJ
Joined: 06 Mar 2010 Posts: 1067 Location: Poland
|
Posted: Mon Sep 19, 2011 6:55 pm Post subject: |
|
|
In the file ContextMenu-Eng.txt I found Russian words (line 209):
Icon(["файл"], [индекс]) |
|
| Back to top |
|
 |
Instructor Site Admin
Joined: 06 Jul 2006 Posts: 4640
|
Posted: Tue Sep 20, 2011 3:00 am Post subject: |
|
|
KDJ
Corrected. |
|
| Back to top |
|
 |
San_dr
Joined: 06 Dec 2010 Posts: 109 Location: г.Харьков, Русь
|
Posted: Tue Sep 20, 2011 7:22 am Post subject: |
|
|
Подскажите, в чем проблема:
У меня при Автообновлении не обновляются ContextMenu и TulBar пишет "Ошибок: 2"
(7. Использую свой шрифт)
--------------------------------------------------
В ХР нормально обновляет |
|
| Back to top |
|
 |
|