Intouch Script Function Sample of InfoAppTitleExpand

Posted on 289 views

Description

InfoAppTitleExpand() returns the application title or Microsoft Windows Task List name of a window whose title is partially or fully specified. See Tech Support Script Function Library to install this function.

Use:

InfoAppTitleExpand(PartialWindowName);

PartialWindowName A Message tag or a quoted string (example: “NOTE”) which is a partially or fully specified name of a window that is currently running.

Important PartialWindowName is case sensitive. If the name of the window title contains capital letters, use the same capital letters when specifying the window name.

Returns:

InfoAppTitleExpand() returns a fully qualified window title. If the window cannot be found, the return value is an empty string (“”; no spaces between the double quotes).

Details of InfoAppTitleExpand()

The difference between InfoAppTitleExpand() and InfoAppTitle() is that InfoAppTitle() requires the name of the executable be passed into the function. InfoAppTitleExpand() requires only a fragment of a window name. This is useful when the application name may be changing due to the application being developed.

Example of Using InfoAppTitleExpand()

The following is a script that uses InfoAppTitleExpand():

{ This is an example of using the InfoAppTitleExpand() Script function }
{ Call the function to retrieve the window title of the current Excel session }
ExcelTitle = InfoAppTitleExpand ( “Microsoft Excel” );

Executing the script will set ExcelTitle to the current window title of the Microsoft Excel session that is running. If there was a file opened in Excel which was called “C:\MYSHEET.XLS”, then the value of ExcelTitle will be set to: “Microsoft Excel – MYSHEET.XLS”.

Leave a Reply

Your email address will not be published. Required fields are marked *

− 1 = 4