Page 21 of 97
Posted: Tue Jul 20, 2010 7:10 pm
by KDJ
VladSh wrote:KDJ wrote:Gentlemen, thank you very much for your good ideas. I will try to do it.
It became interesting and I made myself, sorry...
ShiftVerticaly.js
Congratulations, you've done it quickly.
But you need a little bit to improve. The script can add blank lines to the text.
Posted: Tue Jul 20, 2010 7:25 pm
by Infocatcher
VladSh wrote:Ребята и я имели ввиду, что у них нет шаблонов для создания, т.е. template.css и т.п...
А то они у меня есть. Нужно давить тягу к копипасту.
template.html
Хотя это скорее уж template.
xhtml
VladSh wrote:Когда нет папки...
Вроде, создание папок ни разу не рекурсивное, так что там хорошо бы и все предыдущие папки проверять.

Скрипт
обновил.
VladSh wrote:И почему не хотите вызывать менюху при создании?

Ну и что, что 2 раза вылетает, зато не надо реестр дёргать (пингвиноиды спасибо скажут), да и всё же красивше?..

Так ведь можно править существующий шаблон, а можно новый создавать. Хотя можно сначала меню подправить, это да.
Красивше в начале каждого шаблона приводить его «название», а скрипт пусть парсит папку с шаблонами и показывает список.

Posted: Tue Jul 20, 2010 10:41 pm
by KDJ
I corrected scripts LinesMoveDown.js and LinesMoveUp.js.
I used the function setRedraw(hWnd, bRedraw) written by
VladSh.
Scripts now work much faster.
Thank you for your help
VladSh.
viewtopic.php?p=8224&hilit=#p8224
Posted: Wed Jul 21, 2010 7:22 am
by VladSh
KDJ wrote:The script can add blank lines to the text.
Thank you for your observation!

Fixed
KDJ wrote:I used the function setRedraw(hWnd, bRedraw) written by VladSh.
For the sake of fairness: the script was initially written by the
Instructor, then was corrected
Infocatcher. Thank you colleagues!

Posted: Wed Jul 21, 2010 10:11 am
by KDJ
VladSh wrote:KDJ wrote:The script can add blank lines to the text.
Thank you for your observation!

Fixed

Yet something is wrong
When you try move the first row up, or the last line down.
The script inserts the blank lines to the document.
Re: Method AkelPad.GetSelText()
Posted: Wed Jul 21, 2010 12:31 pm
by KDJ
KDJ wrote:I have a question.
What do the different arguments in the method AkelPad.GetSelText()?
What is the difference obtained strings?
GetSelText([nNewLine]);
Arguments
nNewLine (only for AkelPad 4.x.x)
1 //"\r" new line (default).
2 //"\n" new line.
3 //"\r\n" new line.
Return Value
String. Selected text.
I already know!

AkelPad.GetSelText(1) as the end of the line returns the character 0Dh,
AkelPad.GetSelText(2) returns the character 0Ah,
AkelPad.GetSelText(3) returns two characters 0Dh and 0Ah.
Posted: Wed Jul 21, 2010 12:38 pm
by Infocatcher
VladSh wrote:the script was initially written by the Instructor, then was corrected Infocatcher.
There is no correction – just another syntax.

Posted: Wed Jul 21, 2010 5:47 pm
by VladSh
Приколы "нашего городка".
этот код работает (заходит во второе условие, когда bSelEOL = false):
Code: Select all
var bSelEOL = (!AkelPad.IsPluginRunning("SmartSel::NoSelEOL"));
if (!bSelEOL)
{
if (nMaxLine == nLastLine) nEndCorrect += 2;
}
else
{
nEndCorrect += 1;
}
этот не работает:
Code: Select all
var bSelEOL = (!AkelPad.IsPluginRunning("SmartSel::NoSelEOL"));
if (!bSelEOL)
if (nMaxLine == nLastLine) nEndCorrect += 2;
else
nEndCorrect += 1;
я в шорохе...
Posted: Wed Jul 21, 2010 6:28 pm
by Infocatcher
VladSh wrote:этот не работает:
Code: Select all
var bSelEOL = (!AkelPad.IsPluginRunning("SmartSel::NoSelEOL"));
if (!bSelEOL)
if (nMaxLine == nLastLine) nEndCorrect += 2;
else
nEndCorrect += 1;
я в шорохе...
=>
Code: Select all
if (!bSelEOL)
if (nMaxLine == nLastLine)
nEndCorrect += 2;
else
nEndCorrect += 1;
После второго if ищет else и находит.
Posted: Wed Jul 21, 2010 6:31 pm
by VladSh
Infocatcher
То тогда совсем не то условие...
А мне надо:
Code: Select all
if (!bSelEOL)
if (nMaxLine == nLastLine)
nEndCorrect += 2;
else
nEndCorrect += 1;
По логике-то оно да... но пока скобки не поставил, не заработало.
Posted: Wed Jul 21, 2010 6:35 pm
by VladSh
KDJ wrote:Yet something is wrong
When you try move the first row up, or the last line down.
The script inserts the blank lines to the document.
Thank you for the localization problem!
Done. But not as we would like ...
Posted: Wed Jul 21, 2010 7:27 pm
by Fr0sT
VladSh
Code: Select all
if (!bSelEOL)
if (nMaxLine == nLastLine)
nEndCorrect += 2;
else;
else
nEndCorrect += 1;
Posted: Wed Jul 21, 2010 7:45 pm
by Infocatcher
Ok, мы тоже умеем:
Code: Select all
if (bSelEOL)
nEndCorrect += 1;
else if (nMaxLine == nLastLine)
nEndCorrect += 2;
И, чтобы жизнь медом не казалась:
Code: Select all
bSelEOL
? (nEndCorrect += 1)
: nMaxLine == nLastLine
? (nEndCorrect += 2)
: void 0;

Posted: Wed Jul 21, 2010 10:53 pm
by KDJ
Script
LinesMoveUpDown.js - moves the selected lines in the up or down.
Two in one.
viewtopic.php?p=8224&hilit=#p8224
Posted: Thu Jul 22, 2010 9:18 am
by se7h
Обновился
LanguageHelp.js (1.4)
Забудьте о старых проблемах, теперь поиск происходит по Указателю CHM и никаких путей, декомпиляций больше делать не придётся, просто скачайте любой CHM хелп и забросьте в нужную папку
Обновились все CHM файлы в сообщении, кому нужно - скачайте заново
Tony
сбылась твоя мечта - полноценный поиск по гигантскому хелпу PHP
