1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AutoHotKeyで、コマンドライン引数を取得するサンプル

Posted at
  • %0% が、コマンドライン引数の数、
  • %1%%2% ... が、各コマンドライン引数の値
SampleCommandLineArgs.ahk
; コマンドライン引数を取得するサンプル
ArgCount=%0%
if(ArgCount==0)
{
  MsgBox [使用法] %a_scriptname% [files..]
  ExitApp
}

Loop, %ArgCount%
{
  Arg := %a_index%
  MsgBox % Arg
}
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?