Scripts discussion (2)

Discuss and announce AkelPad plugins
Locked
  • Author
  • Message
Offline
Posts: 36
Joined: Wed Aug 24, 2011 10:01 am

Post by 230116885 »

opk44
Да, безусловно, Вы правы. Отсутствие свободного времени сказывается...

Пример для однострочного комментария:

Code: Select all

# String
Пример для многострочного комментария:

Code: Select all

# This
# is
# a 
# multi-line
# comment
В Python не заявлены многострочные комментарии, поэтому данный скрипт выручил бы очень.

Тройная кавычка не может быть комментарием, потому что это не комментарий))

Например, тут это не сработает:

Code: Select all

mylist = [\
'раз',
'два',
"""'три',
'четыре',"""
'пять'
]
Infocatcher
Благодарен за оперативность.
ЗЫ: тестовая версия работает.


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

Post by Instructor »

KDJ
AkelPadMethodsView.js maybe try to search selected word (or word under caret) in methods and if found, select it?

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

Instructor
I have done it.

AkelPadMethodsView.js
Now script on start try to find in methods list the text selected in AkelPad edit window.
If found, selects the item containing the text. Otherwise, selects previously selected item.

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

Post by Instructor »

KDJ
Works fine, thanks.

Few users requested to add to find/replace dialog quick access to options from "Advanced" tab:
"Replace all" closes dialog
Check "In selection" if selection not empty
Cycle search

Maybe add them to FindReplaceEx.js script?

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

Instructor
Values of these options, I can retrieve using AKD_GETMAININFO:
AkelPad.SendMessage(hMainWnd, 1222 /*AKD_GETMAININFO*/, 228 /*MI_SEARCHOPTIONS*/, 0);
But I do not know how to change these options in the script?

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

Post by Instructor »

KDJ
Oh, yes no way. I will check it.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

Instructor

It could look like this:
Image

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

AkelPadMethodsView.js

Added:
- find name and find text,
- "Menu" button.
Changed:
- colors in edit control (such as in AkelPad edit window),
- action of Tab key.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

AkelPadMethodsView.js

Added: F1 hotkey for menu.
Fixed: bug in sorting the methods.

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

Post by Instructor »

KDJ
It could look like this:
Maybe add some small "switch" button - to expand dialog like on screenshot?

Test version. See AKD_SETMAININFO.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

Instructor
Thank you very much, it works perfectly.
Test version of the script (FindReplaceEx_test.js) is in KDJ.zip


Image


There is one problem that I can not solve.
If the focus is in one of added controls to dialog box ("More" button or checkboxes), the keyboard does not work.
Please help me.

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

Post by Instructor »

KDJ
Scripts plugin v12.8

Code: Select all

...
  AkelPad.WindowRegisterDialog(hDlg);
  AkelPad.WindowGetMessage();
  AkelPad.WindowUnregisterDialog(hDlg);
...

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

Instructor
Thanks a lot, now is OK.

FindReplaceEx_test.js - test version for AkelPad 4.8.5: KDJ.zip

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

Instructor
About AkelPad 4.8.5 dev.

#1
AKD_SETMAININFO message with the following parameters:
MIS_AKELADMINRESIDENT,
MIS_AKELUPDATEROPTIONS,
MIS_CMDLINEBEGIN,
MIS_CMDLINEEND,
MIS_DATEINSERTFORMAT,
MIS_DATELOGFORMAT,
MIS_PAINTOPTIONS,
MIS_RICHEDITCLASS,
MIS_SHOWMODIFY,
MIS_STATUSPOSTYPE,
MIS_STATUSUSERFORMAT,
MIS_URLCOMMAND,
MIS_WORDBREAKCUSTOM
works, but when you close AkelPad, these parameters are not saved in .ini file.

#2
AkelPad.SendMessage(hMainWnd, 1219 /*AKD_SETMAININFO*/, 157 /*MIS_TABOPTIONSMDI*/, 0x10101 /*TAB_SWITCH_NEXTPREV|TAB_TYPE_STANDARD|TAB_VIEW_NONE*/);
It works, but the effect is only visible after restarting AkelPad.
Locked