## READ GUI

PURPOSE:
To receive information from the Web View of a PC3 screen driver.
STATEMENT SYNTAX:
{stno} READ GUI (0{,ERR=} {,END=} {,TIM=} ) ksa[all]

### The data for the "type" key is the type of Data being returned

"type" | Input Key | Input Data | Input Indicates
--- | --- | --- | ---
"before navigate" | "url" | detination url | Response to Navigate2 Write Gui or User is attempting to Navigate
"frame name" | Target Frame
"headers" | Headers (normally not used)
"posted data" | Posted Data
"Dialog Cancelled" |  | User Cancelled Dialog
"Dialog Ended" |  | Response to Dialog End Write Gui
"Dialog Started" |  | Response to Dialog Write Gui
"DocumentComplete" | "url" | Name of Document | Document has finished loading
"outerHTML" | "Text" | HTML Segment | Response to GETouterHTML Write Gui
"PageSetup" | "header" | Page Header | Response to GetPageSetup Write Gui
"footer" | Page Footer
"margin_bottom" | Bottom Margin
"margin_top" | Top Margin
"margin_left" | Left Margin
"margin_right" | Right Margin
"orientation" | "Landscape" or "Portrait"

NOTES:
The GUI interface expects to stay synchronized with your program. If it has one of the above inputs available for your program it will wait up to 3 seconds for your program to execute a READ GUI. In essense it is a programming error not to have an active READ GUI when there is READ GUI information available!! During the 3 seconds both the console view and the web view will hang. A similar 3 second delay will occur after you have been sent a "before navigate" but have not returned a "Go" or "NoGo". The result of not responding to a "before navigate" is a "NoGo".
To become familiar with the feel of this error you may want to try from console mode:
CALL "$__DIALOG",-1,-1,400,300,"Hang Test"
The only way out of the dialog box is to cancel (X in the upper right). But when you do this the "Dialog Cancelled" will be sent, so console mode input will be hung for 3 seconds after you cancel the dialog box. If you change your console mode command to:
CALL "$__DIALOG",-1,-1,400,300,"Hang Test";READ GUI A![ALL]
You will see imediate response from the keyboard and A!["type"] will be "Dialog Cancelled"
SEE: 'WRITE GUI'