У меня переход происходит.VladSh wrote:Если справка уже открыта и выделить другое слово и вызвать её снова, то перехода к этому слову не происходит; можете это поправить?
Scripts discussion (1)
- Author
- Message
-
Offline
- Posts: 3234
- Joined: Wed Nov 29, 2006 1:19 pm
- Location: Киев, Русь
- Contact:
-
Offline
- Posts: 3234
- Joined: Wed Nov 29, 2006 1:19 pm
- Location: Киев, Русь
- Contact:
Скрипт работает точно также, несмотря на структуру try-catch, - при блокировании Word'ом и попытке переименования выдаётся сообщение об ошибке от Scripts-плагина.Infocatcher wrote:RenameFile_mod.js...
...
P.S. ...
И редактируемый файл может быть заблокирован, так что переименовать его не удастся. Для тестирования можно блокировать, открывая Word'ом.
Last edited by VladSh on Thu Feb 03, 2011 7:45 am, edited 1 time in total.
-
Offline
- Posts: 1873
- Joined: Mon Aug 06, 2007 1:07 pm
- Contact:
Это фича такая:VladSh wrote:Скрипт работает точно также, несмотря на структуру try-catch, - при блокировании Word'ом и попытке переименования выдаётся сообщение об ошибке от Scripts-плагина.Infocatcher wrote:RenameFile_mod.js...
Code: Select all
try {
fso.MoveFile(pFileFullName, pNewFileFullName);
}
catch(e) {
var err = e;
...
}
...
if(err)
throw err;
-
Offline
- Posts: 3234
- Joined: Wed Nov 29, 2006 1:19 pm
- Location: Киев, Русь
- Contact:
А в чём суть этой "фичи", если оно работает точно также, как и без неё, т.е. Script-плагин всё равно выдаёт окно с ошибкой?Infocatcher wrote:Это фича такая
Смысл, по моему, был бы, если бы отловить ошибку с определённым кодом, её обработать и выдать нормальное сообщение пользователю, на русском языке...
-
Offline
- Posts: 1873
- Joined: Mon Aug 06, 2007 1:07 pm
- Contact:
VladSh
Без нее не выполнитсяи далее.

В любом случае основная идея уже реализована в стандартном скрипте.
Но если очень хочется, можно добавить что-нибудь вроде
Без нее не выполнится
Code: Select all
AkelPad.OpenFile(pNewFileFullName, nFlags, nCodePage, nBOM);
Смысл, по моему, был бы, если бы отловить ошибку с определённым кодом, её обработать и выдать нормальное сообщение пользователю, на русском языке...
Все же по-русски.Scripts плагин
---------------------------
Скрипт: ...\AkelFiles\Plugs\Scripts\RenameFile_mod.js
Строка: 52
Символ: 11
Ошибка: Разрешение отклонено
Код: 800A0046
Источник: Ошибка выполнения Microsoft JScript

В любом случае основная идея уже реализована в стандартном скрипте.
Но если очень хочется, можно добавить что-нибудь вроде
Code: Select all
if(0x100000000 + e.number == 0x800a0046)
AkelPad.MessageBox( ... "Недостаточно прав, или файл заблокирован другим приложением" ... );
-
Offline
- Posts: 1873
- Joined: Mon Aug 06, 2007 1:07 pm
- Contact:
converter.js
Added option «Copy the result instead of replace».
Added hotkeys to dialog window:
Ctrl+Z - Undo
Ctrl+Shft+Z - Redo
Ctrl+C, Ctrl+Insert - Copy
Ctrl+V, Shift+Insert - Paste
Added option «Copy the result instead of replace».
Added hotkeys to dialog window:
Ctrl+Z - Undo
Ctrl+Shft+Z - Redo
Ctrl+C, Ctrl+Insert - Copy
Ctrl+V, Shift+Insert - Paste
-
Offline
- Posts: 3234
- Joined: Wed Nov 29, 2006 1:19 pm
- Location: Киев, Русь
- Contact:
Вот это дело! Спасибо!Infocatcher wrote:Code: Select all
if(0x100000000 + e.number == 0x800a0046) AkelPad.MessageBox( ... "Недостаточно прав, или файл заблокирован другим приложением" ... );

-
Offline
- Posts: 1949
- Joined: Sat Mar 06, 2010 7:40 pm
- Location: Poland
Thank you very much.Infocatcher wrote:converter.js
Added option «Copy the result instead of replace».
-
Offline
- Posts: 120
- Joined: Sat Jan 12, 2008 10:16 am
- Location: Shantou, China
KDJ
I use your CSVToColumnText.js to deal with the following example.
the example are seperated by Tab.
And I like to keep all contents both in and out a pair of quotes, even the quotes themselves.
The result I want is:
But now CSVToColumnText.js give a result:
Can you add a option to switch that? I think you can refer to the wizard of MicroSoft Office Excel 2003 to open with a txt file.
I use your CSVToColumnText.js to deal with the following example.
the example are seperated by Tab.
Code: Select all
a b c d e f g
"1"a "2"b "3"c "4"c "5"e "6"f "7"g
1"a" 2"b" 3"c" 4"d" 5"e" 6"f" 7"g"
"1 示例"a "2 示例"b "3 示例"c "4 示例"c "5 示例"e "6 示例"f "7 示例"g
1"a 示例" 2"b 示例" 3"c 示例" 4"d 示例" 5"e 示例" 6"f 示例" 7"g 示例"
"1"示例 a "2"示例 b "3"示例 c "4"示例 c "5"示例 e "6"示例 f "7"示例 g
1 示例"a" 2 示例"b" 3 示例"c" 4 示例"d" 5 示例"e" 6 示例"f" 7 示例"g"
The result I want is:
Code: Select all
|-------|-------|-------|-------|-------|-------|-------|
| a| b| c| d| e| f| g|
|-------|-------|-------|-------|-------|-------|-------|
| "1"a| "2"b| "3"c| "4"c| "5"e| "6"f| "7"g|
|-------|-------|-------|-------|-------|-------|-------|
| 1"a"| 2"b"| 3"c"| 4"d"| 5"e"| 6"f"| 7"g"|
|-------|-------|-------|-------|-------|-------|-------|
|"1 示例"a|"2 示例"b|"3 示例"c|"4 示例"c|"5 示例"e|"6 示例"f|"7 示例"g|
|-------|-------|-------|-------|-------|-------|-------|
|1"a 示例"|2"b 示例"|3"c 示例"|4"d 示例"|5"e 示例"|6"f 示例"|7"g 示例"|
|-------|-------|-------|-------|-------|-------|-------|
|"1"示例 a|"2"示例 b|"3"示例 c|"4"示例 c|"5"示例 e|"6"示例 f|"7"示例 g|
|-------|-------|-------|-------|-------|-------|-------|
|1 示例"a"|2 示例"b"|3 示例"c"|4 示例"d"|5 示例"e"|6 示例"f"|7 示例"g"|
|-------|-------|-------|-------|-------|-------|-------|
Code: Select all
|----|----|----|----|----|----|----|
| a| b| c| d| e| f| g|
|----|----|----|----|----|----|----|
| 1| 2| 3| 4| 5| 6| 7|
|----|----|----|----|----|----|----|
| 1| 2| 3| 4| 5| 6| 7|
|----|----|----|----|----|----|----|
|1 示例|2 示例|3 示例|4 示例|5 示例|6 示例|7 示例|
|----|----|----|----|----|----|----|
| 1| 2| 3| 4| 5| 6| 7|
|----|----|----|----|----|----|----|
| 1| 2| 3| 4| 5| 6| 7|
|----|----|----|----|----|----|----|
|1 示例|2 示例|3 示例|4 示例|5 示例|6 示例|7 示例|
|----|----|----|----|----|----|----|
-
Offline
- Posts: 1949
- Joined: Sat Mar 06, 2010 7:40 pm
- Location: Poland
cnnnc
Your text is not compliant with specifications the csv file.
Read: http://en.wikipedia.org/wiki/Comma-separated_values
Quote:
"Fields with embedded double-quote characters must be enclosed within double-quote characters, and each of the embedded double-quote characters must be represented by a pair of double-quote characters".
So you have to do it like this (csv input text, separator is Tab):
You will receive this output text:
Your text is not compliant with specifications the csv file.
Read: http://en.wikipedia.org/wiki/Comma-separated_values
Quote:
"Fields with embedded double-quote characters must be enclosed within double-quote characters, and each of the embedded double-quote characters must be represented by a pair of double-quote characters".
So you have to do it like this (csv input text, separator is Tab):
Code: Select all
a b c
"""1""a" """2""b" """3""c"
"1""a""" "2""b""" "3""c"""
"""1 示例""a" """2 示例""b" """3 示例""c"
"1""a 示例""" "2""b 示例""" "3""c 示例"""
Code: Select all
| a| b| c|
| "1"a| "2"b| "3"c|
| 1"a"| 2"b"| 3"c"|
|"1 示例"a|"2 示例"b|"3 示例"c|
|1"a 示例"|2"b 示例"|3"c 示例"|
-
Offline
- Posts: 120
- Joined: Sat Jan 12, 2008 10:16 am
- Location: Shantou, China
-
Offline
- Posts: 1949
- Joined: Sat Mar 06, 2010 7:40 pm
- Location: Poland
In LinesSort.js fixed: text selection after redo operation.
-
Offline
- Posts: 1873
- Joined: Mon Aug 06, 2007 1:07 pm
- Contact: