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

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

  
/* This creates a Main Window (with RESULT Flag) with a Group of TEXT.
 * Whenever the user moves the window, and presses ENTER, we use RXSET to
 * force the window position to 0 ,0
 */

/* Toss away the return from a function if
 * we don't assign it to a variable
 */
ADDRESS null

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

/* Trap SYNTAX/ERROR/HAT, and ask for ERROR raising */
SIGNAL ON HALT
SIGNAL ON SYNTAX
SIGNAL ON ERROR
CALL RXERR('ERROR|DISPLAY')




/* =============== Create "Main Window" ================= */
/* First Group is TEXT */
rxtype.1 = 'TEXT'

/* Use of a control in this group causes RXMSG to return */
rxflags.1 = 'CENTER|NOBORDER'

/* Phrases. No Groupbox */
rxlabel.1 = 'This is an example of RXSET with a WindowOperation of MOVE.|Move the window and press ENTER.|Window will be forced to the upper left corner of Desktop.|'

/* ControlsPerLine, X Position, Y Position, Width=0, BetweenPhrases=0 */
rxpos.1 = '1 10 10'

/* Default size and position */
rx = ''

/* NOCLOSE since we want to close the window ourselves */
CALL RXCREATE('RX', 1, 'RXSET() MOVE -- Window', 'NOCLOSE|RESULT')

DO FOREVER

/* Do user interaction */
CALL RXMSG()

/* Did user click upon the CLOSE BOX? If so, then exit */
IF rxid == '' THEN SIGNAL HALT

/* The only other thing that could have caused RXMSG to return is ENTER.
 * Note that we haven't setup a timeout, nor set the KEYS flag
 * of any window, and have no Groups with REPORT Flag set. So...
 */
/* Force window position to 0, 0 */
CALL RXSET(, 'MOVE', 0 0)

END /* DO FOREVER */



/* ==================== Error Handling ====================== */
syntax:
    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:19