2012-02-01から1ヶ月間の記事一覧
WScript.Echo(1 + "2"); WScript.Echo(1 + "2" + 1); WScript.Echo(true + "1"); WScript.Echo(false + "1"); WScript.Echo(true + 1); WScript.Echo(false + 1);
var x; WScript.Echo(1 == 1); // -1 WScript.Echo(x + 2 == x); // 0 WScript.Echo(x * 2 == x); // 0 WScript.Echo(x == null); // -1 WScript.Echo(0 == null); // 0
var x; WScript.Echo(x + 1); WScript.Echo(x * 1);
foo = "foo"; FOO = "FOO"; WScript.Echo(foo); WScript.Echo(FOO);
var x; var x; var x, y, z; var x = 0, y = 1, z;
WScript.Echo(1+2*3); WScript.Echo("a" + "b"); WScript.Echo(1 + "1"); 数値は文字に変換されるんだっけ???
WScript.Echo(1.2); WScript.Echo("Hello!"); WScript.Echo(false); WScript.Echo(null); WScript.Echo({x:1, y:2}); WScript.Echo([1,2,3]);
function foo() { x = "FOO"; WScript.Echo(x); } x = "foo"; foo(); WScript.Echo(x); では二度とも「FOO」 function foo() { var x = "FOO"; WScript.Echo(x); } x = "foo"; foo(); WScript.Echo(x); と var をつけてあげると、最初は「FOO」。二度目は「f…
x = "foo"; { x = "FOO"; WScript.Echo(x); } WScript.Echo(x); 別にスコープができるわけでもなさそう
x = "foo"; var y = Date(); var z; z = "bar"; WScript.Echo(x); WScript.Echo(y); WScript.Echo(z);
http://msdn.microsoft.com/ja-jp/library/cc427807.aspx を見ていく WScript.Echo("Hello!");
Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("foo.txt", ForWriting, True) f.WriteLine "Hello world!" f.WriteLine "HELLO WORLD!" Set f = fso.OpenTextFil…
Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("foo.txt", ForWriting, True) f.WriteLine "Hello world!" f.WriteLine "HELLO WORLD!" Set f = fso.OpenTextFil…
Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("foo.txt", ForWriting, True) f.WriteLine "Hello world!" Set f = fso.OpenTextFile("foo.txt", ForReading) Do…
Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("foo.txt", ForWriting, True) f.WriteLine "Hello world!" f.WriteLine "HELLO WORLD!" Set f = fso.OpenTextFil…
Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("foo.txt", ForWriting, True) f.WriteLine "Hello world!" f.WriteLine "HELLO WORLD!" Set f = fso.OpenTextFil…
まんま Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("foo.txt", ForWriting, True) f.WriteBlankLines(2) f.Write "Hello world!" Set f = fso.OpenTextFile("…
まんま Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("foo.txt", ForWriting, True) f.Write "Hello world!" & vbCrLf f.Write "HELLO WORLD!" Set f = fso.Ope…
まんま Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("foo.txt", ForWriting, True) f.WriteLine "Hello world!" f.WriteLine "HELLO WORLD!" Set f = fso.Open…
まんま Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("foo.txt", ForWriting, True) f.Write "Hello world!" Set f = fso.OpenTextFile("foo.txt", ForReading)…
まんま Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("foo.txt", ForWriting, True) f.WriteLine "Hello world!" f.WriteLine "HELLO WORLD!" Set f = fso.Open…
まんま Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("foo.txt", ForWriting, True) f.Write "Hello world!" Set f = fso.OpenTextFile("foo.txt", ForReading)…
まんま Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("foo.txt", ForWriting, True) f.Write "Hello world!" Set f = fso.OpenTextFile("foo.txt", ForReading)…
Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.CreateTextFile("foo.txt") f.Close f.Close Close したものを再度 Close してもエラー発生しない???
Set fso = CreateObject("Scripting.FileSystemObject") For Each d in fso.Drives WScript.Echo d Next
Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("foo.txt", ForWriting, True) f.WriteLine("Hello!") f.Close CreateTextFile とはどう違う?どう使い分ける?
Set fso = CreateObject("Scripting.FileSystemObject") fso.CreateFolder("foo") fso.MoveFolder "foo", "c:\"
Set fso = CreateObject("Scripting.FileSystemObject") WScript.Echo fso.MoveFile("foo", "bar") 'fso.MoveFile "bar", "foo" 「fso.MoveFile("foo", "bar")」はダメでも、「WScript.Echo fso.MoveFile("foo", "bar")」は良いのか〜
Set fso = CreateObject("Scripting.FileSystemObject") WScript.Echo fso.GetTempName WScript.Echo fso.GetTempName WScript.Echo fso.GetTempName 存在するファイル名を返しちゃったりしないのかな?