Guidance
指路人
g.yi.org
Software / Reginald / Examples / url.rex

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
/* This creates a Main Window containing an HTML Group with a URL to
 * microsoft's web site.
 */

ADDRESS null

/* Trap HALT and SYNTAX in any scripts we call which don't
 * trap HALT or SYNTAX themselves.
 */
OPTIONS 'TRAP'

/* Trap SYNTAX/ERROR/HALT, and ask for ERROR raising. Disable
 * ERROR raising for RXMSG(). We'll test for errors in our
 * loop
 */
SIGNAL ON HALT
SIGNAL ON SYNTAX
SIGNAL ON ERROR
CALL RXERR('ERROR|DISPLAY', '~!MSG')




/* ================ Create "HTML display" Window =============== */
/* Default size and position. WindowID = 'RX' */
rx = ''

/* First Group is HTML */
rxtype.1 = 'HTML'

/* We're using URLs or HTML filenames, not HTML strings */
rxflags.1 = 'NOBORDER'

/* Labels for each HTML, and Groupbox */
rxlabel.1 = 'Web page 1|Web page 2|'

/* Variable name where the HTML strings are stored */
rxval.1 = 'TEXT'

/* RXINFO not needed */

/* ControlsPerLine, X Position, Y Position, Width, Height (ie, NumOfLines) */
rxpos.1 = '1 10 20 400 10'

/* The URLs and/or filenames */
text.1 = 'http://www.microsoft.com'
text.2 = 'c:\program files\reginald\language.htm'

/* Specify NOCLOSE (since we'll do the closing ourselves), but not
 * RESULT so that we don't siphon the ENTER key from the HTML
 * control.
 */
CALL RXCREATE('Rx', 1, 'HTML display', 'NOCLOSE|SETVAL')
DO FOREVER

   /* Do user interaction */
   CALL RXMSG()

   /* CLOSE BOX? */
   IF rxid == '' THEN SIGNAL ERROR

END





/* ==================== Error Handling ====================== */
syntax:
    /* Reginald's CONDITION('M') makes reporting SYNTAX easy. If using some
     * other interpreter, then you'll have to do things the hard way.
     */
    CALL CONDITION('M')
    /* CALL RXSAY(CONDITION('D') || '0D0A0D0A'X || SOURCELINE(SIGL),,'Error '||CONDITION('E')||' at line '||SIGL) */

halt:
error:
    /* NOTE: CONDITION('D') fetches error message. CONDITION('E') fetches the
     * error number. SIGL is the line number where the error occurred.
     * Rexx Dialog has already displayed a message since we specified DISPLAY
     * option.
     */
    CALL RXMSG(,'END')
    EXIT
掌柜推荐
 
 
¥900.00 ·
 
 
¥880.00 ·
 
 
¥497.00 ·
 
 
¥380.00 ·
 
 
¥980.00 ·
 
 
¥1,080.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-06-18 23:35:27