Skip to content

QuentinLemCode/AutoIt-3270

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

AutoIt 3270 Library

Usage

  • Download X3270 here
  • Import the file in your script
#include "3270_lib.au3"
  • Call function Init3270()
  • Call function Open3270()

... and do your stuff !

Functions

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

Initialize the lib, parameters :

  • Full path the X3270 executable
  • 3270 host
  • Charset to use (see X3270 doc)
  • Window mode
  • Get or not some information from emulator when calling a function
  • Port for communicating with the emulator (change if already used on your computer)
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"

About

Automate a 3270 terminal with AutoIt !

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages