Home

Awesome

AutoIt 3270 Library

Usage

#include "3270_lib.au3"

... and do your stuff !

Functions

Init3270($sCheminX3270, $sHote3270, $sCharset = "us-intl", $iWinMode = @SW_MAXIMIZE, $bDemandeEtat = False, $iPortApi = 3270)

Initialize the lib, parameters :

Open3270()

Open the Emulator

Close3270()

Close emulator

zMoveCursor($iRow, $iCol)

Move cursor

zPutString($sStr)

Set string under cursor

zGetStringPos($iX, $iY, $iLen)

Get the string at position X and Y with length Len

zGetStringBlock($iXstart, $iYstart, $iXend, $iYend)

Get all the character in the block

zGetScreen()

Get the entire screen

zIsStringInScreenPos($sCheck, $iX, $iY, $iLen)

Return true if the string Check is present in the string of length Len at position X and Y

zIsStringInScreen($sCheck)

Return true if the string Check is present in the screen

zEnter()

Press Enter

zTab()

Press Tab

zPf($iF)

Press F button with the number passed in parameter

Example : zPf(4) -> Press F4 key

zClear()

Call clear

zNewLine()

Move cursor to the first field on next line

zDeleteField()

Delete the entire field

zGetCursorPosition()

Return the cursor position with an array ; index 0 = X ; index 1 = Y

zHome()

Return the cursor to the main field

zPrint($sPrinterName)

Print screen text on printer

Errors

Every function will set the @error to <> 0 if there are an error.

$__e_320 = "3270 Emulator not initialized, use Init3270 function before use"
$__e_321 = "3270 Emulator not found"
$__e_322 = "Unable to open 3270 Emulator"
$__e_323 = "3270 Emulator already open"
$__e_324 = "3270 Emulator not initialized, call init3270 function before"
$__e_325 = "3270 Emulator already closed"
$__e_326 = "Unable to close 3270 Emulator"
$__e_327 = "Unable to get 3270 Emulator Process ID"
$__e_328 = "3270 Emulator closed"