Releases: hymkor/expect
Releases · hymkor/expect
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
-nologo
from the usage. - Rename
-printembederror
to-D
for debug-print - Modify the description of the usage of
-compile
- Add
-nocolor
as boolean option and hide-color
option from the usage, because-color auto
was same as-color always
and does not need to be string-option
Thanks to @misha-franz
v0.12.0
- (#36) Add the new option
-compile
to 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[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 の警告に対応(関数がヘッダコメントがない)