home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1997 / ARCHIVE_97.iso / text / hints / vol_10 / issue_07 < prev    next >
Text File  |  1997-08-11  |  20KB  |  455 lines

  1. Hints and Tips
  2. 10.7
  3. Abbreviations in PipeDream Ö I run a sales system in PipeDream. One
  4. of the features is that we can type a short name into the first
  5. column of the sales sheet. If it finds the short name in the first
  6. column of the address list, it replaces it by the expanded full name.
  7. So, if I typed in ÉNCSæ, PipeDream would recognise this and replace
  8. it with Norwich Computer Services. The formula is:
  9. 10.7
  10. if(type(lookup(B195,[Addresses]C$1C$1000,
  11. [Addresses]C$1C$1000))=öerrorò,set_value(B195,lookup(B195,
  12. [Addresses]A$1A$1000,[Addresses]C$1C$1000)),öOKò)
  13. 10.7
  14. Once the full name has been inserted, the formula returns OK. If the
  15. short name doesnæt exist, then an Éerroræ is given. This is very
  16. useful Ö it also shows that the customer exists in the database and
  17. has been accepted.
  18. 10.7
  19. Richard Torrens <4qd@argonet.co.uk>
  20. 10.7
  21. Command line made easy Ö In Archive 10.6, öMultitasking Made Easyò,
  22. David Wild referred to the difficulty of invoking applications from
  23. the CLI.
  24. 10.7
  25. There are two ways to make life easy for CLI users:
  26. 10.7
  27. Å put frequently used commands in the Library (this is usually $.
  28. !Boot.Library for a RiscPC)
  29. 10.7
  30. Å use aliases (set Alias$...)
  31. 10.7
  32. The latter is used by WIMP apps to record how to do certain actions.
  33. It can also be used in RISC OS without any additional software to
  34. make shortcuts for CLI users.
  35. 10.7
  36. As I use several systems at work, I often type the Éwrongæ command
  37. when I change systems. Under RISC OS this is no problem, I simply
  38. Alias$ the foreign string to the local one. For example:
  39. 10.7
  40. set Alias$ls : cat
  41. 10.7
  42. so if I have been overdoing the UNIX during the day, it still works.
  43. Simple!
  44. 10.7
  45. Peter Chambers <peter@hightown.demon.co.uk>
  46. 10.7
  47. Creating a font table Ö I have created a file using TableMate
  48. Designer (v4.01a) showing a table of the keyboard ASCII numbers and
  49. the characters they produce for a given font. The file is included on
  50. this monthæs disc.
  51. 10.7
  52. The default is Trinity.Medium, but by the use of the TableMate style
  53. options, you can change the font to any other font, and the character
  54. set will be changed and displayed in the appropriate column.
  55. 10.7
  56. To alter the style, first you have to enter the Edit Style option.
  57. You can do this either through the standard RISC OS menu options, or
  58. by <ctrl-f6>. From this window, you click on the Name pop-up button,
  59. and from the options that appear, select FontDemo. Then you repeat
  60. the process for the Font Name. The list of fonts that appears from
  61. this menu will depend on the fonts currently installed into your font
  62. manager. The only part that you have to change manually is the Font
  63. Name in the Header line.
  64. 10.7
  65. At any time, the table can be printed, saved or exported to Draw, CSV
  66. or even HTML File formats. If you save the table out as a drawfile,
  67. you can then load it into CCæs ArtWorks where you can create some
  68. unusual graduated cell backgrounds within the table. However, before
  69. you do this, make sure you are 100% happy with the rest of the table,
  70. and save it as a TableMate file because Draw/Artworks files cannot be
  71. reloaded into Tablemate.
  72. 10.7
  73. (If you donæt have Tablemate, you can load the drawfile version Ö
  74. also on the monthly disc Ö and Select All, StyleÖFont name and select
  75. the font you want. Thatæs OK unless you want to display something
  76. like Dingbats Ö the ASCII numbers all turn into Dingbats, so you
  77. canæt see whatæs what! Ed.)
  78. 10.7
  79. Jonathan Frankl, Bradford
  80. 10.7
  81. Creating neat screenshots Ö If you are using the screen-grab facility
  82. in Paint, to capture part of the screen Ö one or more windows Ö then
  83. you get a much neater result if you open a blank (white) Edit window
  84. or Impression window, and then arrange the windows to be grabbed in
  85. front of that. It means that you get a nice clean white border around
  86. the windows Ö much neater for an illustration in Archive!
  87. 10.7
  88. Ed. <paul.NCS@paston.co.uk>
  89. 10.7
  90. Deleting text from writable icons (10.6 p.23) I have been using the
  91. IClear module until recently but found that it interfered with some
  92. applications such as Impact and a simple banking program (Illegal
  93. window handle type errors). So now Iæve used Keystroke to give a
  94. <ctrl-U> when I hold <alt> and click <select> in the icon. I find
  95. this even easier than IClear.
  96. 10.7
  97. (Keystroke is GREAT, but itæs a pig to know how to set things up. I
  98. tried to set up <alt>-<select> but failed, so I asked Alan to
  99. explain. Ed.)
  100. 10.7
  101. I achieved it with just one operation. I opened a Keystroke window as
  102. usual and ensured it had the focus. I held down <alt>, and clicked in
  103. the top RH box with <select>. ÉAltæ blacked out at the top of the
  104. Keystroke window, and ÉSelectæ showed in the top RH box. I then chose
  105. ÉInsert textæ and simply put |U in the writable icon labelled Étext:æ
  106. and pressed <return>... ...and thatæs it Ö just a one-page Keystroke
  107. macro! Now I simply place the pointer in a writable icon, hold down
  108. an <alt> key and click <select>. Any text in the icon is immediately
  109. cleared.
  110. 10.7
  111. Alan Gentle <alang@parkside.zynet.co.uk>
  112. 10.7
  113. File download with ANT Suite Ö In the January Hints and Tips (10.4
  114. p29), Paul suggested creating a dummy email in ANTæs Marcel in order
  115. to fetch deeply-buried files from an FTP site.
  116. 10.7
  117. An alternative method is to add the FTP URL to the Hotlist. If the
  118. FTP client is not loaded, the Hotlist will call upon Fresco in
  119. preference.
  120. 10.7
  121. In addition, any FTP URLs in the Hotlist are also available from the
  122. list in the FTP client öConnect...ò window. Any extra path
  123. information supplied in the URL appears in the öDirectoryò field.
  124. 10.7
  125. Nick Chalk <nickchalk@enterprise.net>
  126. 10.7
  127. Fractions Ö I read Gerald Chandleræs column on fractions (10.6 page
  128. 75) with great interest, but from a different perspective. I enjoy
  129. fractions Ö they remind me of a time of quality in engineering, of
  130. leather aprons and craft workshops. Brilliant! So when I read of the
  131. problem, I thought that there had to be a better way (or rather
  132. another way). I thought that most people would not want to be limited
  133. to a few specialised fonts, so this is my suggestion.
  134. 10.7
  135. I think that the way forward is to use one of Geraldæs early
  136. suggestions, namely that of adjusting the super- and sub-script
  137. options and to adjust the kerning to give you the characters you
  138. require.
  139. 10.7
  140. The problem, as was quite rightly pointed out, was the vast number of
  141. keystrokes required to get to the finished result. A lot of
  142. keystrokes?... ...call for Keystroke!
  143. 10.7
  144. I suppose most of you know of Keystroke from Quantum Software. This
  145. brilliant utility allows you to automate your keyboard so that with a
  146. touch of a key, dozens of things can happen, menus open, text gets
  147. typed in, windows moved, almost anything and setting it up is so
  148. easy. In fact, I have to say that there has not been a repetitive job
  149. I ever come across that !Keystroke couldnæt handle Ö it has saved me
  150. hours and hours of work. Enough of the advert, if you donæt have
  151. Keystroke then get it Ö you wonæt be sorry. Still, if you remain
  152. unconvinced you can have a bit of it for free! Read on...
  153. 10.7
  154. The requirement is to type in a long series of commands to your
  155. wordprocessor to get your text displayed correctly. In Impression,
  156. the commands needed to type in one eighth would be something like:
  157. 10.7
  158. {Ö50 }1/8
  159. 10.7
  160. A space after the final  is important. It produces: 1/8
  161. 10.7
  162. Fortunately, Stuart at Quantum (home of !Keystroke) has written a
  163. little basic program that will effectively Étype inæ any text you
  164. like. The program (called Sendtext) is distributed with !Keystroke
  165. (in the !KeyLib) and (with any luck) will be distributed on this
  166. monthæs magazine disc.
  167. 10.7
  168. You could use the program from an obeyfile using something like :
  169. 10.7
  170. <Obey$Dir>.Sendtext {Ö50 }1/8
  171. 10.7
  172. You could then have obey files for each fraction. Every time you
  173. wanted a fraction then all youæd need to do would be to double-click
  174. the obey file.
  175. 10.7
  176. Even neater would be to use Dave Thomasæs excellent !Makro. The copy
  177. Iæve sent to Paul is all set up and ready to go. If you use it, drop
  178. a line to Dave and tell him how good it is, heæs a good chap and we
  179. all do better with a bit of encouragement.
  180. 10.7
  181. So there you go Ö easy fractions in any font at the click of a
  182. button. By the way, when I asked Stuart if I could use his software
  183. like this, he had no hesitation in agreeing. Thanks, Stuart, on
  184. behalf of all Archive readers!
  185. 10.7
  186. Bob Harding, 40 Bremhill, Calne, Wilts. SN11 9LD. <rharding@argonet.
  187. co.uk>
  188. 10.7
  189. Impression background printing Ö To print from Impression in the
  190. background, save the document, quit it from memory, then drag it onto
  191. the printer icon on the iconbar.
  192. 10.7
  193. Frank Jukes <frank@fjukes.demon.co.uk>
  194. 10.7
  195. Impression centring graphics Ö Now I know this may seem obvious to
  196. some of you, but youæd be amazed at the number of articles I get with
  197. graphics centred by eye, with spaces. The first essential is to know
  198. about embedding a graphic in the text. This can be done by dropping
  199. it in, or by copying it with <ctrl-C> and pasting it with <ctrl-shift-
  200. F>. So, to centre a graphic, press <return> at the end of the
  201. paragraph below which the graphic is to go so that the cursor is on a
  202. blank line between the two paragraphs. Now press <f6>, and the cursor
  203. will move to the centre of the page or column. Now drop the graphic
  204. in there, or paste with <ctrl-shift-F>.
  205. 10.7
  206. Ed. <paul.NCS@paston.co.uk>
  207. 10.7
  208. Midi voice tables Ö In my beginnersæ article öMidi For The Massesò
  209. (10.3 p28), I referred to tables detailing the 128 voices of the
  210. General Midi set. These should relate easily to the software patches,
  211. as used with ReMIDI, where the patch filename is abbreviated and its
  212. meaning probably not obvious to the beginner. The tables were not
  213. actually printed with the article Ö no doubt due to limited space Ö
  214. although the TableMate-3 and Drawfile versions were included on the
  215. subscription disc. Non-disc subscribers, however, would have been at
  216. a disadvantage. Also included is a table of the General MIDI
  217. Percussion Drum Set along with their pitch identification.
  218. 10.7
  219. I hope readers will find these of interest.
  220. 10.7
  221. Colin Sutton, Bradford
  222. 10.7
  223. Multitasking made easy Ö Like David Wild (10.6 p57), I often want to
  224. run a program in background in its own task window which I can
  225. subsequently scroll. Here is another, quick way of doing it.
  226. 10.7
  227. 1. Use your text editor (Edit etc) to create an obey file, and enter
  228. the one-liner:
  229. 10.7
  230. *TaskWindow Ödisplay Öquit
  231. 10.7
  232. 2. While holding down <shift>, drag the file you want to run so that
  233. the complete path name follows after the Öquit parameter.
  234. 10.7
  235. 3. Save this obey file with a name such as öDOITò.
  236. 10.7
  237. 4. Double-click öDOITò, and your program will run in the background
  238. in its own task window.
  239. 10.7
  240. The parameters are optional:
  241. 10.7
  242. -display opens the task window, which will open anyway if the program
  243. puts anything out to the screen
  244. 10.7
  245. -quit finishes the task without the option of running another task in
  246. that same window.
  247. 10.7
  248. Sherwin Hall <100101.3577@CompuServe.COM>
  249. 10.7
  250. Printers on the iconbar Ö I stopped using TurboDrivers when I fitted
  251. the StrongARM, primarily because Computer Concepts were so slow in
  252. sending out upgrades, and have only just installed it. Eventually,
  253. one tires of waiting for !Publisher to complete printing under the
  254. Acorn printer driver Ö even with version 1.54 and Ébackgroundæ
  255. printing enabled.
  256. 10.7
  257. When I had finished using the !Install program, I double-clicked on
  258. !Printers in Resources:$.Apps. I then dragged two copies of the
  259. DeskJet printer driver to the Printer control panel (IconBar
  260. Menu/Printer control... ) and configured them, one for high
  261. resolution (300╫300) and the other for draft (150╫150) printing. At
  262. this stage, I found that I had six printer icons on the iconbar. From
  263. left to right, there were the original pair of DeskJet icons (same
  264. functions as the new Turbo Icons), one for the dot-matrix printer,
  265. one for printing to send by ArcFax, and the two new Turbo icons. It
  266. was easy to switch off the two old DeskJet icons (iconbar
  267. Menu/Printer control... /Menu/Inactive), but this left four icons in
  268. an unfamiliar order.
  269. 10.7
  270. (At this point you may be wondering why I was not simply upgrading
  271. the old, already installed version of TurboDriver I had used with the
  272. ARM 610.) Well, it may have been that it was version 4.04. At a more
  273. practical level, the earlier installation was lost in a hard disc
  274. crash.
  275. 10.7
  276. To achieve the desired arrangement, the obvious course appeared to be
  277. to öRemoveò those icons at the left which I wanted to be at the
  278. right, then re-install them by dragging the printer definition files
  279. back into the Printer control panel, and go through the process of
  280. configuration again. Was that tedious process necessary? I chose to
  281. do it another way.
  282. 10.7
  283. The file ÉSettingsæ (<HardDisc>.$.!Boot.Choices .Printers.Settings )
  284. contains the information relating to the printer icons on the
  285. iconbar. A little study shows the structure of this file. If you load
  286. it into Zap (or Edit, if you must), you will see a long series of
  287. identifiers down the left hand edge of the window; each consists of
  288. two lower case letters followed by a colon followed by a space. In
  289. many cases, these identifiers are followed by a string of characters,
  290. some of which are intelligible words.
  291. 10.7
  292. The start of the file is identified by Éfv: æ. Each section relating
  293. to an individual printer icon is not indicated by any clearly evident
  294. delimiters. It is necessary to find Écl: æ and Éic: æ which are the
  295. start and finish lines for each printer.
  296. 10.7
  297. Make a copy of the file ÉSettingsæ (as ÉSettingsOæ, or some such)
  298. before starting to reorganise the listing in ÉSettingsæ. Select all
  299. of the lines of the section (æcl: æ to Éic: æ) representing the
  300. printer icon that you want at the left hand end of the group on the
  301. iconbar and move these to immediately below Éfv: æ by pressing <ctrl-
  302. V>. In the same way, you can rearrange the section of lines relating
  303. to each of the other settings. Beware of leaving totally blank lines
  304. in the file, and ensure that one line-feed follows the last line
  305. starting Éic: æ. Save the reorganised ÉSettingsæ, quit !Printers and
  306. re-run it. Hey, presto!
  307. 10.7
  308. It is easier to do it once you see the file and its identifiers, than
  309. it is to describe it . With the exception of the time it took me to
  310. understand the structure of the file, it took less time to rearrange
  311. the icons this way than using the ÉRemove/Drag in/Configureæ method
  312. described earlier.
  313. 10.7
  314. Of course, someone will now tell me of an easier, quicker way!?
  315. 10.7
  316. Frank Watkinson <frank@watsnees.demon.co.uk>
  317. 10.7
  318. Zap and Basic Ö Here are some hints to remedy some of the obscure
  319. bugs in the latest version of !Zap editor (version 1.35).
  320. 10.7
  321. Failing Basic programs Ö One of the obscure bugs that !Zap has is
  322. that any trailing spaces on a Basic line are not removed. This can
  323. cause your program to behave very strangely, and output unexpected
  324. results. Under many circumstances, the Basic interpreter will ignore
  325. trailing spaces on a Basic line, except in the following case:
  326. 10.7
  327. 1. After the keyword OF in a öCASE .... OFò structure. The OF keyword
  328. must be the last keyword on the line. The interpreter will give the
  329. error: öCASE..OF statement must be the last thing on a lineò.
  330. 10.7
  331. 2. After the keyword THEN in a multi-line öIF..THEN..ELSE..ENDIFò.
  332. The Basic interpreter will not be able to detect the trailing space
  333. and will convert the multi-line IF...ENDIF into a single line IF
  334. THEN. The Basic interpreter will not trap this error. Your program
  335. will behave differently from what you had expected. It could take you
  336. ages to discover what is happening because you canæt see the space
  337. after the THEN keyword!!!
  338. 10.7
  339. One solution I found is to save the file, open it in Edit, then save
  340. it back again. Edit and other Basic editors will remove trailing
  341. spaces on a Basic line.
  342. 10.7
  343. Basic mode, Copy and Move bugs Ö This bug is easily encountered. You
  344. can lose your program if you donæt read on.... !Zap allows you to
  345. position the cursor (using the mouse) on a line that is below the
  346. last line of the Basic program. This is normally an empty line
  347. without a line number. If you press <enter> or just type in
  348. something, !Zap will automatically put in a new incremented line
  349. number on the left hand, and your typed text appears on the line. So
  350. far, all is fine. However, if while the cursor is on the blank line,
  351. you highlight something from somewhere else in the program and copy
  352. it or move it to the blank line, !Zap goes crazy. It will first show
  353. a wrong line number, and only part of the copied text will appear on
  354. the line. This new line is now a garbage line. You cannot move the
  355. cursor beyond it. You will not be able to delete this line. Most
  356. importantly, if you want to save your file, Zap will report an error
  357. öNot a Basic file or corrupt at offset &xxxxxxxò, and you will not be
  358. able to save your file.
  359. 10.7
  360. For example:
  361. 10.7
  362. 10 DIM memory% memory_size%
  363. 10.7
  364. 20 memory_pointer% memory%*4
  365. 10.7
  366. 30 byte% !memory%
  367. 10.7
  368. The above is only a 3 line program, but you can place the cursor
  369. using the mouse on the fourth line (i.e. the blank line). Now
  370. highlight line 20 until the number 4 (do not highlight the complete
  371. line only the text) and copy it using <ctrl-C> to the blank line.
  372. Surprise!! The line number will be shown as 110053. The first two
  373. chars of the variable memory_pointer% disappear. You are stuck.
  374. 10.7
  375. 10 DIM memory% memory_size%
  376. 10.7
  377. 20 memory_pointer% memory%*4
  378. 10.7
  379. 30 byte% !memory%
  380. 10.7
  381. 110053 ory_pointer% memory%*4
  382. 10.7
  383. What happens, is that there is a bug with the copy and move commands.
  384. When !Zap copies or moves a line in Basic mode, it assumes that you
  385. are copying or moving to an already existing line. In the above
  386. example, what we are doing is trying to append something to the end
  387. of the program, using the copy command, which unfortunately does not
  388. work.
  389. 10.7
  390. The strange line number and the missing three characters from the
  391. variable are due to the fact that !Zap places the first three
  392. characters of the variable name as a three-byte tokenised line
  393. number. Worse still, this new line does not have an &0D terminating
  394. byte! Thatæs why you cannot move beyond it.
  395. 10.7
  396. To remedy the situation and regain control of your valuable program:
  397. 10.7
  398. 1. Place the cursor after the last character on the last line (the
  399. problematic line). In our example, after the digit 4.
  400. 10.7
  401. 2. Switch into Byte mode using <ctrl+shift+f2>.
  402. 10.7
  403. 3. Type ö0ò followed by öDò. (i.e. insert a terminating byte).
  404. 10.7
  405. 4. Switch back to Basic mode using <ctrl+shift+f6>.
  406. 10.7
  407. Now you find yourself after the problematic line. Now just press
  408. <Enter>, and Zap will automatically re-number the program for you and
  409. you are back in control. Donæt forget to type the missing characters
  410. on the line.
  411. 10.7
  412. Basic tokenising bug Ö When copying or moving in Basic mode, Zap does
  413. not automatically tokenise the new copied text.
  414. 10.7
  415. Example:
  416. 10.7
  417. 10 mem% 2 :REM PRINT mem%
  418. 10.7
  419. 20
  420. 10.7
  421. 30 pointer% 1<<10
  422. 10.7
  423. If you copy or move the öPRINT mem%ò after the REM in line 10 to line
  424. 20, the öPRINTò keyword will not be tokenised. This will cause the
  425. program to produce errors when executed. To remedy this, after
  426. copying, place the cursor on the line (line 20 in our example) and
  427. insert a space, or whatever.
  428. 10.7
  429. Applications not accepting Zap Basic files directly Ö You can save
  430. (drop) a Basic file directly into another Basic editor like DeskEdit,
  431. StrongED or Edit, but they will not accept Basic programs directly
  432. from !Zap. You have to save them first to disc then load them into
  433. the other application or Editor.
  434. 10.7
  435. The reason for this is that most applications identify a Basic
  436. program by checking for the byte &0D to be the first byte of the
  437. Basic program. If it does not exist, they will report a öBad Basic
  438. programò.
  439. 10.7
  440. While in Zap Basic mode, your program is stored using a special Zap
  441. format, not the standard Basic tokenised file. The format Zap uses is
  442. as follows:
  443. 10.7
  444. 1. 3-byte line number (similar to the 3-byte-encoding used by GOTO).
  445. 10.7
  446. 2. The Basic line content in a Basic tokenised form.
  447. 10.7
  448. 3. One byte terminator (&D).
  449. 10.7
  450. You are warned Ö if you drop your Basic file directly into Edit
  451. (version 1.44), Edit will crash with a Data Abort error!! So, save
  452. your program to disc first, before loading it into other applications.
  453. 10.7
  454. Mohsen Alshayef <mohsen@qatar.net.qa>
  455.