Title: Automate large type for viewing, and small for printing. Post by: Roger on April 07, 2008, 03:13:06 pm Automate large type for viewing, and small for printing -- Part I.
¯¯¯¯¯¯¯¯ ¯¯¯¯ ¯ ¯¯ ¯¯¯ ¯¯¯¯¯¯ ¯¯¯ ¯¯¯¯ ¯¯ ¯¯¯¯¯ ¯¯¯ ¯ by Roger A. Jacobson 7.April 2008 I have downloaded several identical copies of Win32Pad to my flash drive, and I make simultaneous use of them all as portable apps. They live on the same flash drive in several specific directories for several specific tasks. I take them with me everywhere. All the Win32P executables, or EXEs, that I use are copies or instances of the same EXE or main program. What makes it possible to dedicate a respective instance of Win32Pad to a specific task is the respective INI which is allowed to accompany each instance of the program's EXE. Each EXE then has its very own INI, and the two live together in the same folder. The INI in a folder contains the configurations for the EXE. The default behavior by contrast of Win32Pad (which is easily overcome and customized) is to use a single INI file for any and all W32P EXEs you may have set up in any and all directories (folders) on your drive. This does not work for flash. The single INI for all such EXEs defaults to a single hard-drive location, someplace like C:\Programs and Settings — including when you run Win32Pad on flash drive. To overcome for our benefit this default behavior, especially for flash, we are able to create a nearly zero-length file which will become the INI for each respective Win32Pad.exe to write to. One way to customize is like this: In a folder where you have a win32pad.exe, open (load up) that EXE by e.g. double left-clicking on it in the Windows file manager. (Get to the file manager on most systems by holding down WinKey and tapping e, or right-click on START and pick Open. Navigate to the folder and open the folder with a right-click and pick Open or tap o.) What you will see open up after you click on the EXE is of course a blank typing area inside of Win32Pad. Tap ENT once. Open the File menu to Save As. TAB to or click Save in: and navigate to the folder where the EXE is that you clicked on (if i.e. what's written there is different from that folder). TAB to or click in File name and type (without quotes) «win32pad.ini» and TAB once to Save as type; tap DN-arrow and END to All Files [ENT]; TAB once to Save and tap [ENT]. Exit via menu, or by ALT+F4. Note: the Windows file manager typically rounds up the size of this new .ini to 1KB. Its initial size is actually a few bytes. This particular win32pad.exe will henceforth write to and read from this particular INI-file. Do your settings. The reason it does so is that any given win32pad.exe first looks in its own folder for any INI-file which you may have provided: like we did just now. This EXE can now have its own individual type-face and so on. And these settings are not on C: but on your portable flash-drive. In short, several copies of the win32pad.exe, along with a specific configuration-file (INI) which accompanies each one individually, allow one to run (what I call) several individual instances of the program. They can all run individually at the same time. A person easily tells them apart visually by how their individual appearance on-screen has been configured. Title: Re: Automate large type for viewing, and small for printing. Post by: Roger on April 07, 2008, 03:18:38 pm Automate large type for viewing, and small for printing -- Part II.
¯¯¯¯¯¯¯¯ ¯¯ ¯ ¯ ¯¯ ¯¯ ¯¯¯¯¯ ¯¯¯ ¯¯¯¯ ¯¯ ¯¯¯¯¯¯ ¯¯¯¯ ¯ One instance I use of Win32Pad is dedicated to newspaper articles. It is a real plus that Win32Pad lets me copy over a live link along with the news text from the Internet. That all articles are preserved in plain text keeps files small for each article. I for one don't need anything but word wrap and a good-looking font. For viewing in Win32Pad news articles which I've copied over from online versions, I use what is, for printing, a huge font size: 18. I've meanwhile configured the background colour to look like a hard copy of the Financial Times (orange-y). A Garamond type face in medium-dark olive views nicely against the pale salmon. But printing needs a smaller type face, unless the result is to look like a book for very young children. And it needs jet-black letters. Word wrap ON makes a page look good whether viewed or printed. — Why not, I thought, have two INIs and switch between them? Because all win32pad.ini files are themselves in plain text, it is easy to switch between an INI for viewing and an INI for printing, and to keep straight which is which. I keep all my news articles on flash-drive, in their own «News_Articles» folder. The instance of Win32Pad I use to read them dwells in a sub-folder beneath that one I've named by «Win32Pad_Editor». Now text files (for beginners) do not need to end in «.txt». I use «.nws» for newspaper articles. The working environment I operate in is not so much the desktop that the university network provides, as a Commander-type file manager which I run from flash, and which does not write to the Registry or anywhere else on the host computer or network (I use FreeCommanderPortable). In the Commander when I scroll inside of the News_Articles folder to an .nws file and press [F4], the Commander (which is programmable) loads the file into the editor I specify: into viz. my Win32Pad in the sub-folder. (A Commander-type file manager has more features than the file manager that ships with Windows.) What I see is displayed on-screen in Garamond 18. When I want to print, I exit temporarily; switch to a print-config (as explained in Part III); re-load the .nws; and print. — While I'm at it, I might print some other .nws files too. The batch file in Part III below lets me do that. Then I exit and let that same batch file switch my Win32P back to viewing mode. I keep to Garamond for both viewing and printing. The first batch file (in Part III) contains its own manual set off by double colons. The second, smaller, batch file invokes the first and may be copied to any folder where you might additionally have your copy-and-paste versions of online articles — with viz. the .nws extension you have given to them when you name the file and save it from Win32P to flash-drive. Not all articles you want to refer to stay on-line forever, and it's nice to have them at hand on take-with-you flash. If you are working from a Commander file-manager, CTRL+D (or similar) provides a command-prompt when you need it. Otherwise, do a WinKey+R and type CMD [ENT]. The command-prompt is useful to run the second batfile «stfs.bat» (you don't have to type the .bat). Stfs is easy to type with the left hand while the right hovers over the [ENTER] key. If you prefer, you are always able to run a batfile by double left-clicking on it inside of the Windows file manager (batfiles show with gear-icons). A Commander provides an [F5] key which is easier than typing «copy filename destination». In any case you'll want to copy the stfs.bat over to the parent folder News_Articles. Contained in the sub-folder Win32Pad_Editor, conveniently out of sight from the .nws files, are the following: win32pad.exe, -.cnt, -.hlp, -.ini and a history- and readme.txt. In Part III we will add two batfiles (.bat) to this list of items. If you are not working from a Commander but from the Windows file-manager, you will still be able to display your .nws files inside your configured Win32Pad: Right-click on an .nws and pick Open With and then navigate to the News_Articles\Win32Pad_Editor folder and pick win32pad.exe. After you do this Open With routine once, the file-manager will «remember» your choice and [typically] present Win32Pad under a highlighted «Recommended» [OK]. Title: Re: Automate large type for viewing, and small for printing. Post by: Roger on April 07, 2008, 03:45:25 pm Automate large type for viewing, and small for printing -- Part III.
¯¯¯¯¯¯¯¯ ¯¯¯¯ ¯¯¯¯ ¯¯ ¯¯¯¯¯¯ ¯¯ ¯¯¯¯¯ ¯¯ ¯¯¯¯¯¯ ¯¯¯¯ ¯¯ Change to the subdirectory Win32Pad_Editor which we've created below the directory N:\News_Articles, where N = letter Windows assigns to the flash. (In the Windows file-manager, do a right-click and tap letter «o».) If you haven't any Notepad-like editor set up elsewhere on your flash (except the Win32Pad, which with Garamond configured will not render everything in the batfiles below 100% correctly), simply invoke plain old Notepad for now, which is probably already using some monospace font like Courier New or Lucida Console = what we want. Get to Notepad by START->All Programs -> Accessories, or by WinKey+R and type notepad [ENT]. Click File -> Save As and navigate to the Win32Pad_Editor subdirectory. Click the DN-arrow by «Files of type» and click All Files. Shift+TAB once to (or click) File name and type «Switch_INI_INK_W32P.bat» (no quotes) and TAB twice to SAVE [ENT]. Copy and paste the first batfile into Notepad and save. Click File->New and copy and paste the second batfile into Notepad. Click File->Save As and (as before) pick All Files and (in File name) type «stfs.bat» (no «») -> [SAVE]. Do File -> Exit or (from keyboard) ALT+F4 to quit from Notepad. Switch_INI_INK_W32P.bat Code: @echo off & goto go stfs.bat Code: @echo off & cls The first .bat always stays in the sub-folder. The second, shorter batch file can be copied to anywhere (including to the «parent» folder [«parent directory»] News_Articles where .nws files reside.) - - - - - - - - - - - - - - - - - - - - - «Es stimmt nicht, daß die Kühe Milch geben -- Die Bauern nehmen sie ihnen einfach weg.» (Radio Holiday) - - - - - - - - - - - - - - - - - - - - - Submitted by © Roger A. Jacobson 2008. All rights reserved. Alle Rechte vorbehalten der Übersetzung einschließlich. This document may be freely distributed without alteration of its contents, ——— in keeping with the license agreement of Win32Pad. Reviewers may quote freely citing source. |