home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1996 / ARCHIVE_96.iso / text / hints / volume_07 / issue_06 < prev    next >
Text File  |  1995-02-16  |  20KB  |  396 lines

  1. Å  A4 battery life Ö Many A4 users may have noticed that the charge of
  2. the A4 battery becomes shorter after each recharge. Apparently, if the
  3. battery is not discharged completely it does not run for the full
  4. capacity upon recharge. One solution is to unplug the battery manager
  5. from the command line and leave the computer on until the red light
  6. stops blinking. The battery will then be fully discharged and can then
  7. be recharged as normal.
  8. 7.6
  9. I now leave the battery manager unplugged permanently. I just have to
  10. make sure I save everything regularly. When the red light flashes to
  11. indicate the battery being flat, I have a couple of minutes to save the
  12. latest alterations and shutdown.á Awie Bosman, South Africa.
  13. 7.6
  14. Å  Beware the old module! Ö I have discovered that some older (slightly
  15. badly-behaved) applications load their own modules in their Run file.
  16. Presumably this is because RISCáOS 2 didnæt have all the modules in ROM
  17. and an application needing a module newer than the RISCáOS 2 one would
  18. need to load it itself Ö if it was too lazy to use SysMerge, that is. If
  19. you have RISCáOS 3, these applications can have the disconcerting effect
  20. of replacing a RISCáOS 3 ROM module with an older version of the same
  21. module.
  22. 7.6
  23. I came across this when trying to run Almanac Ö I got the error message
  24. öModule .....$.!System.FPEmulator not foundò. Looking into System
  25. confirmed that there was no such module under this pathname, and several
  26. minutes of panic ensued while I played Éhunt the moduleæ. Finally, a
  27. hard reset seemed to restore Almanac to perfect behaviour, the module
  28. was restored and I was so relieved that I forgot about the problem for
  29. some weeks.
  30. 7.6
  31. The problem recurred but this time, Ovation would not run either, giving
  32. a similar message. I realised that, in RISCáOS 3, FPEmulator is in ROM,
  33. so something must have happened to the ROM module. On checking *Help
  34. ROMModules, I found FPEmulator was öDormantò. Trying to *RMReinit it had
  35. no effect. Then I remembered that I had been playing CISæs Mah Jong.
  36. Sure enough, in the application directory was a copy of FPEmulator and
  37. in the Run file was the line öRMLoad <obey$dir> FPEmulatorò. Inspecting
  38. this module showed it to be version 2.60 (the ROM module is 2.87).
  39. 7.6
  40. In the Almanac Run file is the line öRMEnsure FPEmulator 2.70 Error You
  41. need FPEmulator 2.70 or laterò. So, Mah Jong had been quietly loading an
  42. old module without this being at all obvious until another application
  43. wanted the ROM version. Deleting the line from Mah Jongæs Run file cured
  44. the bug but Mah Jong seems to get along only intermittently with the new
  45. FPEmulator, unpredictably throwing up öinvalid floating point operationò
  46. errors. (Should it do this? What about öbackwards compatibilityò?)
  47. Putting öRMKill FPEmulatorò followed by öRMReinit FPEmulatorò at the end
  48. of Mah Jongæs Run file doesnæt have any effect, but running the same two
  49. lines in a separate Obey file does work. Does anyone know why?
  50. 7.6
  51. The moral would seem to be to inspect the directories of applications
  52. you have been using if your modules start misbehaving. They may be
  53. loading all sorts of things you donæt want.á Peter Young, Cheltenham.
  54. 7.6
  55. Å  Computer hang-ups Ö Thereæs a hint in Computer Conceptsæ Turbo Drivers
  56. manual which suggests that if the printer should Éstallæ, selecting
  57. <f12> followed by <return> will re-start the printer.
  58. 7.6
  59. Quite by chance, I found that doing the same thing can occasionally
  60. clear a computer hang-up. Specifically, it may work when you can still
  61. move the mouse pointer but clicking on an icon, etc has no effect.
  62. 7.6
  63. The beauty of this is that, rather than having to perform a soft or hard
  64. reset to clear the hang-up and thus losing any unsaved work, you are
  65. returned to the desktop as it was before selecting <f12> <return>, i.e.
  66. all windows and documents are restored.á Jim Nottingham, York.
  67. 7.6
  68. Å  !FontEd under RISCáOS 3.1 Ö Ronald Alpiaræs problem of invisible
  69. coordinates in last monthæs Help!!! (7.5 p8), apparently only occurs in
  70. 256 colour modes. In 16 colours they reappear.
  71. 7.6
  72. (I think this could be linked with an obscure problem which one of our
  73. subscribers has reported to Risc Developments. When using Ovation in
  74. certain 256-colour screen modes, inverted text, i.e. white on black,
  75. becomes black on black! Risc Developments say they have a partial
  76. solution and are working further on the problem. Ed.)
  77. 7.6
  78. Å  Keystroke hints Ö Iæve just started using Keystroke myself, in
  79. earnest, and, quite frankly, it is brilliant! It will save me huge
  80. amounts of time with all the text editing I do from day to day. For
  81. example, contributors often say, öPress the menu button to do such and
  82. suchò instead of öPress <menu>... ò. I now click on ötheò and press
  83. <alt-f6> and the change is made at a stroke! It is done by making the
  84. key insert the text |D<60>\S-ë\\ê\<62>|D. The <60> and <62> have to be
  85. used to create the triangle brackets which, as a beginner to Keystroke,
  86. confused me for a while.
  87. 7.6
  88. I find Impressionæs <shift-ctrl-Q> useful for inverting charactres (sic)
  89. Ö a very common typing error! However, I sometimes need to change öto
  90. boldly goò into öboldly to goò (yuk!) so I produced a key, <alt-Q>, to
  91. invert adjacent words by using |D\S-ë\|V Ö simple but effective Ö just
  92. put the cursor somewhere in the first word and click <alt-Q>.
  93. 7.6
  94. I often have to delete a comma when someone has put one in the, wrong
  95. place. So <alt-\> generates the string \S-ë\\ê\|? which moves to the
  96. beginning of the next word, back one space and then deletes one
  97. character. This has the effect of deleting the final character of the
  98. word in which you have just clicked, so it could also be used to change
  99. a plural to a singular. The only time this falls down, of course, is
  100. when the next word is separated by an extra character like a bracket or
  101. somesuch.
  102. 7.6
  103. These special keys may seem a little unnecessary but to someone who does
  104. as much editing as I do every day, they can save quite a bit of time.
  105. 7.6
  106. Finally, in the days of programmable function keys on the old BBC Micro,
  107. I used to use |[ to generate an <escape>. This seems to work OK with
  108. Keystroke and avoids having to use \ESCAPE\ in a text string. I remember
  109. it because the [ is like an E for escape.á Ed.
  110. 7.6
  111. (There are a huge number of time-saving tricks that could be done with
  112. Keystroke, so do send in your own Keystroke hints & tips. Ed.)
  113. 7.6
  114. Å  Resultz and Continental numbers Ö I have just discovered a feature
  115. offered by Resultz which should delight Continental spreadsheet users.
  116. The sixth number format in the list offered by the style editor, which
  117. looks so strange with its character combinations ö,.ò and ö.,ò actually
  118. is used to replace the English way of writing numbers with the
  119. Continental one, so that a number like 3,500.50 will appear instead as
  120. 3.500,50!á Jochen Konietzko, K÷ln.
  121. 7.6
  122. Å  RISCáOS !NewLook Ö Now that everybody has had a chance to play with
  123. the new look desktop as distributed at Acorn World 93 (and numerous
  124. other sources), we would be interested to hear what you think of it. Do
  125. you use it? If not why not? Does it do everything it should? How does it
  126. compare to other user environments (e.g. Windows 3.1, NeXT)? What would
  127. your ideal RISCáOS 4 desktop look like? Please write to Archive with
  128. your comments.
  129. 7.6
  130. Å  Schedule and Spell (Pocket Book) Ö There seems to be no mention at all
  131. of Spell in any of the manuals, except for a section in the User Guide
  132. on how to spell-check in Write. The Schedule release note says that
  133. öthis replaces the Spell application supplied with your Pocket Bookò,
  134. but does not tell you that you shouldnæt delete Spell before installing
  135. Schedule. If you do this, as I did, you find, somewhat oddly, that you
  136. can check spelling in Write but that you canæt save to the global
  137. dictionary Ö you canæt, of course, use Spell as a free-standing
  138. application because it isnæt on the Desktop. If you reinstall Spell,
  139. from whichever drive you have Schedule in, all works as it should,
  140. though you have to learn how to use Spell from the Help facility, which
  141. is very good.
  142. 7.6
  143. Nowhere seems to make it plain, however, that to use document
  144. dictionaries, you have to enable this from the Setup/Install menu in
  145. Spell. Incidentally, document dictionaries are not kept in the WRD
  146. directory with öthe same name and in the same directory as the document,
  147. but with the file extension D$Sò, as the manual says, but in a separate
  148. D$S directory with the same name as the document.á Peter Young,
  149. Cheltenham.
  150. 7.6
  151. Å  Style Ö Changing date and time formats Ö Impression Style allows the
  152. current date or time to be inserted into a document. By default,
  153. Impression Style enters É25th January 1994æ for the date and É6:52:13
  154. amæ for the time. Both formats may be changed quite easily. You can have
  155. several different date and time formats stored and swap from one to the
  156. other while you work.
  157. 7.6
  158. The date is inserted in one of three ways.
  159. 7.6
  160. Å  By pressing <ctrl-shift-D>
  161. 7.6
  162. Å  By clicking on the insert icon on the tool bar and clicking on Current
  163. date
  164. 7.6
  165. Å  From the menu: UtilitiesÖ>InsertÖ>Current date
  166. 7.6
  167. The time is inserted in one of two ways
  168. 7.6
  169. Å  By clicking on the insert icon on the tool bar and clicking on Current
  170. time
  171. 7.6
  172. Å  From the menu: UtilitiesÖ>InsertÖ>Current time
  173. 7.6
  174. The format used for the time and the date is stored in special system
  175. variables called Style$TimeFormat and Style$DateFormat. These variables
  176. are not mentioned in the printed manual and are given wrongly in the
  177. early versions of the on-line help as Impression$TimeFormat and
  178. Impression$DateFormat. If the user does not set these variables, the
  179. !Run file sets them automatically.
  180. 7.6
  181. To set the variables, find your RISCáOS 3 User Guide and find the
  182. section on System Variables. This gives a table explaining (not very
  183. well!) how to set the time and date variables. There isnæt space here
  184. for a tutorial but the Impression Style defaults are written
  185. %z12:%mi:%se %pm for the time which appears as É7:27:07 amæ and for the
  186. date, %zdy%st %mo %ce%yr which appears as É25th January 1994æ.
  187. 7.6
  188. You can reset the two system variables temporarily as follows: press
  189. <f12> and type, for example, Set Style$TimeFormat %z24:%mi then press
  190. <return> twice to return you to the desktop. Now insert the time in an
  191. Impression Style document and you should get the current time in the
  192. format É7:30æ instead of É7:30:01 amæ.
  193. 7.6
  194. The ötimeò doesnæt have to be confined to the time Ö you can add the
  195. date to the time format just as you can add the time to the date format.
  196. So you could use the ötimeò and the ödateò as two different versions of
  197. the date.
  198. 7.6
  199. When writing letters I like <ctrl-shift-D> to give me É25th January
  200. 1994æ but when I am writing notes from the telephone, which I do a lot,
  201. I like to date and time stamp them so I prefer É7:36 Tue 25 Jan 94æ.
  202. This means that you can have a keyboard shortcut for entering the time
  203. combined with, or instead of, the date.
  204. 7.6
  205. To do this, you just need two Obey files. Load !Edit from the Apps icon.
  206. From the Edit menu, choose MiscÖ>Set Type and then delete the offered
  207. Text and enter Obey and press <return>. Into the edit window type:
  208. 7.6
  209. Set Style$DateFormat ö%z24:%mi %W3 %zdy %m3 %yr ò
  210. 7.6
  211. Press <return> and save the file to disc calling it DateTime. After you
  212. have double-clicked on this file icon, you should see the current time
  213. and date in the format É7:36 Tue 25 Jan 94æ.
  214. 7.6
  215. You now need another similar file to restore the default. Create another
  216. Obey file in Edit and this time it should say simply:
  217. 7.6
  218. Set Style$DateFormat öò
  219. 7.6
  220. When Impression Style sees that the variable is set to null, it uses the
  221. format in the !Run file. Save this file, preferably as something
  222. meaningful like DateDeflt.
  223. 7.6
  224. Now store the two files on your Pinboard so that you can double-click on
  225. whichever format you want.
  226. 7.6
  227. If you want to change the format automatically, as Style loads on start-
  228. up, put a line in your !Boot file, after Style is loaded, to set the
  229. system variables mentioned above. If you want to change the default
  230. format permanently, you can amend the !Run file in Style though this is
  231. not normally recommended and you should always keep a backup copy of the
  232. original !Run file. If you donæt know where to find the !Run file, or
  233. how to alter it, itæs probably best not to do it!á Paul Lewis, London
  234. W3.
  235. 7.6
  236. Å  Style Ö Saving files as documents Ö Impression Style allows files to
  237. be saved as documents rather than directories. The advantage is that a
  238. document takes up far less space than a directory. If you store files
  239. compressed, perhaps as a backup, a file can be compressed much more
  240. efficiently than a directory.
  241. 7.6
  242. There is no utility to go through your entire hard disc to convert all
  243. those space-hungry directories into files, but you can convert them as
  244. you use each directory quite simply. Load a number of the old-type
  245. Impression documents Ö Style will warn you that the document is in an
  246. old format and may warn you about things it canæt convert or find.
  247. Remember that instead of clicking on OK to these warnings, you can just
  248. press <return>.
  249. 7.6
  250. You can load up to sixteen documents, memory permitting. Click in the
  251. top document and press <ctrl-shift-Y>. That toggles the file save
  252. routine to save the document as a file rather than as a directory. Press
  253. <f3> then <return> to save it. Although its name still begins with a
  254. É!æ, it is now a file and not a directory and will have the Style icon
  255. instead of the old ÉIæ icon.
  256. 7.6
  257. Now press <ctrl-f2> to remove the document from memory and then go
  258. through the stack of documents in the same way. Itæs not automatic but
  259. it is quite quick. How much you save will depend on your disc filing
  260. system but I saved about 14Kb per document. Documents can be stored as
  261. files but long documents might be best left in the old format,
  262. especially ones that are so long that you have to load and edit chapters
  263. separately to fit them in memory.
  264. 7.6
  265. If you have a backup of your hard disc (and if you donæt, start one
  266. now!) you may find that RISCáOS will not overwrite a directory with a
  267. document of the same name. The answer is to alter a system variable
  268. called Copy$Options. To do that, press <f12> and enter Set Copy$Options
  269. F then press <return> twice. That should force RISCáOS to overwrite the
  270. directory with a file when you backup. There is more on these options
  271. for copying in the User Manual under *Copy.á Paul Lewis, London W3.
  272. 7.6
  273. Å  Tables (again) Ö I often have to make up tables and have always been
  274. frustrated by the fact that wordprocessors work essentially in lines
  275. while data for tables usually comes in the form of columns. It would be
  276. great to be able to pour the data into the WP side by side.
  277. 7.6
  278. The only way around it that I have found within Impression is to
  279. generate sufficient side by side columns. If you want a master page to
  280. do this, make one with the requisite number of columns and then unlink
  281. them by cutting and pasting them back with the same co-ordinates and
  282. dimensions.
  283. 7.6
  284. An easier way, particularly for numerical tables but also for text, is
  285. to assemble the tables in a spreadsheet which will accept column data
  286. and then transfer the finished arrangement back to the WP in the form of
  287. a CSV file of the block of data.
  288. 7.6
  289. I use Schema which is particularly amenable in that CSV files of data
  290. can be input just by dragging them onto a marker and columns (data
  291. separated by returns) will load as columns. It is not necessary to do
  292. any more than ensure that the sheet is large enough to take the longest
  293. line/column. If the basic CSV input filter is set on Impression, all the
  294. commas will be converted to tabs and you get an instant table by
  295. applying a suitable table style. The input filter, CSV+, in the Business
  296. Supplement will automatically generate tables for the non-table literate
  297. Ö in a somewhat complicated way!á Bob de Vekey, Watford. 
  298. 7.6
  299. Å  Time errors (continued) Ö Further to Matthew Hunteræs item on time
  300. errors (7.4 p51), the situation is actually significantly more complex
  301. than described. The CLib time commands will not give the correct answer
  302. if the cumulative effect of TimeZone and DST (e.g. BST) is negative.
  303. Setting TimeZone to zero is not going to be a valid solution if you
  304. donæt live in the UK.
  305. 7.6
  306. I encountered this problem some time ago during the development of
  307. ArcTrack. The problem is particularly acute in this case since the
  308. program needs to know both UTC (for the orbital mathematics) and Local
  309. Time (to display to the user). I will attempt below to describe the
  310. solution which I developed. It may not be the simplest general solution
  311. but it solved my particular problem.
  312. 7.6
  313. This first code fragment determines the difference between local time
  314. and UTC in seconds. It will be necessary to make a new copy of swi.h for
  315. RISC OS 3 if this has not already been done. The SWI_List program
  316. provided with the compiler will achieve this.
  317. 7.6
  318. #include öos.hò
  319. 7.6
  320. #include öswi.hò
  321. 7.6
  322. int utc_offset ()
  323. 7.6
  324. {temp ;
  325. 7.6
  326.   os_swi2r (Territory_ReadCurrentTimeZone, 0, 0, (int*) NULL, &temp);
  327. 7.6
  328.   return temp / 100; /* Output of SWI is in centiseconds */
  329. 7.6
  330. }
  331. 7.6
  332. The secret of extracting the correct current value of UTC time is to use
  333. os_word 14, thus:
  334. 7.6
  335. #include öos.hò
  336. 7.6
  337. double utc_time () /* Would be significantly simpler if long ints were
  338. 64 bits */
  339. 7.6
  340. {{ unsigned int a, b; }
  341. 7.6
  342.   double un_int = 4294967295.0;
  343. 7.6
  344.   struct five_byte now = {3 , 0};
  345. 7.6
  346.   os_word (14, (void*) &now);  /* Determine current UTC time */
  347. 7.6
  348.   return((double) temp.a + (double) temp.b * un_int) /100.0;
  349. 7.6
  350. }
  351. 7.6
  352. The value returned is the number of seconds since 1st January 1900. Of
  353. course, this is not the same as the time_t values returned by the CLib
  354. Étimeæ function. To convert to time_t values, you could assume
  355. (correctly) that they are unsigned integers representing the number of
  356. seconds since 1st January 1970. Just remember that, under ANSI C, this
  357. simple representation is not guaranteed and Acorn are perfectly entitled
  358. to change it in future compiler releases.á R C Simpson,  Farnborough.
  359. 7.6
  360. Å  Writing extensions to PC Discs Ö Some people have had difficulty
  361. writing to PC discs and giving a file an appropriate extension that a PC
  362. will be able to read Ö the infamous README.TXT file, for example.
  363. RISCáOS 3 gives desktop access to DOS discs but it makes the discs
  364. appear as a standard RISCáOS disc. The only way to tell that it is
  365. different is to check the size using free or current format from the
  366. floppy disc iconbar menu.
  367. 7.6
  368. The problem arises due to the different way in which RISCáOS and DOS use
  369. directory specifiers. DOS uses the É/æ character to specify a
  370. subdirectory whereas RISCáOS uses the full stop. The DOS path öSOME/DIR/
  371. STRUCTò would be öSOME.DIR.STRUCTò within RISCáOS . Therefore, if you
  372. try to write the file README.TXT to a RISCáOS disc, what you are
  373. actually trying to do is save the file TXT into a directory called
  374. README Ö which probably does not exist.
  375. 7.6
  376. To write a file with an extension, use the É/æ character, e.g. README/
  377. TXT. This can be a little confusing because, if you write the file to an
  378. Acorn formatted disc, the É/æ character will be part of the filename but
  379. if you write to a DOS disc, the file will be saved as ÉREADMEæ with an
  380. extension of TXT. The screenshot below shows the RISCáOS directory
  381. display and the PC Emulator directory showing that the file does appear
  382. with an extension.
  383. 7.6
  384. Many save boxes will only allow you to use names of up to 10 characters
  385. Ö this therefore limits you to a six character filename (with a four
  386. character extension ö/XXXò). However, the DOS filer within RISCáOS will
  387. allow you to rename a file to eight characters, giving a total of
  388. twelve.
  389. 7.6
  390. It should also be noted that if you copy a file from a DOS disc to a
  391. RISCáOS disc and back again, the extension may change. This is again due
  392. to the name length restrictions. README2.TXT would be copied as README2/
  393. TX for RISCáOS . When copied back to DOS, the file would therefore be
  394. README2.TX.á Matthew Hunter, NCS.ááA
  395. 7.6
  396.