「マクロリファレンス:3:Document オブジェクト」の版間の差分
| (同じ利用者による、間の15版が非表示) | |||
| 7行目: | 7行目: | ||
document.Activate(); | document.Activate(); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== Close メソッド == | == Close メソッド == | ||
| 15行目: | 18行目: | ||
document.Close(); | document.Close(); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== CopyFullName メソッド == | == CopyFullName メソッド == | ||
| 23行目: | 29行目: | ||
document.CopyFullName(); | document.CopyFullName(); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== CopyPath メソッド == | == CopyPath メソッド == | ||
| 31行目: | 40行目: | ||
document.CopyPath(); | document.CopyPath(); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== GetLine メソッド == | == GetLine メソッド == | ||
| 50行目: | 62行目: | ||
|meGetLineWithNewLines||テキストに改行コードを追加します。 | |meGetLineWithNewLines||テキストに改行コードを追加します。 | ||
|} | |} | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== GetLines メソッド == | == GetLines メソッド == | ||
| 65行目: | 80行目: | ||
|meGetLineView||表示座標で指定します。 | |meGetLineView||表示座標で指定します。 | ||
|} | |} | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== Redo メソッド == | == Redo メソッド == | ||
| 73行目: | 91行目: | ||
document.Redo(); | document.Redo(); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== Save メソッド == | == Save メソッド == | ||
| 85行目: | 106行目: | ||
fileName | fileName | ||
:保存するファイル名を指定します。省略すると [名前を付けて保存] ダイアログが表示されます。 | :保存するファイル名を指定します。省略すると [名前を付けて保存] ダイアログが表示されます。 | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== Undo メソッド == | == Undo メソッド == | ||
| 93行目: | 117行目: | ||
document.Undo(); | document.Undo(); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== Write メソッド == | == Write メソッド == | ||
| 105行目: | 132行目: | ||
str | str | ||
:挿入するテキストを指定します。 | :挿入するテキストを指定します。 | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== Writeln メソッド == | == Writeln メソッド == | ||
| 117行目: | 147行目: | ||
str | str | ||
:挿入するテキストを指定します。 | :挿入するテキストを指定します。 | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
= プロパティ = | = プロパティ = | ||
== Encoding プロパティ == | == Encoding プロパティ == | ||
文書の[[マクロリファレンス:3:エンコード定数|エンコード]]を取得または設定します。 | |||
;構文 | ;構文 | ||
| 128行目: | 161行目: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
; | ;バージョン | ||
Mery Ver 2.6.7 以降で使用できます。 | |||
== FullName プロパティ == | == FullName プロパティ == | ||
| 190行目: | 171行目: | ||
var s = document.FullName; | var s = document.FullName; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== HighlightFind プロパティ == | == HighlightFind プロパティ == | ||
| 199行目: | 183行目: | ||
document.HighlightFind = b; | document.HighlightFind = b; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== IndentSize プロパティ == | == IndentSize プロパティ == | ||
| 208行目: | 195行目: | ||
document.IndentSize = i; | document.IndentSize = i; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.8.7 以降で使用できます。 | |||
== IndentStyle プロパティ == | == IndentStyle プロパティ == | ||
| 214行目: | 204行目: | ||
;構文 | ;構文 | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
var | var n = document.IndentStyle; | ||
document.IndentStyle = | document.IndentStyle = n; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| 226行目: | 216行目: | ||
|meIndentStyleSpace||空白インデント | |meIndentStyleSpace||空白インデント | ||
|} | |} | ||
;バージョン | |||
Mery Ver 2.8.7 以降で使用できます。 | |||
== InsertFinalNewLine プロパティ == | == InsertFinalNewLine プロパティ == | ||
| 232行目: | 225行目: | ||
;構文 | ;構文 | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
var | var n = document.InsertFinalNewLine; | ||
document.InsertFinalNewLine = | document.InsertFinalNewLine = n; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;値 | ;値 | ||
{|class="wikitable" | {|class="wikitable" | ||
|meTriBoolFalse|| | |meTriBoolFalse||ファイルの終端の改行を削除します。 | ||
|- | |- | ||
|meTriBoolTrue|| | |meTriBoolTrue||ファイルの終端に改行を追加します。 | ||
|- | |- | ||
|meTriBoolUnknown||未設定 | |meTriBoolUnknown||未設定 | ||
|} | |} | ||
;バージョン | |||
Mery Ver 2.8.7 以降で使用できます。 | |||
== KeepScrollPos プロパティ == | |||
スクロール位置を維持するかどうかを true か false で取得または設定します。 | |||
;構文 | |||
<syntaxhighlight lang="javascript"> | |||
var b = document.KeepScrollPos; | |||
document.KeepScrollPos = b; | |||
</syntaxhighlight> | |||
;バージョン | |||
Mery Ver 3.7.13 以降で使用できます。 | |||
== LineEnding プロパティ == | == LineEnding プロパティ == | ||
| 250行目: | 258行目: | ||
;構文 | ;構文 | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
var | var n = document.LineEnding; | ||
document.LineEnding = | document.LineEnding = n; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| 262行目: | 270行目: | ||
|meLineEndingLF||LF | |meLineEndingLF||LF | ||
|} | |} | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== MaxLineLength プロパティ == | == MaxLineLength プロパティ == | ||
| 271行目: | 282行目: | ||
document.MaxLineLength = i; | document.MaxLineLength = i; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 3.1.0 以降で使用できます。 | |||
== Mode プロパティ == | == Mode プロパティ == | ||
| 280行目: | 294行目: | ||
document.Mode = s; | document.Mode = s; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== Name プロパティ == | == Name プロパティ == | ||
| 288行目: | 305行目: | ||
var s = document.Name; | var s = document.Name; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== Path プロパティ == | == Path プロパティ == | ||
| 296行目: | 316行目: | ||
var s = document.Path; | var s = document.Path; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== ReadOnly プロパティ == | == ReadOnly プロパティ == | ||
| 305行目: | 328行目: | ||
document.ReadOnly = b; | document.ReadOnly = b; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== Saved プロパティ == | == Saved プロパティ == | ||
| 314行目: | 340行目: | ||
document.Saved = b; | document.Saved = b; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== Selection プロパティ == | == Selection プロパティ == | ||
| 320行目: | 349行目: | ||
;構文 | ;構文 | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
var | var obj = document.Selection; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== ScrollX プロパティ == | |||
スクロールバーの水平位置を 1 から始まる数値で取得または設定します。 | |||
;構文 | |||
<syntaxhighlight lang="javascript"> | |||
var x = ScrollX; | |||
ScrollX = x; | |||
</syntaxhighlight> | |||
;バージョン | |||
Mery Ver 3.7.13 以降で使用できます。 | |||
== ScrollY プロパティ == | |||
スクロールバーの垂直位置を 1 から始まる数値で取得または設定します。 | |||
;構文 | |||
<syntaxhighlight lang="javascript"> | |||
var y = ScrollY; | |||
ScrollY = y; | |||
</syntaxhighlight> | |||
;バージョン | |||
Mery Ver 3.7.13 以降で使用できます。 | |||
== Tag プロパティ == | == Tag プロパティ == | ||
| 328行目: | 384行目: | ||
;構文 | ;構文 | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
var | var d = document.Tag; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;例 | ;例 | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
var | // JScript | ||
if (! | var d = document.Tag; | ||
if (!d.exists("key1")) { | |||
d("key1") = "Value1"; | |||
} | |||
alert(d("key1")); | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="javascript"> | |||
// V8 | |||
var d = document.Tag; | |||
if (!d.exists("key1")) { | |||
d["key1"] = "Value1"; | |||
} | } | ||
alert( | alert(d["key1"]); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 3.0.0 以降で使用できます。 | |||
== Text プロパティ == | == Text プロパティ == | ||
| 348行目: | 417行目: | ||
document.Text = s; | document.Text = s; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.6.7 以降で使用できます。 | |||
== TextLength プロパティ == | == TextLength プロパティ == | ||
| 356行目: | 428行目: | ||
var i = document.TextLength; | var i = document.TextLength; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 3.0.1 以降で使用できます。 | |||
== TrimTrailingWhiteSpace プロパティ == | == TrimTrailingWhiteSpace プロパティ == | ||
| 365行目: | 440行目: | ||
document.TrimTrailingWhiteSpace= b; | document.TrimTrailingWhiteSpace= b; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;バージョン | |||
Mery Ver 2.8.7 以降で使用できます。 | |||
== UserDefinedGuides プロパティ == | |||
ユーザー定義ガイドの位置をカンマ区切りの文字列で取得または設定します。 | |||
;構文 | |||
<syntaxhighlight lang="javascript"> | |||
var s = document.UserDefinedGuides; | |||
document.UserDefinedGuides= s; | |||
</syntaxhighlight> | |||
;バージョン | |||
Mery Ver 3.8.3 以降で使用できます。 | |||
== Vertical プロパティ == | |||
縦書きかどうかを true か false で取得または設定します。 | |||
;構文 | |||
<syntaxhighlight lang="javascript"> | |||
var b = document.Vertical; | |||
document.Vertical = b; | |||
</syntaxhighlight> | |||
;バージョン | |||
Mery Ver 3.6.1 以降で使用できます。 | |||
スポンサーリンク