home *** CD-ROM | disk | FTP | other *** search
/ PC Open 46 / pcopen46.iso / Utili / NoteTabLight / Setup.exe / Main / D: / Prod / SetUp / NoteTab / Libraries / Utilities.clb < prev    next >
Encoding:
Text File  |  2000-10-25  |  40.7 KB  |  958 lines

  1. = V5 MultiLine NoSorting TabWidth=30
  2.  
  3. H=";About this library"
  4. This library was written by Fookes Software to serve as a demonstration of the varied tasks that can be performed by the Editor Clipbook. You are free to customize it any way you like!
  5.  
  6. You can get more information about each Clip, and how they should be used, by double-clicking on their colored section title.
  7.  
  8. If you have a useful Clipbook library that you would like to share with other NoteTab users, please submit it to: <clipbook@notetab.com>. Your library will then be added to the Clipbook repository on the web.
  9.  
  10.  
  11. H=";"
  12.  
  13.  
  14. H=";Clipbook Manager"
  15. Below, you will find a brief explanation about each Clip under this topic.
  16.  
  17. 1) Switch Library:
  18. Provides an alternative way to switch to another Clipbook library, and optionally hide the list.
  19.  
  20. 2) Install Libraries:
  21. Use this Clip to install libraries stored in other directories or disks. For example, libraries downloaded from the Internet or copied to a diskette from another computer. The Clip will copy the chosen libraries to NoteTab's Libraries subdirectory.
  22.  
  23. 3) Remove Libraries:
  24. You might have some libraries you created for temporary purposes, or that you downloaded from the Internet to try out but don't want to keep. This Clip makes it easy to remove those libraries. It sends them to the Windows recycle bin.
  25.  
  26.  
  27. H="Switch Library"
  28. ;Store list of library names in the variable LibraryList
  29. ^!Clip FillLibraryList
  30.  
  31. ;Show Clip wizard
  32. ^!Set %ShowClipbook%=^?{(T=C)Show Clipbook window?==_Yes|No}; %LibraryName%=^?{(H=10)Choose a library==_^%LibraryList%}
  33. ;Show or hide Clipbook window based on user's choice
  34. ^!ShowClipbook ^%ShowClipbook%
  35. ;Open chosen library. Remove first space character added by FillLibraryList Clip
  36. ^!LoadLibrary ^$StrDelete("^%LibraryName%";1;1)$
  37. ^!IfError Next ELSE Skip
  38. ^!Prompt Error: could not open "^%LibraryName%"
  39.  
  40.  
  41. H="Install Libraries"
  42. ;Clear variable in case it has been used previously
  43. ^!ClearVariable %LibraryList%
  44. ;Get value of last install directory from INI file, if available
  45. ^!Set %LibraryInstallPath%=^$GetValue(LibraryInstallPath)$
  46. ;Initialize variable for library search directory if it is empty
  47. ^!IfTrue ^$IsEmpty(^%LibraryInstallPath%)$ Next ELSE Skip
  48. ^!Set %LibraryInstallPath%=^$GetTmpPath$
  49.  
  50. ;Get library names to install
  51. ^!SetArray %LibraryNames%=^?{(T=O;S=M;F="Clipbook libraries (*.clb)|*.clb")Select libraries to install (no wildcards)=^%LibraryInstallPath%}
  52. ;Copy the value representing the number of items into the Count variable. The variable at index 0 indicates the number of items in the array
  53. ^!Set %Count%=^%LibraryNames0%
  54. ;If no files were chose, leave the loop
  55. ^!If ^%Count% = 0 Exit
  56. ;Check if first file exists; end the Clip if it doesn't
  57. ^!IfFileExist "^%LibraryNames1%" Continue ELSE Next
  58. ^!Prompt Error: "^%LibraryNames1%" not found
  59. ^!Goto Exit
  60.  
  61. :Continue
  62. ;Get path of libraries to install
  63. ^!Set %LibraryInstallPath%=^$GetPath("^%LibraryNames1%")$
  64. ;If path is same as libraries directory, then they are already installed so end Clip
  65. ^!IfSame "^%LibraryInstallPath%" "^$GetLibraryPath$" Exit
  66. ;Save install directory to INI file for eventual reuse
  67. ^!SaveValue LibraryInstallPath=^%LibraryInstallPath%
  68.  
  69. ;Initialize the Index variable to 0
  70. ^!Set %Index%=0
  71.  
  72. ;Beginning of loop
  73. :StartLoop
  74. ;Add one to the value contained in the variable Index
  75. ^!Inc %Index%
  76. ;End the Clip if the Index number is greater than the Count number
  77. ^!If ^%Index% > ^%Count% EndLoop
  78. ;Copy the library file name corresponding to the current index value to a variable. The content of the array's indexed variable is used here
  79. ^!Set %LibraryName%=^%LibraryNames^%Index%%
  80. ;Check if chosen library really exists
  81. ^!IfFileExist "^%LibraryName%" Next ELSE NotFound
  82. ;Check if library already exists in Libraries directory
  83. ^!IfFileExist "^$GetLibraryPath$^$GetFileName("^%LibraryName%")$" Next ELSE CopyLibrary
  84. ;Prompt user if library already exists and is going to be overwritten
  85. ^!Skip "^$GetFileName("^%LibraryName%")$" is already installed. Overwrite it?
  86. ;Jump back to the start of the loop if user answers no
  87. ^!Goto StartLoop
  88.  
  89. :CopyLibrary
  90. ;Copy library into Libraries directory
  91. ^!CopyFile "^%LibraryName%" "^$GetLibraryPath$"
  92. ;Append library name without path and extension to variable. Name is preceded with a space in case it starts with a special character. This space will have to be removed later
  93. ^!Append %LibraryList%= ^$GetName("^%LibraryName%")$|
  94. ;Jump back to the start of the loop
  95. ^!Goto StartLoop
  96.  
  97. :NotFound
  98. ^!Prompt Error: "^%LibraryName%" not found
  99. ^!Goto StartLoop
  100.  
  101. :EndLoop
  102. ^!Refresh
  103.  
  104. ;Get size of library list
  105. ^!Set %SizeList%=^$StrSize("^%LibraryList%")$
  106. ;Substract one from the SizeList value
  107. ^!Dec %SizeList%
  108. ;Format list so it can be used in Clip wizard
  109. ^!Set %LibraryList%=^$StrCopy("^%LibraryList%";1;^%SizeList%)$
  110.  
  111. ;Show appropriate wizard based on the number of installed libraries
  112. ^!If ^%Count% = 1 Next ELSE ChooseLibraryPrompt
  113. ;Copy library name from list variable to LibraryName variable
  114. ^!Set %LibraryName%=^%LibraryList%
  115. ;Show Clip wizard
  116. ^!Set %OpenLibraryName%=^?{(T=C)Would you like to open the new library?==_Yes|No}; %ShowClipbook%=^?{(T=C)Show Clipbook window?==_Yes|No}
  117. ;Jumpt to OpenLibrary label if user wants to open the newly installed library, otherwise end the Clip
  118. ^!IfTrue ^%OpenLibraryName% OpenLibrary ELSE Exit
  119.  
  120. :ChooseLibraryPrompt
  121. ;Show Clip wizard
  122. ^!Set %LibraryName%=^?{(H=5)Open new library?==_^%LibraryList%}; %ShowClipbook%=^?{(T=C)Show Clipbook window?==_Yes|No}
  123.  
  124. :OpenLibrary
  125. ;Show or hide Clipbook window based on user's choice
  126. ^!ShowClipbook ^%ShowClipbook%
  127. ;Remove first space character added by the Append instruction
  128. ^!Set %LibraryName%=^$StrDelete("^%LibraryName%";1;1)$
  129. ;Open chosen library
  130. ^!LoadLibrary ^%LibraryName%
  131. ^!IfError Next ELSE Skip
  132. ^!Prompt Error: could not open "^%LibraryName%"
  133.  
  134.  
  135. H="Remove Libraries"
  136. ;Store list of library names in the variable LibraryList
  137. ^!Clip FillLibraryList
  138.  
  139. ;Show Clip wizard
  140. ^!SetArray %LibraryNames%=^?{(H=10;T=A)Choose libraries to remove=^%LibraryList%}
  141. ;Copy the value representing the number of items into the Count variable. The variable at index 0 indicates the number of items in the array
  142. ^!Set %Count%=^%LibraryNames0%
  143. ;If no files were chose, leave the loop
  144. ^!If ^%Count% = 0 Exit
  145.  
  146. ;Initialize the Index variable to 0
  147. ^!Set %Index%=0
  148.  
  149. ;Beginning of loop
  150. :StartLoop
  151. ;Add one to the value contained in the variable Index
  152. ^!Inc %Index%
  153. ;End the Clip if the Index number is greater than the Count number
  154. ^!If ^%Index% > ^%Count% EndLoop
  155. ;Copy the library file name corresponding to the current index value to a variable. The content of the array's indexed variable is used here. Remove first space character added by FillLibraryList Clip
  156. ^!Set %LibraryName%=^$StrDelete("^%LibraryNames^%Index%%";1;1)$
  157. ;Remove the library by sending it to the Windows recycle bin
  158. ^!RecycleFile "^$GetLibraryPath$^%LibraryName%.clb"
  159. ;Jump back to the start of the loop
  160. ^!Goto StartLoop
  161.  
  162. :EndLoop
  163. ^!Refresh
  164. ^!Prompt ^%Count% libraries removed
  165.  
  166.  
  167. H="_FillLibraryList"
  168. ;Clear variable in case it has been used previously
  169. ^!ClearVariable %LibraryList%
  170. ;Retrieve first library name that matches specified search criteria
  171. ^!Set %LibraryName%=^$GetFileFirst(^$GetLibraryPath$;"*.clb";Name)$
  172. ^!IfTrue ^$IsEmpty(^%LibraryName%)$ End
  173.  
  174. :StartLoop
  175. ;Append library name without path and extension to variable. Name is preceded with a space in case it starts with a special character. This space will have to be removed later
  176. ^!Append %LibraryList%= ^$GetName("^%LibraryName%")$|
  177. ;Get next matching library name and go back to start of loop
  178. ^!Set %LibraryName%=^$GetFileNext$
  179. ;If the library name variable contains text, continue the loop
  180. ^!IfFalse ^$IsEmpty(^%LibraryName%)$ StartLoop
  181.  
  182. ;Close the file-find variable to restore system resources
  183. ^!CloseFileFind
  184.  
  185. ;Get size of library list
  186. ^!Set %SizeList%=^$StrSize("^%LibraryList%")$
  187. ;Substract one from the SizeList value
  188. ^!Dec %SizeList%
  189. ;Format list so it can be used in Clip wizard
  190. ^!Set %LibraryList%=^$StrCopy("^%LibraryList%";1;^%SizeList%)$
  191.  
  192.  
  193. H=";"
  194.  
  195.  
  196. H=";Text Processing"
  197. Below, you will find a brief explanation about each Clip under this topic.
  198.  
  199. 1) Paste Internet acronym:
  200. When you activate this Clip, a Clip wizard will popup with a list of sentences that correspond to common Internet acronyms. Just double click on the item that you want to use and the corresponding acronym will be pasted in your document at the cursor position.
  201.  
  202. 2) Underline title:
  203. First place the cursor on the line you would like to underline, then activate the Clip. The Clip wizard will then let you choose the type of character to use for producing the underline text.
  204.  
  205. 3) Compare two files:
  206. The Clip uses the DOS command "fc" to compare the differences between two disk files. Although you can choose any two files you want to compare, NoteTab will offer the current document name by default for the first file. If necessary, NoteTab saves a temporary copy of the current document before starting the comparison program. Note that the Clip converts long file names to DOS short names so that they can be accepted by the "fc" utility.
  207.  
  208. 4) Enable AutoCorrect mode:
  209. When you activate this Clip, it will open the AutoCorrect library and then hide the Clipbook window. Auto-replace mode will be enabled and your typing will be checked for matching items in the library. If a typo is found, it will automatically be replaced with the correct spelling.
  210.  
  211.  
  212. H="Paste Internet acronym"
  213. ^?[(H=8)Choose acronym to paste==_By the Way^=BTW|For What it's Worth^=FWIW|For Your Information^=FYI|I Am Not A Lawyer^=IANAL|In Any Event^=IAE|In My Considered Opinion^=IMCO|In My Humble Opinion^=IMHO|In My Opinion^=IMO|In Other Words^=IOW|Just One of Those Things^=JOOTT|Laughing Out Loud^=LOL|No Reply Necessary^=NRN|On the Other Hand^=OTOH|Real Soon Now [Which May be a Long Time Coming]^=RSN|Rolling on Floor Laughing^=ROFL|Rolling on the Floor Laughing^=ROTFL|Still in the Dark^=SITD|Thanks in Advance^=TIA|There Ain't No Such Thing as a Free Lunch^=TANSTAAFL|Three Letter Acronym^=TLA|Tongue in Cheek^=TIC|With Respect To^=WRT]
  214.  
  215. H="Underline title"
  216. ;Underlines with the chosen character the line at the cursor
  217. ;Ensure input focus returns to document
  218. ^!FocusDoc
  219. ;Place the cursor at the end of the line
  220. ^!Jump LINE_END
  221. ;Determine the line length
  222. ^!Set %TitleLength%=^$Calc(^$GetColScreen$-1)$
  223. ;Cancel procedure if the line is blank
  224. ^!If ^%TitleLength% < 1 Exit
  225. ;Insert line break followed by sequence of underline characters
  226. ^!SetPasteIndent Off
  227. ^!InsertText ^P^$StrFill(^?{Underline character=_»|=|-|~|^|¿|╖};^%TitleLength%)$
  228.  
  229. H="Compare two files"
  230. ;The Clip uses the DOS command "fc" to compare the differences between two disk files. If necessary, NoteTab saves a temporary copy of the current document before starting the comparison program
  231. ;Define the delimiter for the checkbox field
  232. ^!SetListDelimiter " "
  233. ;Prompt for file names and option settings used to control the comparisor
  234. ^!Set %File1%="^?{(T=O)Compare file=^**}"; %File2%="^?{(T=O)With file=^$GetPath("^**")$}"; %Options%=^?{(H=5;T=A)Switches=_Compares files as ASCII text^=/L|Ignore character case^=/C|Display only first+last lines^=/A|_Do not expand tabs to spaces^=/T|Display line numbers on an ASCII comparison^=/N}
  235. ;End the procedure if no file is specified
  236. ^!IfTrue ^$IsEmpty("^%File1%")$ End
  237.  
  238. ;Set output file name in a variable
  239. ^!Set %OutputFile%=^$GetName("^%File1%")$.dif
  240. ;Convert long file names to DOS short names
  241. ^!Set %File1%=^$GetShort("^%File1%")$
  242. ^!Set %File2%=^$GetShort("^%File2%")$
  243. ;Copy the file path in a variable
  244. ^!Set %Path%=^$GetPath("^%File1%")$
  245.  
  246. ;If both files being compared are in the same directory, remove the path part from the second file name
  247. ^!IfSame "^%Path%" "^$GetPath("^%File2%")$" Next ELSE Skip
  248. ^!Set %File2%=^$GetFileName("^%File2%")$
  249.  
  250. ;Create and save the command line in a variable
  251. ^!Set %Command%=fc ^%Options% ^$GetFileName("^%File1%")$ ^%File2% >^%OutputFile%
  252. ;Show warning if command line exceeds the normal DOS length limit
  253. ^!If ^$StrSize("^%Command%")$ > 127 Warning ELSE Execute
  254.  
  255. :Warning
  256. ^!Info Warning: the DOS command line about to be executed is very long; it might not work. In case of failure, try to shorten the path/file names of the documents you want to compare.
  257.  
  258. :Execute
  259. ;Delete the output file if it already exists (created by earlier comparison)
  260. ^!DeleteFile ^%OutputFile%
  261. ;Set the default path
  262. ^!ChDir ^%Path%
  263. ;Execute the fc command with all parameters
  264. ^!CmdShow Minimize
  265. ^!DOS ^%Command%
  266. ;Wait until the command has finished executing
  267. ^!Wait
  268. ;Copy output name to variable
  269. ^!Set %OutputFile%=^%Path%^%OutputFile%
  270. ;Open the output file if it exists or show error message
  271. ^!IfFileExist ^%OutputFile% Next ELSE Error
  272. ^!Open ^%OutputFile%
  273. ^!Goto End
  274.  
  275. :Error
  276. ^!Info File comparison failed
  277.  
  278. H="Enable AutoCorrect mode"
  279. ;Opens the AutoCorrect library in the Editor Clipbook
  280. ^!LoadLibrary AutoCorrect.clb
  281. ;Hides the Clipbook window
  282. ^!ShowClipbook False
  283.  
  284. H=";"
  285.  
  286.  
  287. H=";Without Clipboard"
  288. The Clips in this section provide typical Clipboard functions without actually using it. The cut and copy procedures actually copy the text selection to a temporary variable in the Clipbook.
  289.  
  290. 1) Copy/paste:
  291. Performs copy and paste operations without using the Windows Clipboard. If text is selected, NoteTab assumes you want to perform a Copy operation. If no text is selected but a Copy or Cut operation has been performed beforehand, Notetab will paste the copied text into the document.
  292.  
  293. 2) Cut/paste:
  294. Performs cut and paste operations without using the Windows Clipboard. If text is selected, NoteTab assumes you want to perform a Cut operation. If no text is selected but a Copy or Cut operation has been performed beforehand, Notetab will paste the copied text into the document.
  295.  
  296. 3) Duplicate line:
  297. Duplicates the line at the cursor.
  298.  
  299.  
  300. H="Copy/paste"
  301. ;Performs copy and paste operations without using the Windows Clipboard
  302. ;If text is selected, NoteTab assumes you want to perform a Copy operation. If no text is selected but a Copy or Cut operation has been performed beforehand, Notetab will paste the copied text into the document
  303. ^!FocusDoc
  304. ^!If ^$GetSelSize$ = 0 Next ELSE CopyText
  305. ^!IfTrue ^$IsEmpty("^%KeepText%")$ End
  306. ^!SetPasteIndent Off
  307. ^!InsertText ^%KeepText%
  308. ^!GoTo End
  309. :CopyText
  310. ^!Set %KeepText%=^$GetSelection$
  311. ^!Jump Select_End
  312.  
  313. H="Cut/paste"
  314. ;Performs cut and paste operations without using the Windows Clipboard
  315. ;If text is selected, NoteTab assumes you want to perform a Cut operation. If no text is selected but a Copy or Cut operation has been performed beforehand, Notetab will paste the copied text into the document
  316. ^!FocusDoc
  317. ^!If ^$GetSelSize$ = 0 Next ELSE CutText
  318. ^!IfTrue ^$IsEmpty("^%KeepText%")$ End
  319. ^!SetPasteIndent Off
  320. ^!InsertText ^%KeepText%
  321. ^!GoTo End
  322. :CutText
  323. ^!Set %KeepText%=^$GetSelection$
  324. ^!InsertText ^%EMPTY%
  325.  
  326. H="Duplicate line"
  327. ;Duplicates the line at the cursor
  328. ^!FocusDoc
  329. ;Start by selecting the current line (or word-wrapped line)
  330. ^!Select Paragraph
  331. ;End the procedure if the line is empty
  332. ^!If ^$GetSelSize$ = 0 End
  333. ;Copy the selection into a variable
  334. ^!Set %ParaText%=^$GetSelection$
  335. ;Place cursor at end of selection and remove highlight
  336. ^!Jump Select_End
  337. ;Check if the paragraph ends with a line break; if not, add one to the front of our copy in the variable
  338. ^!If ^$StrCopyRight("^%ParaText%";2)$ = ^%NL% Skip
  339. ^!Set %ParaText%=^%NL%^%ParaText%
  340. ;Insert copied line back into document
  341. ^!SetPasteIndent Off
  342. ^!InsertText ^%ParaText%
  343.  
  344.  
  345. H=";"
  346.  
  347.  
  348. H=";Internet"
  349. This section offers several useful commands to tidy or generate web pages, or convert HTML documents to plain text.
  350.  
  351. 1) Images to HTML:
  352. This Clip will create a web page based on all the images that match a specified criteria. You can then easily preview all the images in your favorite browser. Before the web page is created, a Clip wizard is displayed so you can choose which directory it should search, what type of images it should include in the page, and the sorting order. The resulting web page displays all the matching images, together with their file name, the picture's dimensions in pixels (width and height), and the file size. You can then put this page together with your pictures on a web server.
  353.  
  354. 2) Tidy HTML code:
  355. This Clip will change the format of your HTML tags and clean up the code in all open HTML documents. The internal NoteTab commands let you choose between upper/lower case tags, or the new XHTML format. If you have installed the HTML Tidy program, you can also change the indenting and column wrap. Furthermore, HTML Tidy can correct minor errors in your code.
  356.  
  357. 3) Convert HTML to text:
  358. This Clip will convert all the HTML documents open in NoteTab into plain text files. A Clip wizard gives you the choice to keep the links in tags or not, and to automatically save the resulting text files or not.
  359.  
  360. 4) Convert Text to HTML:
  361. This Clip will convert all the non-HTML documents open in NoteTab into web pages. A Clip wizard gives you the choice to automatically save the resulting HTML files or not.
  362.  
  363. 5) Convert "Mailto" form:
  364. This Clip will convert output generated by "Mailto" forms into plain text. If text is initially selected in the document, the conversion will only be applied to that part, otherwise the whole document is processed.
  365.  
  366. 6) Outline document to HTML:
  367. Converts the current outline document into a web page with table of contents and links. If the current document is not an outline, the Clip will offer to demonstrate the feature on the Readme.otl document, which is part of the NoteTab package.
  368.  
  369. 7) Outline topics to HTML:
  370. This Clip will convert each outline topic into an individual web page. You can choose whether to keep the created HTML files open in NoteTab or have them closed automatically. If the current document is not an outline, the Clip will offer to demonstrate the feature on the Readme.otl document, which is part of the NoteTab package.
  371.  
  372. 8) Select between tags:
  373. This Clip will select all the text between the type of tag specified by the user. The search starts from the cursor position or the beginning of the text, depending on the users choice.
  374.  
  375. 9) Insert HRef Link:
  376. Opens the Clip wizard so you can choose which web page and description you want to use in the link. The Clip then inserts the HRef tag into your document at the cursor position.
  377.  
  378. 10) Insert Img Link:
  379. Opens the Clip wizard so you can choose which image and ALT description you want to use in the link. The Clip then inserts the Img tag, complete with the image size attributes into your document at the cursor position.
  380.  
  381.  
  382. H="Images to HTML"
  383. ;This Clip will create a web page based on all the images that match the specified criteria. You can then easily preview all the images in your favorite browser
  384.  
  385. ;Prompt user with Clip wizard to determine which image files should be listed and how the page should be built
  386. ^!Set %PageTitle%=^?{Page title=Images}; %FileName%=^?{Web page file name (no path or extension)=Images}; %Directory%=^?{(T=D)Directory to search}; %Specs%=^?{File Specs=*.gif;*.png;*.jpg}; %Sorting%=^?{(T=C)File sorting==Unsorted|_Name|Type|Date|Size}; %Reverse%=^?{(T=C)Descending order==Yes^=Rev|_No^=}
  387. ;End procedure if the user canceled the Clip wizard
  388. ^!IfCancel Exit
  389.  
  390. ^!SetPasteIndent Off
  391. ;Set variable for sorting parameter
  392. ^!Set %Sorting%=^%Reverse%^%Sorting%
  393. ;Close the output file if there is one open in NoteTab
  394. ^!Close "^%Directory%^%FileName%.htm"
  395. ;Create a new document with specified name for web page
  396. ^!Set %KeepNameFormat%=^$GetNameFormat$
  397. ^!SetNameFormat ^%Directory%^%FileName%.htm
  398. ^!ToolBar New Document
  399. ^!SetNameFormat ^%KeepNameFormat%
  400. ;Turn word wrap off
  401. ^!SetWordWrap OFF
  402. ;Insert web page header and title
  403. ^!InsertHtml <HTML>^P<HEAD>^P<TITLE>^%PageTitle%</TITLE>^P<META name="generator" content="^$GetProgName$ ^$GetProgVersion$">^P</HEAD>^P<BODY>^P<CENTER>^P<H1>^%PageTitle%</H1>^P<H2>^%Directory%^%Specs%</H2>^P<HR>^P</CENTER>^P
  404.  
  405. ;Retrieve first image name that matches specified search criteria
  406. ^!Set %ImageFullName%=^$GetFileFirst(^%Directory%;"^%Specs%";^%Sorting%)$
  407. :StartLoop
  408. ;If the image name is empty (no more matching files), leave the loop
  409. ^!IfTrue ^$IsEmpty(^%ImageFullName%)$ ExitLoop
  410. ;Copy image name without path to variable
  411. ^!Set %ImageName%=^$GetFileName(^%ImageFullName%)$
  412. ;Copy image width and height information into variables
  413. ^!Set %ImgWidth%=^$GetImgWidth(^%ImageFullName%)$; %ImgHeight%=^$GetImgHeight(^%ImageFullName%)$
  414. ;Insert image tag and information into document
  415. ^!InsertHtml <IMG SRC="^$StrLower("^%ImageName%")$" WIDTH="^%ImgWidth%" HEIGHT="^%ImgHeight%" BORDER="0" ALT="^%ImageName%"><BR>^%ImageName% (^%ImgWidth%x^%ImgHeight%; ^$GetFileSize(^%ImageFullName%)$ bytes)<P>^P
  416.  
  417. ;Get next matching image name and go back to start of loop
  418. ^!Set %ImageFullName%=^$GetFileNext$
  419. ^!GoTo StartLoop
  420.  
  421. :ExitLoop
  422. ;Close the file-find variable to restore system resources
  423. ^!CloseFileFind
  424. ;Insert line break after last image tag
  425. ^!InsertText ^P
  426. ;Insert web page closing tags
  427. ^!InsertHtml <HR>^P<CENTER>^P<I>This HTML document was produced with a popular Text and HTML editor called <B><A HREF="http://www.notetab.com/">^$GetProgName$</A></B></I>^P</CENTER>^P<HR>^P<SMALL>Page created on <B>^$GetDate(mmmm dd, yyyy)$</B></SMALL>^P</BODY>^P</HTML>^P
  428.  
  429. ;Place cursor back to top of page
  430. ^!Jump Text_Start
  431. ;Offer user the choice to display the newly created web page in browser or end Clip
  432. ^!Goto ^?{What would you like to do now?==_View page in main browser^=Next|View page in second browser^=SecondBrowser|No preview^=End}
  433. ^!ToolBar View in Browser
  434. ^!Goto End
  435. :SecondBrowser
  436. ^!ToolBar View Other Browser
  437.  
  438. H="Tidy HTML code"
  439. ;Tidy code in all open HTML documents. This Clip can use the HTML Tidy program, if available
  440. ^!Continue This Clip will tidy the code in all open HTML documents. Continue?
  441.  
  442. ;Copy the document count in a variable
  443. ^!Set %Index%=^$GetDocCount$
  444.  
  445. ;Determine method to use
  446. ^!Set %UseHtmlTidy%=No
  447. ^!IfFileExist "^$GetTidyExe$" ^!Set %UseHtmlTidy%=Yes
  448. ^!IfFalse ^%UseHtmlTidy% InitPlain
  449. ;If HTML Tidy is found, ask which method the user would like to use
  450. ^!Set %UseHtmlTidy%=^?{Select method==_Use HTML Tidy program (more options)^=Yes|Use NoteTab commands (much faster)^=No}
  451. ^!IfTrue ^%UseHtmlTidy% InitTidy
  452.  
  453. :InitPlain
  454. ^!Set %Param%=^?{Tag format?==_Uppercase|Lowercase|XHTML}; %SaveChanges%=^?{Automatically save changed documents?==Yes|_No}; %Label%=CallPlain
  455. ^!Goto LoopStart
  456.  
  457. :InitTidy
  458. ^!Set %Param%=--tidy-mark false -q^?{Indent HTML code?==_Yes^=i|No^=}^?{Tag format?==_Uppercase^=u|Lowercase^=|XHTML^= -asxml}^?{Wrap long lines?==Yes^=|_No^= -wrap 0}; %SaveChanges%=^?{Automatically save changed documents?==Yes|_No}; %Label%=CallTidy
  459.  
  460. ;Check every open document through the following loop
  461. :LoopStart
  462. ;Activate the specified document (starts with the last one in the tab bar)
  463. ^!SetDocIndex ^%Index%
  464. ;Skip the conversion process if the document does not have an HTML extension or is a Clipbook library
  465. ^!IfFalse ^$IsHTMLDoc$ UpdateIndex
  466. ^!IfTrue ^$IsClipDoc$ UpdateIndex
  467. ^!Goto ^%Label%
  468.  
  469. ;Tidy the contents of the current document
  470. :CallPlain
  471. ^!Select ALL
  472. ^!InsertText ^$GetHtmlTextTidy("^$GetSelection$";^%Param%)$
  473. ^!Goto EndCall
  474.  
  475. :CallTidy
  476. ^!RunTidy ^%Param%
  477. ^!IfError UpdateIndex
  478.  
  479. :EndCall
  480. ;Place the cursor at the start of the document
  481. ^!Jump Text_Start
  482. ;Save converted document if users wants this done automatically
  483. ^!IfFalse ^%SaveChanges% UpdateIndex
  484. ^!IfFalse ^$IsModified$ UpdateIndex
  485. ^!Save
  486.  
  487. :UpdateIndex
  488. ;Substract one from the Index value
  489. ^!Dec %Index%
  490. ;Go back to start of loop if there are still documents left to check
  491. ^!If ^%Index% > 0 LoopStart
  492.  
  493. H="Convert HTML to text"
  494. ;Converts all open HTML documents into plain text files
  495. ^!Continue This Clip will convert all open HTML documents to plain text files. Continue?
  496. ;Copy the document count in a variable
  497. ^!Set %Index%=^$GetDocCount$
  498.  
  499. ;Check every open document through the following loop
  500. :LoopStart
  501. ;Activate the specified document (starts with the last one in the tab bar)
  502. ^!SetDocIndex ^%Index%
  503. ;Skip the conversion process if the document does not have an HTML extension or is a Clipbook library
  504. ^!IfFalse ^$IsHTMLDoc$ SkipConversion
  505. ^!IfTrue ^$IsClipDoc$ SkipConversion
  506. ;Strip tags from current document
  507. ^!Toolbar Strip ^?[Keep links in tags?==_Yes^=Tags|No^=HTML]
  508. ^!IfError SkipConversion
  509. ;Place the cursor at the start of the document
  510. ^!Jump Text_Start
  511. ;Save converted document if users wants this done automatically
  512. ^!IfFalse ^?[Automatically save converted documents?==_Yes|No] Skip
  513. ^!Save As ^##
  514.  
  515. :SkipConversion
  516. ;Substract one from the Index value
  517. ^!Dec %Index%
  518. ;Go back to start of loop if there are still documents left to check
  519. ^!If ^%Index% > 0 LoopStart
  520.  
  521. H="Convert Text to HTML"
  522. ;Converts all open non-HTML documents to HTML
  523. ^!Continue This Clip will convert all open non-HTML documents to HTML documents. Continue?
  524. ;Copy the document count in a variable
  525. ^!Set %Index%=^$GetDocCount$
  526.  
  527. ;Check every open document through the following loop
  528. :LoopStart
  529. ;Activate the specified document (starts with the last one in the tab bar)
  530. ^!SetDocIndex ^%Index%
  531. ;Skip the conversion process if the document has an HTML extension or is a Clipbook library
  532. ^!IfTrue ^$IsHtmlDoc$ SkipConversion
  533. ^!IfTrue ^$IsClipDoc$ SkipConversion
  534. ;Convert text to HTML format
  535. ^!Toolbar Document to HTML
  536. ^!IfError SkipConversion
  537. ;Place the cursor at the start of the document
  538. ^!Jump Text_Start
  539. ;Save converted document if users wants this done automatically
  540. ^!IfFalse ^?[Automatically save converted documents?==_Yes|No] Skip
  541. ^!Save As ^##
  542.  
  543. :SkipConversion
  544. ;Substract one from the Index value
  545. ^!Dec %Index%
  546. ;Go back to start of loop if there are still documents left to check
  547. ^!If ^%Index% > 0 LoopStart
  548.  
  549. H="Convert "Mailto" form"
  550. ;Converts output text created by "Mailto" forms. If text is selected in the document, the conversion will only be applied to that part, otherwise the whole document is processed
  551. ^!If ^$GetSelSize$ > 2 Skip
  552. ^!ToolBar Select All
  553. ^!If ^$GetSelSize$ < 3 End
  554. ^!Set %Text%=^$GetSelection$
  555. ^!Set %Text%=^$StrReplace("+";" ";"^%Text%";No;No)$
  556. ^!Set %Text%=^$StrReplace("^%NL%";"";"^%Text%";No;No)$
  557. ^!Set %Text%=^$StrReplace("&";"^%NL%";"^%Text%";No;No)$
  558. ^!Set %Text%=^$StrReplace("=";":^%TAB%";"^%Text%";No;No)$
  559. ^!Set %Text%=^$StrReplace("%0D%0A";"^%NL%";"^%Text%";No;No)$
  560. ^!Set %Text%=^$StrReplace("%21";"!";"^%Text%";No;No)$
  561. ^!Set %Text%=^$StrReplace("%22";""";"^%Text%";No;No)$
  562. ^!Set %Text%=^$StrReplace("%23";"#";"^%Text%";No;No)$
  563. ^!Set %Text%=^$StrReplace("%24";"$";"^%Text%";No;No)$
  564. ^!Set %Text%=^$StrReplace("%26";"&";"^%Text%";No;No)$
  565. ^!Set %Text%=^$StrReplace("%27";"'";"^%Text%";No;No)$
  566. ^!Set %Text%=^$StrReplace("%28";"(";"^%Text%";No;No)$
  567. ^!Set %Text%=^$StrReplace("%29";")";"^%Text%";No;No)$
  568. ^!Set %Text%=^$StrReplace("%2A";"*";"^%Text%";No;No)$
  569. ^!Set %Text%=^$StrReplace("%2B";"+";"^%Text%";No;No)$
  570. ^!Set %Text%=^$StrReplace("%2C";",";"^%Text%";No;No)$
  571. ^!Set %Text%=^$StrReplace("%2F";"/";"^%Text%";No;No)$
  572. ^!Set %Text%=^$StrReplace("%3A";":";"^%Text%";No;No)$
  573. ^!Set %Text%=^$StrReplace("%3B";";";"^%Text%";No;No)$
  574. ^!Set %Text%=^$StrReplace("%3C";"<";"^%Text%";No;No)$
  575. ^!Set %Text%=^$StrReplace("%3D";"=";"^%Text%";No;No)$
  576. ^!Set %Text%=^$StrReplace("%3E";">";"^%Text%";No;No)$
  577. ^!Set %Text%=^$StrReplace("%3F";"?";"^%Text%";No;No)$
  578. ^!Set %Text%=^$StrReplace("%40";"@";"^%Text%";No;No)$
  579. ^!Set %Text%=^$StrReplace("%5B";"[";"^%Text%";No;No)$
  580. ^!Set %Text%=^$StrReplace("%5C";"\";"^%Text%";No;No)$
  581. ^!Set %Text%=^$StrReplace("%5D";"]";"^%Text%";No;No)$
  582. ^!Set %Text%=^$StrReplace("%5E";"^";"^%Text%";No;No)$
  583. ^!Set %Text%=^$StrReplace("%60";"`";"^%Text%";No;No)$
  584. ^!Set %Text%=^$StrReplace("%7B";"{";"^%Text%";No;No)$
  585. ^!Set %Text%=^$StrReplace("%7C";"|";"^%Text%";No;No)$
  586. ^!Set %Text%=^$StrReplace("%7D";"}";"^%Text%";No;No)$
  587. ^!Set %Text%=^$StrReplace("%7E";"~";"^%Text%";No;No)$
  588. ^!Set %Text%=^$StrReplace("%25";"%";"^%Text%";No;No)$
  589. ^!SetPasteIndent Off
  590. ^!InsertText ^%Text%
  591.  
  592. H="Outline document to HTML"
  593. ;Converts the current outline document into a web page
  594.  
  595. ;If the current document is an outline, start the procedure. Otherwise ask whether to demonstrate the feature on the Readme.otl document, which is part of the NoteTab package
  596. ^!IfTrue ^$IsOutlineDoc$ Start ELSE Next
  597. ;Check if the Readme.otl document exists. If not, skip demonstration procedure and show error message
  598. ^!IfFileExist ^$GetAppPath$Readme.Otl Next ELSE ShowErrorMsg
  599. ^!Continue The current document is not an outline. Would you like to see a demonstration with the Readme.Otl file?
  600. ;Open the Readme.otl document
  601. ^!Open ^$GetAppPath$Readme.Otl
  602. ;If there was an error while trying to open it, show message and end procedure
  603. ^!IfError Next ELSE Start
  604. ^!Prompt Error: could not open "^$GetAppPath$Readme.Otl"
  605.  
  606. :Start
  607. ;Convert the outline file to HTML format
  608. ^!Toolbar Document to HTML
  609. ;Place the cursor at the start of the document
  610. ^!Jump Text_Start
  611. ;Offer user the choice to display the newly created web page in browser or end Clip
  612. ^!Goto ^?{What would you like to do now?==_View page in main browser^=Next|View page in second browser^=SecondBrowser|No preview^=End}
  613. ^!ToolBar View in Browser
  614. ^!Goto End
  615.  
  616. :SecondBrowser
  617. ^!ToolBar View Other Browser
  618. ^!Goto End
  619.  
  620. :ShowErrorMsg
  621. ^!Prompt Error: the current document is not an outline
  622.  
  623. H="Outline topics to HTML"
  624. ;This Clip will convert each outline topic into an individual web page. The user can choose whether to keep the created files open in NoteTab or have them closed automatically
  625.  
  626. ;If the current document is an outline, start the procedure. Otherwise ask whether to demonstrate the feature on the Readme.otl document, which is part of the NoteTab package
  627. ^!IfTrue ^$IsOutlineDoc$ Start ELSE Next
  628. ;Check if the Readme.otl document exists. If not, skip demonstration procedure and show error message
  629. ^!IfFileExist ^$GetAppPath$Readme.Otl Next ELSE ShowErrorMsg
  630. ^!Continue The current document is not an outline. Would you like to see a demonstration with the Readme.Otl file?
  631. ;Open the Readme.otl document
  632. ^!Open ^$GetAppPath$Readme.Otl
  633. ;If there was an error while trying to open it, show message and end procedure
  634. ^!IfError Next ELSE Start
  635. ^!Prompt Error: could not open "^$GetAppPath$Readme.Otl"
  636.  
  637. :Start
  638. ;Copy the name of the outline document to a variable
  639. ^!Set %OutlineName%=^$GetName("^##")$
  640. ;Copy user's choice for keeping the web pages open or not
  641. ^!Set %KeepOpen%=^?[Keep new HTML documents open in editor?==_Yes|No]
  642. ;Store the current document index in a variable
  643. ^!Set %DocIndex%=^$GetDocIndex$
  644. ;Set the TopicIndex variable to 0
  645. ^!Set %TopicIndex%=0
  646. ;Store the topic count in a variable
  647. ^!Set %TopicCount%=^$GetTopicCount$
  648. ;Change the name format for newly created documents to the outline file name with the .html extension
  649. ^!Set %KeepNameFormat%=^$GetNameFormat$
  650. ^!SetNameFormat ^$GetAppPath$^%OutlineName%%0.2d.html
  651.  
  652. :LoopStart
  653. ;Add one to the value contained in the TopicIndex variable
  654. ^!Inc %TopicIndex%
  655. ;End the Clip if the TopicIndex number is greater than the number of topics in the outline document
  656. ^!If ^%TopicIndex% > ^%TopicCount% EndClip
  657. ;Activate the outline document if it is not already the current one
  658. ^!SetDocIndex ^%DocIndex%
  659. ;Move to the topic defined in the TopicIndex variable
  660. ^!SetTopicIndex ^%TopicIndex%
  661. ;Copy the content of the topic to the Clipboard
  662. ^!SetClipboard ^$GetText$
  663. ;Paste the content of the Clipboard into a new document
  664. ^!ToolBar Paste New
  665. ;Convert the text in the new document to the HTML format
  666. ^!Toolbar Document to HTML
  667. ;Place the cursor at the start of the text in the new HTML document
  668. ^!Jump Text_Start
  669. ;Save the new HTML document without prompting the user for the name
  670. ^!Save AS ^##
  671. ;Close the HTML document if the user chose to do so
  672. ^!IfTrue ^%KeepOpen% Skip
  673. ^!Close
  674. ;Go back to the start of the loop
  675. ^!GoTo LoopStart
  676.  
  677. :ShowErrorMsg
  678. ^!Prompt Error: the current document is not an outline
  679. ^!GoTo End
  680.  
  681. :EndClip
  682. ;Restore the original new document name format
  683. ^!SetNameFormat ^%KeepNameFormat%
  684.  
  685. H="Select between tags"
  686. ;This Clip will select all the text between the type of tag specified by the user. The search starts from the cursor position or the beginning of the text
  687.  
  688. ^!Set %Range%=^?[(2)Search from...==Start of text^=W|Cursor position forwards^=|_Cursor position backwards^=B]
  689. ;If search direction is different from backwards, jump to the instruction following the SearchForwards label
  690. ^!If ^%Range% <> B SearchForwards
  691. ;Clear the content of the Range variable
  692. ^!ClearVariable %Range%
  693. ;Search backwards for the first matching tag
  694. ^!Find "<^?[(1)Tag=a|address|applet|b|big|blockquote|body|caption|center|em|form|frameset|font|head|i|iframe|li|kbd|noframes|noscript|ol|option|p|pre|script|small|strike|strong|style|table|td|th|title|tr|ul|var]" ISB
  695. ;End procedure if the searched tag is not found
  696. ^!IfError End
  697. ;Place cursor at end of selection and remove highlight
  698. ^!Jump Select_End
  699. ;Find end of opening tag
  700. ^!Find ">" IS
  701. ^!IfError End
  702. ^!Goto SetStartPosition
  703.  
  704. :SearchForwards
  705. ;Search forwards for the opening tag
  706. ^!Find "<^?[Tag]" CIS^%Range%
  707. ;End procedure if the searched tag is not found
  708. ^!IfError End
  709. ;Place cursor at end of selection and remove highlight
  710. ^!Jump Select_End
  711. ;Find end of opening tag
  712. ^!Find ">" S
  713. ^!IfError End
  714.  
  715. :SetStartPosition
  716. ;Ensure input focus is in the document
  717. ^!FocusDoc
  718. ;Place cursor at end of selection and remove highlight
  719. ^!Jump Select_End
  720. ;Store cursor position in a variable
  721. ^!Set %Start%=^$GetRow$:^$GetCol$
  722. ;Search for the closing tag
  723. ^!Find "</^?[Tag]>" IS
  724. ;End the procedure if it is not found
  725. ^!IfError End
  726.  
  727. ;Place cursor at start of selection and remove highlight
  728. ^!Jump Select_Start
  729. ;Store cursor position in a variable
  730. ^!Set %End%=^$GetRow$:^$GetCol$
  731. ;Move the cursor back to the first saved position (after the opening tag)
  732. ^!SetCursor ^%Start%
  733. ;Extend the selection to the second saved position (in front of the closing tag)
  734. ^!SelectTo ^%End%
  735.  
  736. H=";"
  737.  
  738.  
  739. H=";UNICODE files"
  740. This section offers Clips that let you easily read and write text in UNICODE format.
  741.  
  742.  
  743.  
  744. H="Import UNICODE text"
  745. ;Prompts user to choose an UNICODE file and reads text into NoteTab
  746. ^!ToolBar New Document
  747. ^!InsertText ^$GetUnicodeFileText("^?[(T=O;F="UNICODE files (*.txt)|*.txt")Open UNICODE file]")$
  748.  
  749. H="Save as UNICODE file"
  750. ;Saves current document in UNICODE format
  751. ^!Continue This command will save the text in your current document to a new file in UNICODE format. Continue?
  752. ^!TextToUnicodeFile "^?{(T=S;F="UNICODE files (*.txt)|*.txt")Save As UNICODE file}"
  753.  
  754. H=";"
  755.  
  756.  
  757. H=";EBCDIC files"
  758. This section offers a series of Clips that let you easily open, save, and export EBCDIC files.
  759.  
  760.  
  761.  
  762. H="Load EBCDIC conversion table"
  763. ;Loads an EBCDIC character conversion table into NoteTab
  764. ^!LoadEbcdicCharTable ^?[(T=O;F="Character Tables (*.ebc)|*.ebc")Load EBCDIC character table=Default.ebc]
  765. ^!IfError Next ELSE Skip
  766. ^!Info Error loading EBCDIC translation table
  767.  
  768. H="Open EBCDIC document"
  769. ;Prompts user to choose an EBCDIC file(s) and opens in NoteTab
  770. ^!OpenEbcdic ^?{(T=O;S=M;F="EBCDIC files (*.cbl;*.cob;*.cpy;*.ddl;*.bms)|*.cbl;*.cob;*.cpy;*.ddl;*.bms")Open EBCDIC file(s)} /W=^?{LRECL=_Variable Width^=0|80|132|133}
  771.  
  772. H="Save document as EBCDIC"
  773. ;Saves current document in EBCDIC format
  774. ^!Continue This command will save your current document as an EBCDIC file. Are you sure you want to do this?
  775. ^!SaveEbcdic /W=^?{Line width (LRECL)=_Variable Width^=0|80|132|133}
  776.  
  777. H="Export as EBCDIC"
  778. ;Saves current document or text selection as a new file in EBCDIC format
  779. ^!Export "^?[(T=S;F="EBCDIC files (*.cbl;*.cob;*.cpy;*.ddl;*.bms)|*.cbl;*.cob;*.cpy;*.ddl;*.bms")Name for new EBCDIC file]" EBCDIC ^?[Text=SELECTION|_ALL] LRECL=^?[Line width (LRECL)=_Variable Width^=0|80|132|133]
  780.  
  781. H=";"
  782.  
  783.  
  784. H=";Conversions"
  785. This section offers a series of Clips that let you easily convert between the most common units. A Clip wizard will prompt you for the value to convert and will then display the result in another window.
  786.  
  787.  
  788.  
  789. H="Fahrenheit -> Centigrade"
  790. ^!Prompt ^?[Temperature in Fahrenheit]░F = ^$Calc(((^?[Temperature in Fahrenheit])-32)*(5/9))$░C
  791.  
  792. H="Centigrade -> Fahrenheit"
  793. ^!Prompt ^?[Temperature in Centigrade]░C = ^$Calc((^?[Temperature in Centigrade])*(9/5)+32)$░F
  794.  
  795. H=";----"
  796.  
  797.  
  798. H="Inches -> Centimetres"
  799. ^!Prompt ^?[Length in inches] inches = ^$Calc(^?[Length in inches]*2.5400)$ cm
  800.  
  801. H="Centimetres -> Inches"
  802. ^!Prompt ^?[Length in centimetres] cm = ^$Calc(^?[Length in centimetres]/2.5400)$ inches
  803.  
  804. H="Miles -> Kilometres"
  805. ^!Prompt ^?[Distance in miles] miles = ^$Calc(^?[Distance in miles]/0.6214)$ kilometres
  806.  
  807. H="Kilometres -> Miles"
  808. ^!Prompt ^?[Distance in kilometres] kilometres = ^$Calc(^?[Distance in kilometres]*0.6214)$ miles
  809.  
  810. H=";----"
  811.  
  812.  
  813. H="Pounds -> Kilograms"
  814. ^!Prompt ^?[Weight in pounds] pounds = ^$Calc(^?[Weight in pounds]*0.4536)$ kg
  815.  
  816. H="Kilograms -> Pounds"
  817. ^!Prompt ^?[Weight in kilograms] kg = ^$Calc(^?[Weight in kilograms]/0.4536)$ pounds
  818.  
  819. H=";"
  820.  
  821.  
  822. H=";Mathematics"
  823. This section offers a series of Clips that demonstrate how NoteTab can calculate mathematical formulae. A Clip wizard will prompt you for the necessary values and will then display the result in another window.
  824.  
  825.  
  826.  
  827. H="Your ideal weight?"
  828. ;Lorentz Formula (thanks Christophe!)
  829. ^!Prompt Ideal weight = ^$Calc((^?[Height (cm)]-100)-((^?[Height (cm)]-150)/^?[Sex=_Male^=4|Female^=2]))$ Kg
  830.  
  831. H="Mortgage rate"
  832. ;Clip developed by Edward S. Wozniak
  833. ^!Prompt Mortgage rate = ^$Calc(^?[Mortgage amount]*(^?[Interest rate (%)]/1200)*(1+^?[Interest rate (%)]/1200)^(^?[Length of the loan (in years)]*12)/((1+^?[Interest rate (%)]/1200)^(^?[Length of the loan (in years)]*12)-1))$ per month
  834.  
  835. H="Future value of deposit"
  836. ;Clip developed by Edward S. Wozniak
  837. ^!Prompt Final Balance = ^$Calc(^?[Fixed Monthly Deposit]*((1+^?[Interest Rate (%)]/1200)^(^?[Total Deposit Periods (in years)]*12)-1)/(^?[interest Rate (%)]/1200))$
  838.  
  839. H=";"
  840.  
  841.  
  842. H=";Windows Utilities"
  843. This section offers Clips that launch some of the commonly used Windows utilities. Just double click on the Clip to start the utility.
  844.  
  845.  
  846.  
  847. H="Calculator"
  848. ^!FocusApp Calculator
  849. ^!IfError Next Else End
  850. ^!Shell calc.exe
  851.  
  852. H="Character Map"
  853. ^!Shell charmap.exe
  854.  
  855. H="Explorer"
  856. ^!FocusApp Exploring*
  857. ^!IfError Next Else End
  858. ^!Shell explorer.exe
  859.  
  860. H=";"
  861.  
  862.  
  863. H=";NoteTab Shortcuts"
  864. This section offers Clips that add shortcuts to NoteTab from various places under Windows.
  865.  
  866.  
  867.  
  868. H="Add SendTo Shortcut"
  869. ^!MakeShortcut SendTo "^$GetAppFileName$" "" "^$GetProgName$"
  870. ^!IfError ShowError
  871.  
  872. ^!Prompt "SendTo" shortcut has been added to Windows Explorer popup menu
  873. ^!Goto End
  874.  
  875. :ShowError
  876. ^!Prompt Error creating shortcut
  877.  
  878.  
  879. H="Add Open with NoteTab Shortcut"
  880. ^!SaveRegValue HKEY_CLASSES_ROOT\*\Shell\^$GetProgName$=Open with &^$GetProgName$
  881. ^!IfError ShowError
  882. ^!SaveRegValue HKEY_CLASSES_ROOT\*\Shell\^$GetProgName$\Command="^$GetAppFileName$" "%1"
  883. ^!IfError ShowError
  884.  
  885. ^!Prompt "Open with ^$GetProgName$" shortcut has been added to Windows Explorer popup menu
  886. ^!Goto End
  887.  
  888. :ShowError
  889. ^!Prompt Error creating registry key
  890.  
  891.  
  892. H="Add to Browser Open-with-List"
  893. ^!SaveRegValue HKEY_CLASSES_ROOT\.htm\OpenWithList\^$GetProgName$\shell\edit\command="^$GetAppFileName$" "%1"
  894. ^!IfError ShowError
  895.  
  896. ^!Prompt "Browser Open-with-List" shortcut has been added to the registry
  897. ^!Goto End
  898.  
  899. :ShowError
  900. ^!Prompt Error creating registry key
  901.  
  902.  
  903. H="Add IE Default HTML Editor"
  904. ^!SaveRegValue HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor="^$GetAppFileName$" "%1"
  905. ^!IfError ShowError
  906. ^!SaveRegValue ^!SaveRegValue HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Default HTML Editor\shell\edit=^$GetAppFileName$
  907. ^!IfError ShowError
  908.  
  909. ^!Prompt "View Source Editor" and "Default HTML Editor" shortcuts for Internet Explorer have been added to the registry
  910. ^!Goto End
  911.  
  912. :ShowError
  913. ^!Prompt Error creating registry key
  914.  
  915.  
  916. H="Add to Edit HTML file type"
  917. ^!SaveRegValue HKEY_CLASSES_ROOT\htmlfile\shell\edit\command="^$GetAppFileName$" "%1"
  918. ^!IfError ShowError
  919.  
  920. ^!Prompt "Edit HTML file type" shortcut has been added to the registry
  921. ^!Goto End
  922.  
  923. :ShowError
  924. ^!Prompt Error creating registry key
  925.  
  926.  
  927. H="Add to App Paths"
  928. ^!Set %FileName%=^$GetFileName(^$GetAppFileName$)$
  929. ^!SaveRegValue HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\^%FileName%=^$GetAppFileName$
  930. ^!IfError ShowError
  931. ^!SaveRegValue HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\^%FileName%:Path=^$GetPath(^$GetAppFileName$)$
  932. ^!IfError ShowError
  933.  
  934. ^!Prompt "App Paths" key has been added to the registry. Windows will now know where to find ^%FileName%
  935. ^!Goto End
  936.  
  937. :ShowError
  938. ^!Prompt Error creating registry key
  939.  
  940.  
  941. H=";"
  942.  
  943.  
  944. H=";Fookes Software links"
  945. This section offers Clips that launch your default web browser and connect to the chosen site. Just double click on the Clip to open the web page.
  946.  
  947.  
  948.  
  949. H="Fookes Software"
  950. ^!URL http://www.fookes.com/
  951.  
  952. H="NoteTab Homepage"
  953. ^!URL http://www.notetab.com/
  954.  
  955. H="Clipbook Repository"
  956. ^!URL http://www.notetab.com/libraries.htm
  957.  
  958.