home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / joevw122.zip / EXAMPLE.REX < prev    next >
OS/2 REXX Batch file  |  1993-12-09  |  848b  |  38 lines

  1. /*This example is set up for a screen resolution of 1024 by 768*/
  2. /*Note that / is never used, only % which guarantees an integer result */
  3. /*It just moves the current image around the screen */
  4. "get_info"
  5. PARSE VAR rc wide high colors position_x position_y window_w window_h
  6. horizontal = 1024 - window_w
  7. vertical = 768 - window_h
  8. do 4
  9.   cmd = "move_abs " horizontal % 2 " " vertical % 2
  10.   cmd
  11.   "pause 20"
  12.   "move_abs 0 0"
  13.   "pause 20"
  14.   cmd = "move_abs 0 " vertical
  15.   cmd
  16.   "pause 20"
  17.   cmd = "move_abs "  horizontal  " "  vertical
  18.   cmd
  19.   "pause 20"
  20.   cmd = "move_abs "  horizontal  " 0"
  21.   cmd
  22.   "pause 20"
  23.   "move_abs 0 0"
  24.   do vertical%3
  25.      "move_rel 0 3"
  26.   end
  27.   do horizontal%3
  28.      "move_rel 3 0"
  29.   end
  30.   do vertical%3
  31.      "move_rel 0 -3"
  32.   end
  33.   do horizontal%3
  34.      "move_rel -3 0"
  35.   end
  36. end
  37. exit
  38.