Skip to content

Releases: hymkor/expect

v1.0.0

03 Dec 08:54
Compare
Choose a tag to compare
  • Update linked libraries with go get -u
  • Fix: broken test.lua
  • Reset a pre-release flag

v0.12.1

11 Jul 03:32
Compare
Choose a tag to compare
v0.12.1 Pre-release
Pre-release

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

30 Jun 21:39
Compare
Choose a tag to compare
v0.12.0 Pre-release
Pre-release
  • (#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

13 Feb 14:31
Compare
Choose a tag to compare
  • (#35) Add the new function: sendvkey(VIRTUAL_KEYCODE). (Thanks to @chrisdonlan)
  • 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

02 Jan 19:59
Compare
Choose a tag to compare
  • Add OLE functions.
    • local OBJ=create_object() creates OLE-Object
    • OBJ:method(...) calls method
    • OBJ:_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

28 Dec 12:22
Compare
Choose a tag to compare
  • Add the new global variable: capturelines (default:2)
    • It can specify the number of the captured lines when expect() is executed.
  • Add the new function: sleep(SECOND) , usleep(MICROSECOND)

  • 新グローバル変数: capturelines を追加(デフォルトは2)
    • expect() が実行されたときにキャプチャーする行数を指定します。
  • 新関数 sleep(秒)usleep(マイクロ秒) を追加

v0.8.0

26 Dec 09:35
Compare
Choose a tag to compare
  • Add the new function shot(N)

shot(N) is the function to capture the N lines of the screen.

local screen = assert(shot(25))
for i = 1,#screen do
    print( i,screen[i] )
end

  • 新関数shot(N) を追加しました。

shot(N) は画面の N 行をキャプチャーする関数です。

v0.7.1

29 Nov 11:58
Compare
Choose a tag to compare

  • (#31) expect がタイムアウトした時にクラッシュする不具合を修正.

v0.7.0

24 Sep 16:29
Compare
Choose a tag to compare
  • Use the default-background-color ESC[49m instead of black ESC[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

16 Feb 13:14
Compare
Choose a tag to compare
  • Fix: filehandle for script was not closed when script did not end with CRLF
  • Show the version string

  • スクリプトが CRLF で終わっていなかった時、スクリプトのハンドルがクローズされていなかった点を修正
  • バージョン文字列を表示するようにした