home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / databases / progs / phoneday / Quantum / !Executor / Sendtext (.txt) < prev    next >
Encoding:
RISC OS BBC BASIC V Source  |  1995-03-06  |  1.1 KB  |  45 lines

  1.  (v1.0) When run, the parameter text will be sent to Impression Style/Publisher at the caret of a page area.
  2.  "OS_GetEnv" 
  3.  command%
  4. l%=0:c%=0
  5.  ?(command%+l%) = 34 
  6.  c%+=1
  7.     l%+=1
  8.  c%>=2
  9. pointer%=l%+1+command%
  10. l%=0:f%=
  11.  l%+=1
  12.  ?(pointer%+l%) = 0 
  13. endpointer%=pointer%+l%
  14.  dest_hd% = -1 
  15. sendmessage
  16.  "OS_Exit"
  17.  "Wimp_Poll",0,q% 
  18.  reason%
  19. sendmessage
  20. text$="Enter "
  21. buffer%!0=256
  22. buffer%!16=&80E18
  23. buffer%!24=taskhandle%
  24. buffer%!20=0
  25. buffer%?24=36
  26. buffer%!25=0
  27. buffer%!29=0
  28. buffer%!33=0
  29.  l%=1 
  30. (text$)
  31. -!buffer%?(35+l%)=
  32. text$,l%,1)
  33. offset%=
  34. (text$)+36
  35. 2( buffer%?(offset%+l%)=?(pointer%+l%)
  36.  l%+=1
  37.  (pointer%+l%) > endpointer%
  38.  "Wimp_SendMessage",17,buffer%,dest_hd%
  39.  SYS "Wimp_SendMessage",17,buffer%,0
  40.  q% &400,buffer% 256
  41.  "Wimp_Initialise",200,&4B534154,"SendText" 
  42.  ,taskhandle%
  43.  "Wimp_GetCaretPosition",,buffer%
  44.  dest_hd%=buffer%!0
  45.