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 

[Request] KeyBar.dll

 
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English)
View previous topic :: View next topic  
Author Message
Soso



Joined: 18 Oct 2015
Posts: 8

PostPosted: Tue Oct 20, 2015 7:56 am    Post subject: [Request] KeyBar.dll Reply with quote

 
 
     
 
 
Back to top
View user's profile Send private message
Skif_off



Joined: 20 Oct 2013
Posts: 942

PostPosted: Tue Oct 20, 2015 9:18 am    Post subject: Reply with quote

Soso
See plugin ContextMenu & ContextMenu-Eng.txt:
Code:
Insert("text"[, Esc-sequences])
  "text"
    Inserted text.
  Esc-sequences:
    0  "text" isn't contain Esc-sequences (default).
    1  "text" contain Esc-sequences. A set of sequences similar to the find/replace dialog in the program, and also:
       "\s" - replaced by the selected text of the editing window;
       "\|" - set the caret position after text insertion.
  Insert("Some string")
    method replaces selection with the specified text.
  Insert("<B>\s</B>", 1)
    method enclose selection.
  Insert("\[0031 0032 0033]", 1)
    method replaces selection with "123"

You can use Insert() with menu, toolbar or hotkey.

For example (my menu and quotes also on toolbar) >>

Code:
 {
  "#cs...#ce (комм. AutoIt)" Insert("#cs\n\s\n#ce", 1)
  "#Region ;...#EndRegion ; (AutoIt)" Insert("#Region ;\n\s\n#EndRegion ;", 1)
  "/*...*/" Insert("/*\s*/", 1)
  SEPARATOR
  `"..."` Insert(`"\s"`, 1)
  "«...»" Insert("«\s»", 1)
  "„...“ (нем.)" Insert("„\s”", 1)
  "“...” (англ.)" Insert('“\s”', 1)
  "<<...>>" Insert("<<\s>>", 1)
  SEPARATOR
  "$[...]" Insert("$[\s]", 1)
  "${...}" Insert("${\s}", 1)
  "%...%" Insert(`%%\s%%`, 1)
  "!...!" Insert(`!\s!`, 1)
  "[...]" Insert("[\s]", 1)
  "{...}" Insert("{\s}", 1)
  "(...)" Insert("(\s)", 1)
  "[...]...[...]" Insert("[...]\s[...]", 1)
 }

 {
  "—   длинное тире" Insert("\[2014]", 1)
  "–   короткое тире" Insert("–")
  "±   плюс минус" Insert("±")
  "«   левая кавычка (фр.)" Insert("«")
  "»   правая кавычка (фр.)" Insert("»")
  "„   левая кавычка (нем.)" Insert("„")
  "“   левая кавычка (англ.)" Insert("“")
  "“   правая кавычка (нем.)" Insert("“")
  "”   правая кавычка (англ.)" Insert("”")
  "   неразрывный пробел" Insert(" ")
  "¬   перенос" Insert("¬")
  "…   многоточие" Insert("…")
  "§   параграф" Insert("§")
  "©   copyright" Insert("©")
  "®   репродукция" Insert("®")
  "™   товарный знак" Insert("™")
  "•   точка бройлерная" Insert("•")
  "°   градус" Insert("°")
  "́   знак ударения U+0301" Insert("\[0301]", 1)
 }
(you should to find or draw own icons for toolbar).
Or if you know hex-code: InsertUnicodeChar.js
Back to top
View user's profile Send private message
FeyFre



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

PostPosted: Tue Oct 20, 2015 9:41 am    Post subject: Reply with quote

Skif_off
Ты не понял. Человек хочет чтобы эти кнопки автоматически туда добавлялись по мере необходимости. Выделил он символ какой, нажал магическую комбинацию клавиш - этот символ тут же появился на тулбаре.
Я не знаю, вроде не существует АПИ тулбара для модификации тулбаров, но это меньшая проблема. Большая: на ходу генерировать картинки с символом для отображения иконки.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Soso



Joined: 18 Oct 2015
Posts: 8

PostPosted: Tue Oct 20, 2015 12:58 pm    Post subject: Reply with quote

Idea is:

some simple way to insert "exotic" (we don't have them on the physical keyboard) characters in text.

The only way that I know so far (except external applications) is InsertUnicodeChar.js by @Skif_off, but it isn't so convenient and easy.

Maybe there's some other script that can make (with editing script or *.INI) something like this?

 
 
     
 
 
Back to top
View user's profile Send private message
Skif_off



Joined: 20 Oct 2013
Posts: 942

PostPosted: Tue Oct 20, 2015 2:11 pm    Post subject: Reply with quote

FeyFre
Хм, возможно, не так. С панелью инструментов - вряд ли, но вроде скриптом можно добавлять пункт меню, где-то шла речь, тогда можно делать как на последнем скриншоте Soso или в моих примерах - меню без иконок. Подождём KDJ, Instructor или VladSh, не помню, кто обсуждал.
Мне удобнее сразу собрать часто используемые в меню и добавлять, если необходимо.
Back to top
View user's profile Send private message
Soso



Joined: 18 Oct 2015
Posts: 8

PostPosted: Tue Oct 20, 2015 2:38 pm    Post subject: Reply with quote

^

It is possible to make copy of original ToolBar.dll, rename it and put it back in Plugs folder.
Thus could be turned on or off, regardless of the original dll.
This new "KeyBar" (ToolBar2.dll) could displays buttons as shown in the first post, with the corresponding functions, but that would mean drawing a million of icons.


Soso wrote:
some simple way to insert "exotic" (we don't have them on the physical keyboard) characters in text.


... and not only characters, but for example the entire words:

 
 
     
 
 
... so someone, who does not have appropriate keyboard, can insert russian or polish word Thank you for use in this forum, for example.

That can be a very simple script that would read INI file, displaying each line from the INI in the menu and from there insert into the text.


Idea about DLL in first post is too complicated, so what do you think about one simple script for AkelPad users?

:)
Back to top
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 6127

PostPosted: Tue Oct 20, 2015 3:32 pm    Post subject: Reply with quote

Soso
You were already directed by Skif_off to ContextMenu documentation. Simply write in menu code:
Code:
"Спасибо" Insert("Спасибо")
"Dziękuję" Insert("Dziękuję")
Insert method also allows you insert characters by its unicode hex values.
Back to top
View user's profile Send private message Send e-mail
Soso



Joined: 18 Oct 2015
Posts: 8

PostPosted: Tue Oct 20, 2015 4:15 pm    Post subject: Reply with quote

Huh, I understand it now.
Everything is working.

Tnx to all.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English) All times are GMT
Page 1 of 1

 
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