Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Customizing AutoScript – PB Docs 2019 – PowerBuilder Library

Customizing AutoScript – PB Docs 2019

Customizing AutoScript

There are four ways to customize AutoScript:

Creating shortcut
keys

AutoScript is easier to use if you create shortcuts for the menu
items that you use frequently.

To modify or create shortcut keys for using
AutoScript

  1. Select Tools>Keyboard Shortcuts from the menu bar and
    expand the Edit menu in the Keyboard Shortcuts dialog box.

  2. Scroll down and select Activate AutoScript and type a key
    sequence, such as Ctrl+space.

  3. Expand the Go To menu, select Next Marker, and type a key
    sequence, such as Ctrl+M.

    After you click OK, the shortcuts display in the Edit
    menu.

Specifying what displays
in the list

You can select different items to include in three different
contexts:

  • When you have started typing a variable or method name or
    the beginning of a PowerScript statement

  • When you have typed the name of an object followed by a
    dot

  • When the cursor is at the beginning of a new line or in
    white space

To make these customizations, select Design>Options from the
menu bar and select the AutoScript tab.

The following table shows what is included in the list or pasted
when you check each box.

Check box

Displays

Arguments

Arguments for the current function or
event.

Local Variables

Variables defined in the current
script.

Instance Variables

Variables defined for and associated with an
instance of the current object or, after a dot, variables
associated with the object preceding the dot.

Shared Variables

Variables defined for the current object and
associated with all instances of it.

Global Variables

Variables defined for the current
application.

Properties

Properties for the current object or, after a
dot, properties for the object preceding the dot. Includes
controls on the current window.

Methods

Functions and events for the current object or,
after a dot, functions and events for the object preceding the
dot.

Statement Templates

PowerScript statement templates for each type of
IF, FOR, CHOOSE CASE, TRY, or DO statement with comments
indicating what code should be inserted. This option is off by
default.

Turning options off reduces the length of the list that displays
when you invoke AutoScript so that it is faster and easier to paste a
completion or insert code into the script:

  • To show all variables and methods when typing, check all the
    boxes except Statement Templates in the Partial Name Resolution
    Include group box. When you pause or press the Activate AutoScript
    shortcut key, the list shows variables and methods that begin with
    the string you typed.

  • To quickly find functions on an object, clear all the boxes
    except Methods in the After A Dot Include group box. When you type
    an instance name followed by a dot, only function and event names
    for the instance display.

  • To see a list of arguments and local variables when the
    cursor is in white space, check the Arguments and Local Variables
    boxes in the When No Context Include group box. When you press the
    Activate AutoScript shortcut key, the list shows only arguments
    and local variables.

Using name completion shortens the list

You might not need to clear boxes on the AutoScript page to
reduce the length of the list if you are using name completion and
the Activate AutoScript shortcut key to invoke AutoScript. For
example, suppose you have created an instance called inv_ncst_dssrv
of the class n_cst_dssrv and you know the function you want to use
begins with of_g. Type the following into a script and then press
the Activate AutoScript shortcut key:

AutoScript displays a pop-up window showing only the functions
on n_cst_dssrv that begin with of_g.

Using automatic
pop-up

Most of the time you will probably use a shortcut key to invoke
AutoScript, but you can also have AutoScript pop up a list or paste a
selection automatically whenever you pause for several seconds while
typing. To do so, check the Automatic Popup box on the AutoScript
options page. Automatic pop-up does not operate when the cursor is at
the beginning of a line or in white space.

This feature is most useful when you are entering new code. You
can customize the options in the Partial Name Resolution Include and
After A Dot Include group boxes to reduce the number of times
AutoScript pops up.

When you are editing existing code, it is easier to work with
automatic pop-up off. AutoScript might pop up a list or paste a
template for a function when you do not want it to. Using only the
shortcut key to invoke AutoScript gives you complete control.

Using AutoScript only
with dot notation

If you want AutoScript to work only when you have typed an
identifier followed by a dot, check the Activate Only After a Dot box
on the AutoScript options page. The effect of checking this box
applies whether or not you have checked Automatic Popup. You might
find it most useful when you have checked Automatic Popup, because it
provides another way to limit the number of times AutoScript pops up
automatically.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x