・VBS

【VBS】便利ツール

strSendKey = "{NUMLOCK}" intSleepTime = 290000 strQuery = "Select * FROM Win32_Process WHERE (Caption = 'wscript.exe' OR Caption = 'cscript.exe') AND " _ & " CommandLine LIKE '%" & WScript.ScriptName & "%'" Set Locator = CreateObject("Wbem…

【VBS】応用

名称取得 ファイルを実行 スリープ エクセル操作 名称取得 コマンド 内容 実行例 WScript.ScriptName ファイル名 sample.vbs WScript.ScriptFullName フルパス C:\Desktop\sample.vbs ファイルを実行 バッチファイルや、exeファイル等のプラグラム Dim objWS…

【VBS】基本

変数 配列 IF While For 変数 型は指定不可 Dim sample Dim A,B 配列 Dim sample(1) sample(0) = 0 sample(1) = 2 sample= Array(0, 2) IF If sample = "A" Then MsgBox "A" ElseIf sample = "B" Then MsgBox "B" Else MsgBox "C" End If While while:条件…