Releases: hymkor/expect
Releases · hymkor/expect
v0.11.0
- (#35) Add the new function:
sendvkey(VIRTUAL_KEYCODE)
. (Thanks to @chrisdonlan)- It sends a virtual key code
- Fix the Go language version used for building to 1.20.14 for Windows 7,8,Server2008, and 2012R1/R2
Example for sendvkey
local pid = spawn("cmd.exe")
if not pid then
os.exit(1)
end
send("rem exit")
sleep(1)
sendvkey(0x24) -- HOME
sendvkey(0x2E) -- DELETE
sendvkey(0x2E) -- DELETE
sendvkey(0x2E) -- DELETE
sendvkey(0x2E) -- DELETE
sendln("")
wait(pid)
v0.10.0
- Add OLE functions.
local OBJ=create_object()
creates OLE-ObjectOBJ:method(...)
calls methodOBJ:_get("PROPERTY")
returns the value of the property.OBJ:_set("PROPERTY",value)
sets the value to the property.OBJ:_iter()
returns an enumerator of the collection.OBJ:_release()
releases the COM-instance.local N=to_ole_integer(10)
creates the integer value for OLE.
v0.9.0
- Add the new global variable:
capturelines
(default:2)- It can specify the number of the captured lines when
expect()
is executed.
- It can specify the number of the captured lines when
- Add the new function:
sleep(SECOND)
,usleep(MICROSECOND)
- 新グローバル変数:
capturelines
を追加(デフォルトは2)expect()
が実行されたときにキャプチャーする行数を指定します。
- 新関数
sleep(秒)
とusleep(マイクロ秒)
を追加
v0.8.0
v0.7.1
v0.7.0
- Use the default-background-color
ESC[49m
instead of blackESC[40m
- Failed to call console-api, show API-name as error
- Add
-nologo
option - expect(): when the console of STDOUT can not be read, try STDERR.
- (#30) expect(): Set matching information into the global variables:
_MATCHPOSITION
,_MATCHLINE
,_MATCH
,_PREMATCH
, and_POSTMATCH
. (Thanks to @rdrdrdrd95 )
- 黒の
ESC[40m
のかわりに、デフォルトの背景色ESC[49m
を使うようにした - コンソールのAPIの呼び出しに失敗した時、APIの名前をエラーに出すようにした。
-nologo
オプションを追加- expect関数は STDOUT のコンソールが使えなかった時に、STDERR の方を試すようにした。
- (#30) expect 関数は、マッチした情報をグローバル変数の
_MATCHPOSITION
,_MATCHLINE
,_MATCH
,_PREMATCH
,_POSTMATCH
.にセットするようにした。
v0.6.2
v0.6.1
- For #23, fix that when a script did not end with CRLF, the last line was ignored. ( Thanks to @wolf-li )
- Include the source code of go-console in the package.
- readme.md and go.mod: change the URLs (Change username: zetamatta to hymkor)
- Fix warning for golint that the function does not have the header comments.
- (#23) スクリプトが CRLF で終わっていない時、最終行が無視されていたのを修正
- go-console のソースコードも本パッケージに含めるようにした。
- readme.md と go.mod で URL を変更した(ユーザ名 zetamatta を hymkor へ変更)
- golint の警告に対応(関数がヘッダコメントがない)
v0.6.0
v0.5.0 (20210429)
- Implement Lua function: spawnctx()
- The new function
spawnctx
is the similar one withspawn
, but the process started by spawnctx is killed when Ctrl-C is pressed.
- The new function
- Lua関数 spawnctx を実装
- 新関数の
spawnctx
はspawn
と似ているが、起動されたプロセスは Ctrl-C が押された時に自動的に kill される
- 新関数の