Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

print at address?

 [1/2] from: john::thousand-hills::net at: 11-Sep-2001 15:50


Is there a way to start ma print command at a particular place in the line, like the old dBASE goto 31 print d76 ???? John

 [2/2] from: g:santilli:tiscalinet:it at: 12-Sep-2001 13:09


John Harbaugh wrote:
> "goto 31 print d76" ????
You just have to send a standard ANSI escape sequence. Let me see if I have them here... This is from my very old ropus.r ; -- text interface (requires REBOL 2.2) restring: func [b] [make string! reduce b] control-sequences: make object! [ csi: "^(1B)[" sequence: func [ "Creates a sequence" s [block!] ] [ restring bind s 'self ] left: func [ "Moves the cursor n chars left" n [integer!] ] [ sequence [csi n "D"] ] right: func [ "Moves the cursor n chars right" n [integer!] ] [ sequence [csi n "C"] ] up: func [ "Moves the cursor n rows up" n [integer!] ] [ sequence [csi n "A"] ] down: func [ "Moves the cursor n rows down" n [integer!] ] [ sequence [csi n "B"] ] move-to: func [ "Moves the cursor to the given position" row [integer!] column [integer!] ] [ sequence [csi row ";" column "H"] ] home: sequence [csi "H"] ; goto (1, 1) delete: func [ "Deletes n chars to the right" n [integer!] ] [ sequence [csi n "P"] ] insert: func [ "Inserts n spaces" n [integer!] ] [ sequence [csi n "@"] ] cls: sequence [csi "J"] ; clear screen clear-to-end-of-line: sequence [csi "K"] cursor-pos: sequence [csi "6n"] dimensions: sequence [csi "7n"] ] HTH, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/