LoginSignup
0
0

More than 5 years have passed since last update.

UWSCで指定したプログラムに文字列を送信する

Posted at

■ cygwinを起動して、コマンド文字列を送信する

Const CYGWIN_PATH = "C:\gnupack_devel-13.05-2015.07.19\startup_cygwin.exe"
Const DIRECTORY_PATH = "mkdir -p c:/work/tmp_$(date +%Y%m%d)"

// 起動する
exec(CYGWIN_PATH)
cygwinId = getid(GET_ACTIVE_WIN)

// 起動判定
if cygwinId < 0 then
exit
endif

// コマンド文字列を送信
sendstr(cygwinId, DIRECTORY_PATH)
// 実行
kbd(VK_RETURN,CLICK,100)

// 閉じる
ctrlwin(cygwinId, CLOSE2)
0
0
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
0
0