Releases: hymkor/expect
Releases · hymkor/expect
v1.0.0
v0.12.1
Update options and usage messages as below (#36)
$ .\expect.exe
Expect-lua v0.12.1-windows-amd64 with go1.20.14
Usage of .\expect.exe:
-D print debug information
-compile executable-name
compile executable with <script>.lua embedded; script is not executed
-e code
execute code
-nocolor
disable color
- Print logo only when no arguments are given, and hide the option
-nologofrom the usage. - Rename
-printembederrorto-Dfor debug-print - Modify the description of the usage of
-compile - Add
-nocoloras boolean option and hide-coloroption from the usage, because-color autowas same as-color alwaysand does not need to be string-option
Thanks to @misha-franz
v0.12.0
- (#36) Add the new option
-compileto embed a script to the executable file (Thanks to @misha-franz)
C:> type embed.lua
print("embed sample !")
C:> expect.exe -compile embed.exe embed.lua
Expect-lua v0.11.0-4-g8ac7fce-windows-amd64 by go1.20.14
C:> embed.exe
Expect-lua v0.11.0-4-g8ac7fce-windows-amd64 by go1.20.14
embed sample !
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[49minstead of blackESC[40m - Failed to call console-api, show API-name as error
- Add
-nologooption - 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.にセットするようにした。