AkelPad Forum Index AkelPad
Support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ContextMenu plugin
Goto page Previous  1, 2, 3 ... 29, 30, 31 ... 41, 42, 43  Next
 
Post new topic   Reply to topic    AkelPad Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
Andrey_A_A



Joined: 03 Jun 2010
Posts: 547
Location: Сочи, Хоста

PostPosted: Sat Sep 10, 2011 12:38 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
KDJ



Joined: 06 Mar 2010
Posts: 1339
Location: Poland

PostPosted: Sat Sep 10, 2011 12:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 5321

PostPosted: Sat Sep 10, 2011 1:49 pm    Post subject: Reply with quote

KDJ
Code:
var hFont=AkelPad.SendMessage(hMainWnd, 1233 /*AKD_GETFONTW*/, 0, 0);
Back to top
View user's profile Send private message Send e-mail
Lenchik



Joined: 10 Jan 2011
Posts: 234

PostPosted: Sat Sep 10, 2011 3:51 pm    Post subject: Reply with quote

Instructor wrote:
Code:
var hFont=AkelPad.SendMessage(hMainWnd, 1233 /*AKD_GETFONTW*/, 0, 0);

Выдаёт ошибку, дескать hMainWnd не назначен.

У меня заработало. Оказывается нельзя закрывать окошко плагина ContextMenu. Жаль, что бесполезно назначать горячую клавишу для скрипта. И в ToolBar хотелось бы то же.

Instructor, может быть возможно добавить в формы ContextMenu и ToolBar кнопочки, по нажатию которых брались бы настройки шрифта Акельпада (те, которые по command(4201))?
Back to top
View user's profile Send private message Visit poster's website
KDJ



Joined: 06 Mar 2010
Posts: 1339
Location: Poland

PostPosted: Sat Sep 10, 2011 4:14 pm    Post subject: Reply with quote

Instructor
Thank you for the hint.
Please tell me, what is the difference between AKD_GETFONT and AKD_GETFONTW.
Back to top
View user's profile Send private message
KDJ



Joined: 06 Mar 2010
Posts: 1339
Location: Poland

PostPosted: Sat Sep 10, 2011 4:25 pm    Post subject: Reply with quote

Lenchik wrote:
Выдаёт ошибку, дескать hMainWnd не назначен.

Replace hMainWnd on AkelPad.GetMainWnd().
Code:
var hFont = AkelPad.SendMessage(AkelPad.GetMainWnd(), 1233 /*AKD_GETFONTW*/, 0, 0);
Back to top
View user's profile Send private message
Lenchik



Joined: 10 Jan 2011
Posts: 234

PostPosted: Sat Sep 10, 2011 4:40 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
KDJ



Joined: 06 Mar 2010
Posts: 1339
Location: Poland

PostPosted: Sat Sep 10, 2011 4:59 pm    Post subject: Reply with quote

Lenchik
Try lengthening the waiting time.
In the script replace:
WScript.Sleep(20);
with
WScript.Sleep(100);
Back to top
View user's profile Send private message
Lenchik



Joined: 10 Jan 2011
Posts: 234

PostPosted: Sat Sep 10, 2011 5:13 pm    Post subject: Reply with quote

Great! It works now! Smile
Back to top
View user's profile Send private message Visit poster's website
KDJ



Joined: 06 Mar 2010
Posts: 1339
Location: Poland

PostPosted: Wed Sep 14, 2011 8:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
FeyFre



Joined: 07 Aug 2007
Posts: 2038
Location: Vinnitsa, Ukraine

PostPosted: Wed Sep 14, 2011 8:46 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
KDJ



Joined: 06 Mar 2010
Posts: 1339
Location: Poland

PostPosted: Wed Sep 14, 2011 9:01 pm    Post subject: Reply with quote

FeyFre
So AKD_GETFONT may be apply universally.
Back to top
View user's profile Send private message
KDJ



Joined: 06 Mar 2010
Posts: 1339
Location: Poland

PostPosted: Mon Sep 19, 2011 6:55 pm    Post subject: Reply with quote

In the file ContextMenu-Eng.txt I found Russian words (line 209):
Icon(["файл"], [индекс])
Back to top
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 5321

PostPosted: Tue Sep 20, 2011 3:00 am    Post subject: Reply with quote

KDJ
Corrected.
Back to top
View user's profile Send private message Send e-mail
San_dr



Joined: 06 Dec 2010
Posts: 150
Location: г.Харьков, Русь

PostPosted: Tue Sep 20, 2011 7:22 am    Post subject: Reply with quote

Подскажите, в чем проблема:
У меня при Автообновлении не обновляются ContextMenu и TulBar пишет "Ошибок: 2"
(7. Использую свой шрифт)
--------------------------------------------------
В ХР нормально обновляет
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AkelPad Forum Index -> Plugins All times are GMT
Goto page Previous  1, 2, 3 ... 29, 30, 31 ... 41, 42, 43  Next
Page 30 of 43

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


SourceForge.net Logo Powered by phpBB © 2001, 2005 phpBB Group