|
Archive for the 'CScript' Category
Monday, April 9th, 2007
Using a TinyTERM script to execute a file transfer, the transfer status dialog box may come up. Depending on how your script is written, this may pause or stop script execution entirely.
To prevent the dialog box from coming up, you can disable it with a script command. The TERM Script Language command is:
set xferstat off
For CScript, use the command:
FTSetXferStat(0);
Enter the appropriate command anywhere in the script before the file transfer starts.
Posted in CScript, File Transfer, Scripting, TSL | Comments Off on Dialog Box Stops File Transfer Script
Thursday, March 29th, 2007
TinyTERM version 4 has a pop-up context menu which can be accessed by right-clicking the session button. If you need the Session Bar so you can switch between sessions, but do not want the context menu available, it can be disabled.
Go to TinyTERM’s Session menu and select the Script Editor. Enter the following commands:
iIdPopMenu = 101;
CSESS[dSESSBUTT].contextmenuid = iIdPopMenu;
entryTE_EMouseDown(oParent,oTE,nCode,nButton,nFlags,x,y){}
Save the script with whatever name you choose, such as nomenu.cs.
Next, go to the Edit menu and select Session Properties. Set the “Post session start” radio button, then click the Browse button. Select the script you just created and click Open. OK everything and save the settings.
The next time you start TinyTERM, the session buttons will still be available. But the context menu won’t.
Posted in CScript | Comments Off on Disabling the Context Menu
Thursday, March 29th, 2007
This error may list any number of CScript methods. It generally means that a command tried to execute before the TE or FT control it references has actually loaded.
It’s most common when a script is run as an application startup script. To bypass the error, configure TinyTERM to run the script at post-session start instead.
Posted in CScript | Comments Off on Method Called with Invalid Object Instance
Tuesday, March 27th, 2007
All versions of TERM have the capability to record a user’s keystrokes and the host system’s responses. It’s accessed through the TERM Script Language command LEARN:
LEARN START filename
LEARN STOP
Replace filename with the name of the TSL command file you want to create.
In TERM for Windows, a “Learn mode” or “Macro recorder” option is also available from the Tools menu. It will request a file name in a Windows dialog, and otherwise functions the same way as the LEARN command.
Most versions of TinyTERM do not have such capability, as it requires a script language. However, TinyTERM versions 4.30 and above do have a macro recorder on the Tools menu. It behaves as the LEARN command in earlier versions, but creates a CScript file instead of TSL.
Posted in CScript, Keyboard, Scripting, TSL | Comments Off on Keyboard Macro Recorder
Monday, March 26th, 2007
TERM and TinyTERM for Windows allow multiple sessions to be opened in a single window. You can switch through these sessions in order with the NEXTSESS keyboard function.
To access that function, open the keyboard mapper. Click the “Chart Open” button to bring up the key chart. On the right of the chart, click the “F” button for a list of functions. Using your mouse, drag the NEXTSESS function from the chart and drop it on the key you’ve chosen.
Click “Chart Close” to close the chart, then click OK to close the keyboard mapper. Click Save As to give the new keyboard scheme a name. OK everything and save the settings. From that point on, when you have the correct keyboard scheme chosen, you can cycle through the open sessions in a TinyTERM or TERM window by pressing the chosen key.
Posted in CScript, Keyboard, Scripting, TSL | Comments Off on Switching Sessions with a Keystroke
Thursday, March 22nd, 2007
As a security feature, some host systems will allow you to login over a modem, then disconnect you and call you back at a predetermined phone number. Functionality to allow TinyTERM to answer the phone in this situation was added in version 4.30, in the form of the te.WaitForCall property. Setting it to true causes TinyTERM to wait for the currently selected modem to ring, then answers it:
te.WaitForCall=true;
This property allows you to set up an automated callback login. We have a sample script that does exactly that. It only requires editing for the correct telephone number and prompts.
CR 342, script
CR 399, capability
CR 455, duplicates CR 342
Posted in CScript, Modem | Comments Off on Hosts That Require Callback
Tuesday, March 20th, 2007
The TSL compatibility command tsl_atobjaddarray() does not work. It should populate a list box or similar control with the contents of an array. Instead, it does nothing.
You can work around this with a simple while() loop. For example, the following CScript fragment adds the contents of a ten-item array named Items:
tsl_atobjinit();
counter = 0;
while (counter < 10) {
tsl_atobjaddlist(Items[counter]);
counter++;
}
tsl_atobjdone(111,9,5,5,250,200,(0)|16385,"","",0,0,-1,"chosen", "");
The closing tsl_atobjdone() command must be included, but the format will vary depending on the control you’re populating.
CR 611, fixed in TinyTERM 4.40
Posted in CScript, Scripting, TSL | Comments Off on TSL_AtObjAddArray Does Not Work
Tuesday, March 20th, 2007
This error is the result of a bug in TinyTERM 4.11. The only solution is to use a different version of TinyTERM.
Posted in CScript, File Transfer, Version | Comments Off on Wrong Number of Arguments Passed to Function FTRecvX
Tuesday, March 20th, 2007
For most terminal emulations, a function key sends an escape or control sequence. That sequence can be sent to the host using CScript or TERM Script Language (TSL).
For example, the F1 key in Wyse50 emulation sends Ctrl-A, then the @ sign, then a carriage return. This is usually abbreviated ^A@^M. The script commands to send that sequence are:
CScript: te.xmit(“\001@\015”);
TSL: xmit “\001@\015”
As you can see, the control characters are replaced in the strings by their octal values, preceded by the backslash character \. The octal values for control characters can be found at http://www.robelle.com/. Keyboard references for several emulations are available on our website.
Posted in CScript, Keyboard, Scripting, TSL | Comments Off on Sending Function Keys in Script
Tuesday, March 20th, 2007
TinyTERM 4.x includes a script translation utility, tsltrans.exe, which will convert scripts written in TERM Script Language (TSL) to CScript. That utility is documented in the file tsltrans.wri and in the Programmers Reference Manual. Most releases of TinyTERM 4 will also execute TSL scripts without translation.
That is the only script translation utility available in any Century Software, Inc., product. No version of TERM will translate from CScript to TSL. Nor will any version of TERM or TinyTERM translate scripts written in any other scripting language.
Posted in CScript, Scripting, TSL | Comments Off on Automated Script Translation
|