[Request] KeyBar.dll

English main discussion
Post Reply
  • Author
  • Message
Offline
Posts: 8
Joined: Sun Oct 18, 2015 10:50 am

[Request] KeyBar.dll

Post by Soso »

 
 
     Image
 
 

Offline
Posts: 1161
Joined: Sun Oct 20, 2013 11:44 am

Post by Skif_off »

Soso
See plugin ContextMenu & ContextMenu-Eng.txt:

Code: Select all

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.

Code: Select all

 {
  "#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

Offline
Posts: 2247
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

Skif_off
Ты не понял. Человек хочет чтобы эти кнопки автоматически туда добавлялись по мере необходимости. Выделил он символ какой, нажал магическую комбинацию клавиш - этот символ тут же появился на тулбаре.
Я не знаю, вроде не существует АПИ тулбара для модификации тулбаров, но это меньшая проблема. Большая: на ходу генерировать картинки с символом для отображения иконки.

Offline
Posts: 8
Joined: Sun Oct 18, 2015 10:50 am

Post by Soso »

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?

 
 
     Image
 
 

Offline
Posts: 1161
Joined: Sun Oct 20, 2013 11:44 am

Post by Skif_off »

FeyFre
Хм, возможно, не так. С панелью инструментов - вряд ли, но вроде скриптом можно добавлять пункт меню, где-то шла речь, тогда можно делать как на последнем скриншоте Soso или в моих примерах - меню без иконок. Подождём KDJ, Instructor или VladSh, не помню, кто обсуждал.
Мне удобнее сразу собрать часто используемые в меню и добавлять, если необходимо.

Offline
Posts: 8
Joined: Sun Oct 18, 2015 10:50 am

Post by Soso »

^

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:

 
 
     Image
 
 
... 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?

:)

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

Soso
You were already directed by Skif_off to ContextMenu documentation. Simply write in menu code:

Code: Select all

"Спасибо" Insert("Спасибо")
"Dziękuję" Insert("Dziękuję")
Insert method also allows you insert characters by its unicode hex values.

Offline
Posts: 8
Joined: Sun Oct 18, 2015 10:50 am

Post by Soso »

Huh, I understand it now.
Everything is working.

Tnx to all.
Post Reply