|
Archive for the 'Scripting' Category
Thursday, May 3rd, 2007
The TinyTERM Programmers Reference Manual does not mention the VT420 emulation under te.Emulation. The numeric value for VT420 is 31, for both getting and setting te.Emulation.
CR 782, added in TinyTERM 4.7.1
Posted in CScript, Documents | Comments Off on VT420 Not Documented for TE.Emulation
Wednesday, May 2nd, 2007
In TinyTERM’s Session Properties, set the Close session on disconnect and exit check box. Save the settings, then use the CScript command te.disconnect(). TinyTERM does not close, but it does disconnect. The workaround is this script fragment:
te.disconnect();
main_exit(0);
return(0);
Posted in CScript | Comments Off on Close on Disconnect Ignores TE.Disconnect()
Wednesday, May 2nd, 2007
Century Software, Inc., received comments from a customer writing a Visual Basic (VB) script to open TinyTERM with a specified .tpx file. Using the VB GetObject() command opens TinyTERM but makes it invisible. It’s listed in Task Manager, but there’s no icon or window for it, nor is there any way to bring it up. The basic script was
dim x
set x = getobject(“c:\default.tpx”)
‘x.visible = true
msgbox “test”
Note the line commented out. TinyTERM does not have a “visible” property to use in this situation.
The VB script that resolved the issue is:
dim retcode
dim alreadyrunning
set Wshshell= WScript.createobject(“wscript.shell”)
‘try to activate the tiny term window using the application title
Alreadyrunning = wshshell.appactivate(“C:\default.tpx”)
if not alreadyrunning then
‘launch Tiny Term
retcode = Wshshell.run (“%comspec% /C c:\default.tpx” , 1, FALSE)
Else
‘ send keystrokes to maximize the window
WshShell.SendKeys “% ”
WshShell.SendKeys “r”
end if
CR 735
Posted in Scripting | Comments Off on GetObject() Doesn’t Make TinyTERM Visible
Wednesday, May 2nd, 2007
Create a valid check box in TERM Script Language. Then run the script through tsltrans.exe. The resulting CScript file gives the error, “expected number, got string.” It’s due to incorrect translation. For example, this command:
at 104,10 id 4 tabstop get SENDCLMS checkbox “Send Claims”, 30,8
run through tsltrans.exe gives this line:
tsl_atobjdone(4,11,10,104,30,”Send Claims”,(8)|16384,””,””,0,0,-1,”sendclms”, “”);
It should give this line instead:
tsl_atobjdone(4,11,10,104,30,20,(8)|16384,”Send Claims”,””,0,0,-1,”sendclms”, “”);
Note the addition of the value 20 just after 30, and the relocation of the “Send Claims” argument after the value 16384.
CR 728
Posted in CScript, TSL | Comments Off on AT CHECKBOX Translated Incorrectly
Wednesday, May 2nd, 2007
Using the CScript _StrnCmp() function to compare one character from each string, the return value is always 0. If the compared strings are at least two characters long, it works properly in most cases. However, the following script fails as well:
fline=” 1) ‘p5669050.301288 EDIT STATUS'”;
cdash=”*-*”;
dash=MidStr(fline,26,1);
xdash=”*” + dash + “*”;
rc=_StrnCmp(xdash,2,cdash,2,2);
rcstr=_Str(rc);
MsgBox(rcstr,”xdash=” + xdash + ” cdash=” + cdash,0);
CR 721
Posted in CScript | Comments Off on _StrnCmp() Fails Comparing Single Characters
Wednesday, May 2nd, 2007
The CScript command KeyLoad() doesn’t generate any debug errors when it runs. However, it doesn’t make any changes. Loading a new scheme with KeyLoad() doesn’t change the key mappings.
CR 719
Posted in CScript, Keyboard | Comments Off on KeyLoad() Makes No Changes
Wednesday, May 2nd, 2007
Open TinyTERM inside Internet Explorer. Execute a simple CScript, such as the following:
te.xmit(“?\r”);
te.wait(“H”,2);
te.xmit(“A\r”);
The cursor disappears. If you’re not running TinyTERM Web Server Client, you can open the Session Properties and click OK, and the cursor comes back. But the Session Properties aren’t available in TinyTERM Web Server Client.
CR 697
Posted in CScript, Web Server | Comments Off on Cursor Disappears Running Script in Browser
Monday, April 30th, 2007
Configure TinyTERM as a DDE server. From another application, initialize a DDE channel to either the Terminal or Script topic. Use DDE Execute to run an XMIT command; e.g.,
XMIT “TEXT”
Nothing happens in TinyTERM. The same thing is true if you use the DDE POKE command to the Terminal topic.
If you use the TSL DISPLAY command to either Terminal or Script:
DISPLAY TEST
The word “TEST” is displayed, rather than the contents of the variable it should be associated with.
Also, a DDE request for a screen area XnnnYnnnWnnnHnnn; e.g., X001Y001W008H002
returns the string “TERMINAL” rather than the text in the defined area.
CR 661, POKE
CR 709, screen area fixed in TinyTERM 4.53 (May 2007)
Posted in Scripting | Comments Off on DDE Failures
Monday, April 30th, 2007
The CScript command te.SetRGBEntry() does not change colors already on screen. It only takes effect when the screen is refreshed. For example, if you use the keyboard to scroll back and forth — Ctrl-PageUp and Ctrl-PageDown — the screen clears in the correct colors.
The colors don’t always change immediately, either. If you set up a startup script with a color change, it’s not in effect until something “pushes” it. Typing clear at a shell prompt is not enough. However, if you run Midnight Commander on Linux for example (enter mc at a shell prompt), the colors come up correctly. When you exit Midnight commander, though, the screen washes clear in a blue background before returning to the correct colors. Then you can use clear successfully at the prompt.
CR 649
Posted in CScript | Comments Off on TE.SetRGBEntry() Is Not Immediate
Monday, April 30th, 2007
Unlike ASCII terminals, the PF keys on an IBM 3270 or 5250 terminal send coded network signals. Since they’re not composed of ASCII sequences, there’s no way to use the te.xmit() CScript command to send the appropriate key.
CR 645
Posted in 3270, 5250, CScript | Comments Off on PF Keys in Script
|