FennEdge Learn · Programming

DAS Trader Advanced Hotkey Script Course

Understand the code. Inspect the state. Verify the outcome. A detailed path through Advanced Script: language, data structures, order objects, event workflows and complete practice projects.

Plan about 1046 minutes including reading, worked examples, and each lesson exercise; actual time varies.

36Lessons≈1046Est. minutes—Sign in to save progress
07
Lesson 7 of 36 · About 22 min

DAS Script Windows, Objects and Execution Context

Separate a named target from whichever window has focus.

Resolve, inspect, then read

Advanced Script · read and display. First open the named Montage and confirm it has quote data.

$feWindow = GetWindowObj("feMontage");
$feBid = $feWindow.BID;
MsgBox($feBid);

$feWindow refers to a window object. $feBid stores a number read at that point in execution. The number is not a subscription that refreshes itself.

The target is part of the program

A bare command normally operates in the focused window. A named object makes the intended window explicit. That still leaves the window's current symbol, account and data availability to inspect. Naming a Montage does not freeze its contents.

Layer Example What to verify
Window identity GetWindowObj("feMontage") Unique configured name
Object inspection $feWindow.ShowObject() Available fields in this build
Property read $feWindow.BID Quote meaning and freshness
Property write Montage Price or Share UI state changes
External action Submission or cancellation Separate order confirmation

Lab: change one dependency

Read the same named Montage while focus is on two different windows. Then change its symbol and read again. Record both the target window and symbol with every result. Close or rename the window only for a separate inspection test; characterize failure behavior before writing any action script around it.

An explicit target does not retarget later statements

$feWindow = GetWindowObj("feMontage") assigns an object reference. It does not establish a scope in which all subsequent bare commands target that window. Read the receiver of each object method and the execution context of each bare command separately.

An object reference is not an immutable snapshot. Assigning it to another variable does not establish a documented deep copy. To preserve a number observed at one moment, read the field into your own record with symbol, account and observation time. User objects defines that record's structure and lifecycle.

Troubleshoot a missing target

Check existence, exact configured name, duplicate names, desktop changes, whether the field belongs to that window type, and data loading, in that order. Restore the dependency manually before the smallest read. Without a contract, do not invent a fallback asserting that a missing object returns an empty string.

Worked answer

After focus moves to another Montage, $feWindow.BID and a bare Price= need not address the same target. Review every statement's destination, not only the first line. Merely mentioning the correct account somewhere in the body cannot constrain every subsequent action.