[添付ファイル一覧]
[全ページの添付ファイル一覧]
- CutEx.js
- 格納ファイル名:attach/4D6163726F2FC5EAB9C62F323335_43757445782E6A73
- ページ:Macro/投稿/235
- 格納ファイル名:attach/4D6163726F2FC5EAB9C62F323335_43757445782E6A73
- MD5ハッシュ値:98b92bc69a9d13e43a831573696c4dcd
- サイズ:4.2KB (4309 bytes)
- Content-type:application/octet-stream
- 登録日時:2015/04/28 20:27:36
- アクセス数:270
- MD5ハッシュ値:98b92bc69a9d13e43a831573696c4dcd
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
| |
var bBY_NEWLINE = true;
var bKEEP_CURSOR_POSITION = true;
Main();
function Main()
{
var sCF_LOCAL = "#X-Macro_CopyCutEx#"; var nInsMode;
var nOpt;
var s;
var x, y, x2;
if( (!bBY_NEWLINE) || (Editor.GetSelectedString(0) != "") ){
Editor.Cut(); return;
}
switch( Editor.ExpandParameter("${R?0$:1$:2}")-0 ){
case 0: return;
case 1: nInsMode = Editor.IsInsMode();
Editor.ChgmodINS();
if( nInsMode == Editor.IsInsMode() ) return; Editor.ChgmodINS();
break;
case 2: default:
break;
}
Editor.SetClipboardByFormat( "test", sCF_LOCAL, 0, -1 ); Editor.Copy(); if( Editor.IsIncludeClipboardFormat( sCF_LOCAL ) ) return;
nOpt = (Editor.IsIncludeClipboardFormat( "MSDEVLineSelect" )) ? 0x02 : 0x00; s = Editor.GetLineStr( 0 );
if( s == "" ) return; Editor.SetClipboard( nOpt, s );
x = Editor.ExpandParameter("$x") -0; y = Editor.ExpandParameter("$y") -0;
Editor.SetDrawSwitch( 0 );
Editor.AddRefUndoBuffer(); Editor.AppendUndoBufferCursor();
if( bKEEP_CURSOR_POSITION ){
if( y < Editor.GetLineCount(0) ){
while( (Editor.ExpandParameter("$y") -0) == y ) Editor.Down();
x2 = Editor.ExpandParameter("$x") -0;
}else{
x2 = 1; }
Editor.MoveCursor( y, x, 0 );
}
Editor.SelectLine(0);
@if( 0 )
Editor.Delete();
@else
Editor.InsText(""); @end
if( bKEEP_CURSOR_POSITION ){
Editor.MoveCursor( y, x2, 0 );
Editor.AppendUndoBufferCursor();
}
Editor.SetUndoBuffer(); Editor.SetDrawSwitch( 1 );
Editor.ReDraw();
}
|