Scripts plugin
- Author
- Message
-
Offline
- Site Admin
- Posts: 6311
- Joined: Thu Jul 06, 2006 7:20 am
Изменено: для методов AkelPad.Call*, если был вызван скрипт, возвращается результат AkelPad.ScriptExitCode.
Changed: for AkelPad.Call* methods, if script was called, then result of AkelPad.ScriptExitCode returns.
Scripts plugin v18.6
Changed: for AkelPad.Call* methods, if script was called, then result of AkelPad.ScriptExitCode returns.
Scripts plugin v18.6
-
Offline
- Posts: 142
- Joined: Fri Aug 15, 2008 8:58 am
SetClipboardText not respect carriage return
When i use SetClipboardText to copy a text block that have carriage returns and past in other tab it work.
But if i paste it to other software, f.e. notepad.exe, it remove all carriage return.
I think that this happens because SetClipboardText does not take into consideration the set carriage return (unix, window, mac).
Not problem if use copy to clipboard from contextual menu.
Do it is possible to fix it?
my workaround use
var clp=AkelPad.GetSelText().replace(/[\r\n]/g, "\r\n");
before of
AkelPad.SetClipboardText(clp);
But if i paste it to other software, f.e. notepad.exe, it remove all carriage return.
I think that this happens because SetClipboardText does not take into consideration the set carriage return (unix, window, mac).
Not problem if use copy to clipboard from contextual menu.
Do it is possible to fix it?
my workaround use
var clp=AkelPad.GetSelText().replace(/[\r\n]/g, "\r\n");
before of
AkelPad.SetClipboardText(clp);
-
Offline
- Posts: 1250
- Joined: Thu Nov 16, 2006 11:53 am
- Location: Kyiv, Ukraine
Re: SetClipboardText not respect carriage return
This is a good solution. Many editors do support different line ending characters (unlike the standard Notepad), so in general it's OK to set the clipboard text as is.Diamen wrote:var clp=AkelPad.GetSelText().replace(/[\r\n]/g, "\r\n");
However, an optional parameter nNewLine for SetClipboardText (similar to the one in GetSelText and GetTextRange) would indeed make sense.
-
Offline
- Site Admin
- Posts: 6311
- Joined: Thu Jul 06, 2006 7:20 am
Diamen
Now only as script:
Update:
With test version you can copy, cut, paste with specified new line. See documentation.
Now only as script:
Update:
With test version you can copy, cut, paste with specified new line. See documentation.
-
Offline
- Posts: 874
- Joined: Sat Jan 16, 2010 2:03 pm
Diamen
See "\AkelFiles\Docs\ToolBar-Eng.txt" Lines 122-133
how to enable it also without selection?
Code: Select all
-"" Command(4154,10) Icon(8)
...at presence of a minus sign the button status will not change somehow (become inactive, be pressed)...
-
Offline
- Posts: 3217
- Joined: Wed Nov 29, 2006 1:19 pm
- Location: Киев, Русь
- Contact: