home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesDataFilesRequiredDataFiles / perweb50.ntf (.txt) < prev   
Encoding:
Lotus Notes Storage Facility  |  1998-11-17  |  1.0 MB  |  9,345 lines

  1. Personal Web Navigator (R5.0)
  2. #1StdR50PersonalWebNavigator
  3. STG16257
  4. }&lemH
  5. EOu#B 
  6. J7)e`|qT
  7. >%!-eWv
  8. CN=Lotus Notes Template Development/O=Lotus Notes
  9. CN=Dave Newbold/O=IrisLotus NotesCN=Lotus Notes Template Development/O=Lotus NotesLotus NotesCN=Lotus Notes Template Development/O=Lotus NotesCN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notest
  10. ###############################
  11. $Modified
  12.     1S2S3S
  13. $TITLE$FormPrivs$FormUsers$Body$Flags$Class$Modified$Comment$AssistTrigger$AssistType$AssistFlags$UpdatedBy$$FormScript_O$LANGUAGE
  14. $Flags
  15.     0SL1S4S5S3724
  16. $TITLE
  17. CN=Marina Bodik/O=Iris###############
  18. URLDoclinkURLDoclink
  19. URLDoclink
  20. CN=Winnie Liang/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#######
  21. }&lemH
  22. CN=Rob Slapikoff/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#############################################
  23. CN=Teresa Deane/O=Irisc:\notes\data\perweb46.ntf(Home)Rin
  24. Personal Web Navigator (R5.0)
  25. #1StdR50PersonalWebNavigator
  26. CN=Teresa Deane/O=IrisCN=Marina Bodik/O=Iris#################################################
  27. CN=Rob Slapikoff/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#############################################
  28. 'Other\House Cleaning|House Cleaning/O0
  29. TIME_DATE
  30. TIME_DATE
  31.     0S0E
  32.     0S0E
  33. $47Title$45$46$Conflict
  34. Admin
  35. HelpForm
  36. WebBrowserForm
  37. bookmark
  38.     L1S2S3S13S14S15S
  39. $47$45
  40. $45Title
  41. $47Size
  42. TitleDocument title$45DateN
  43. TIME_DATE
  44. TIME_DATE
  45.     0S0E
  46. $46Type*
  47.     0S0E
  48. IEVersion
  49. IEVersionMinor|
  50.     1S2S
  51. Admin
  52. Admin
  53. forward
  54. HTMLForm
  55. IEVersion
  56. Admin
  57. Admin
  58. forward
  59. HTMLForm
  60. WebBrowserForm
  61. IEVersion
  62. Admin
  63. Admin
  64. forward
  65. HTMLForm
  66. WebBrowser4Form
  67.     0R9RT12S13S23RTT29RTTT32S33S46RTT50RTTT53S54S66RTT69RT70R
  68. CN=Marina Bodik/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes###############################
  69. Internet OptionsAdminDC
  70. $Script1SaveHTMLKeepPageWebServerReduceSizeReduceDaysSearchURLPreferredSearchEngineScanAheadSendMailToUpdatesFoundOptionsSearchFrequencyListingAddressPlainFixedBodyAnchor_styleWebDatabaseReduceNumMBReduceNumDaysOpenURLStartUpOptions
  71. CN=Rob Slapikoff/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#############################
  72. (Internet Profile)|Internet ProfilesB
  73. $Conflict
  74. Admin
  75.     L1S2S3S1
  76. Internet Options
  77. Internet Options&
  78. Lotus NotesCN=Lotus Notes Template Development/O=Lotus Notes#####################################
  79. Other\File Archive|File Archive/O
  80.     3S15S
  81.     3S15S
  82. $46NULL$45$Conflict
  83.     L1S1
  84. $46$45
  85. $46$45
  86. $46$45
  87.  $46File NameJ
  88.     3S15SNULL$45File SizeJ
  89.     3S15S&
  90. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes##################
  91. CN=Ryan Jansen/O=IrisCN=Barbara Mathers/O=IrisCN=Ryan Jansen/O=IrisCN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus NotesLotus NotesCN=Teresa Deane/O=IrisLotus NotesCN=Lotus Notes Template Development/O=Lotus NotesCN=Teresa Deane/O=IrisCN=Marina Bodik/O=IrisCN=Lotus Notes Template Development/O=Lotus NotesDatabase Scriptt34Q1##
  92. ShareWebPageShareWebPageDC
  93. RatingtmpWebDbtmpWebServerSharedOptionsCommentscontentURLTitle
  94. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes###########################
  95. (ImportBookmark)CDBookmarkFile
  96. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#########################
  97. (ImportFavorite)BookmarkFile
  98. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes
  99. ##########################################################
  100. bD1DE5FB167B5A71A831BA6EC2E9C9C3667843E4301C6054E658E2C2D65E5AC9DHTMLFormDC
  101. SubjectSaveOptionsFileNameHostTypeHTTPStatusURLTitleBody
  102. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes###############################################
  103. /Favorites and Bookmarks|Bookmarks|Favorites|BookmarksFavorites and Bookmarks|Bookmarks|Favorites|Bookmarks
  104. Bookmark
  105.     6S8S
  106. $37Title$36URL$Conflict
  107. Title
  108. Title
  109. Bookmark
  110.     6S8S
  111. TitlePageTitle$36Date
  112. URLURL&
  113. IEVersion
  114. IEVersionMinor|
  115.     1S2S
  116. Admin
  117. Admin
  118. forward
  119. HTMLForm
  120. IEVersion
  121. Admin
  122. Admin
  123. forward
  124. HTMLForm
  125. WebBrowserForm
  126. IEVersion
  127. Admin
  128. Admin
  129. forward
  130. HTMLForm
  131. WebBrowser4Form
  132.     0R9RT12S13S23RTT29RTTT32S33S46RTT50RTTT53S54S66RTT69RT70R3FYd
  133. CN=Marina Bodik/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes
  134. ##########################################################
  135. ForwardForwardCDForwardOptions
  136. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#################################################
  137. EXT61806.lssKJ
  138. EXT61806.lso
  139. STG28821
  140. EXT34422
  141. EXT34422Browser$BodyWebBrowserFormC
  142. EXT34422.lss#
  143. EXT34422.lso
  144. T8Wxy
  145. $OLEPreviewActivateSaveOptions8C2CFD4D111D2A7CC19FC517EEFF4BDD
  146. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes6989B03210911849FFDC743E00E5DF5A67843E4301C6054E658E2C2D65E5AC9DCN=Lotus Notes Template Development/O=Lotus Notes#########################################
  147. EOu#B 
  148. (WebBrowserView)|WebBrowserView
  149. www.G
  150. www.`
  151.     15S18S27S30S
  152. $34Title$Conflict
  153. WebBrowserG
  154.     L1S1
  155.  $34v
  156. www.G
  157. www.`
  158.     15S18S27S30S
  159. TitleDocument Title&
  160. CN=Marina Bodik/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes##################################################
  161. J7)e`|qT
  162. Housekeeping
  163. 1SfL3
  164. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes##############################################
  165. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes######
  166. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes######
  167. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes######
  168. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes######
  169. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes######
  170. HelpFormHD
  171. BodyTitle
  172. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes####################################################
  173. Web Ahead
  174. 1SfL3
  175. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#################################################
  176. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus NotesAgentFunctionss34Q1####################
  177. O=Lotus Notes
  178. O=Lotus Notes
  179. PURSAFO
  180. |.:#U
  181. O=Lotus Notes
  182. CN=Lotus Notes Template Development/O=Lotus Notes
  183. PURSAFO
  184. $ACLDigest
  185. O=Lotus Notes
  186. O=Lotus Notes
  187. PURSAFO
  188. |.:#U
  189. O=Lotus Notes
  190. CN=Lotus Notes Template Development/O=Lotus Notes
  191. PURSAFO
  192. Fde!f^^
  193. $INFO
  194. $BODY
  195. Times New Roman
  196. &Arial
  197. Using Personal 
  198. Web Navigator 5.0
  199.     This database is designed so you can easily access the Internet right from your Notes workstation and store Web pages in your own Personal Web Navigator database.  
  200. Getting started viewing and searching pages
  201.     To browse a page, click  
  202. ?_?__
  203. `!b`1
  204. 7`^///?
  205. ?b___
  206. `bOOO
  207. `<b!R
  208. *.BMP
  209. CGM Imag
  210. ;*.WR1;*.WRK;*.W
  211.       which brings up your home page specified in Internet Options.  You can enter new URL's for other Web pages in the search bar.   You can save the page in the All Bookmarks view to read later by clicking the Add Bookmark... button. We have also included some of our favorite Web pages in the All Bookmarks view, which you can display by switching to the All Bookmarks view and selecting a page.
  212.     If you want to search for information in pages stored in the Personal Web Navigator database, you can search the database using full text search as you would any other Notes database. See online Help (Help4.nsf) for information on using full text search. 
  213.     To use an Internet search engine, such as CNet, to search all available pages on the Internet, click 
  214. ?_?__
  215. `!b`1
  216. 7`^///?
  217. ?b___
  218. `bOOO
  219. `<b!R
  220. 922 2EDFA3BC D$S
  221. *.BMP
  222. CGM Imag
  223.      and enter your search criteria.
  224.     You can change the default Internet search engine as well as other Personal Web Navigator settings in the Internet Options document. To access this document, choose Actions - Internet Options when you are using the Personal Web Navigator database.
  225. Using the Personal Web Navigator views
  226.     The Personal Web Navigator database contains the following views:
  227.     Favorites and Bookmarks 
  228.     Displays pages for which you created bookmarks and also pages that you added to the Favorites folder.
  229.     Web Bots
  230.     Web Ahead 
  231.     Notes launches a background agent, which you enable, called Web Ahead that runs on each of the pages stored in this folder. This agent retrieves all the Web pages specified by the URLs on a particular Web page and saves all the resulting Web pages in your database for you to read later. You can set the agent to retrieve the URLs several levels down from the page you specify. 
  232.     Page Minder 
  233.     Notes launches a background agent, which you enable, called Page Minder that monitors each of the Web pages stored in this folder and notifies you when the contents of that page change.
  234.     All Bookmarks
  235.      Lets you quickly view your favorite pages. You can create bookmarks for pages stored in the Personal Web Navigator database as well as pages that you access frequently on the Web.
  236.     All Pages
  237.      Displays all pages stored in the Personal Web Navigator database. You can browse these pages even when you are disconnected from the network.
  238.     Other
  239.     File Archive
  240.      Displays a list of files downloaded from Web pages, sorted in alphabetical order by file size.
  241.     House Cleaning
  242.      Displays a list of documents, sorted in ascending order by document size.
  243.     Use these views to reduce the number of documents in the database based on document or file size.
  244. Getting more information
  245.     This is just a brief summary of the features you may want to use in the Personal Web Navigator database. For additional information,
  246. '++LotusScript Development Environment:2:5:(Options):0:66
  247. '++LotusScript Development Environment:2:5:(Forward):0:1
  248. Declare Sub Click(Source As Button)
  249. '++LotusScript Development Environment:2:5:(Declarations):0:2
  250. '++LotusScript Development Environment:2:2:BindEvents:1:129
  251. Private Sub BindEvents(Byval Objectname_ As String)
  252.      Static Source As BUTTON
  253.      Set Source = Bind(Objectname_)
  254.      On Event Click From Source Call Click
  255. End Sub
  256. '++LotusScript Development Environment:2:2:Click:1:12
  257. Sub Click(Source As Button)
  258.      
  259.      Dim mailserver As String
  260.      Dim helpdb As New notesdatabase("", "")
  261.      
  262.      Dim workspace As New NotesUIWorkspace
  263.      Dim s As New notessession
  264.      mailserver = s.getenvironmentstring("MailServer", True)
  265.      
  266.      If Helpdb.open("", "help4.nsf") Then 
  267.           Call workspace.OpenDatabase ( "", "help4.nsf", "Web")
  268.      Elseif Helpdb.open("", "helplt4.nsf") Then
  269.           Call workspace.OpenDatabase ( "", "helplt4.nsf", "Web")
  270.      Elseif Helpdb.open(Mailserver, "help4.nsf") Then
  271.           Call workspace.OpenDatabase ( mailserver, "help4.nsf", "Web")
  272.      Elseif Helpdb.open(Mailserver, "helplt4.nsf") Then
  273.           Call workspace.OpenDatabase ( mailserver, "helplt4.nsf", "Web")
  274.      Else
  275.           Msgbox "Unable to locate the Notes Help Database", 16, "Error" 
  276.      End If
  277.      
  278. End Sub
  279.      click the following help icon:
  280. 60606
  281.  @  @@ @` @
  282. @@ @@@@@`@@
  283. `@ `@@`@``@
  284. O=Lotus Notes
  285. O=Lotus Notes
  286. PURSAFO
  287. |.:#U
  288. O=Lotus Notes
  289. CN=Lotus Notes Template Development/O=Lotus Notes
  290. PURSAFO
  291. ?Q9/+<1>Z
  292. %#k$sfca!bp
  293. RMTBt
  294. $INFO
  295. $BODY
  296. Times New Roman
  297. &Arial
  298. About Personal
  299. Web Navigator 5.0
  300.     Welcome to the Personal Web Navigator database.  The Personal Web Navigator database allows you to access the Internet directly from your Notes workstation.  This database acts as a repository for Web pages and files that have been downloaded so you can easily organize your pages and browse them when you are disconnected from the network. It also acts as an easy entry point for exploring the Internet.  This version of the Personal Web Navigator database allows you to make use of the integrated Notes with Internet Explorer option to view pages using Internet Explorer while keeping all of the powerful functionality of Notes.
  301.     Choose "Using This Database" from the Help menu for information on using this database. 
  302. -------------------
  303.     (Close this window to return to the database.)
  304. O=Lotus Notes
  305. O=Lotus Notes
  306. PURSAFO
  307. |.:#U
  308. O=Lotus Notes
  309. CN=Lotus Notes Template Development/O=Lotus Notes
  310. PURSAFO
  311. $INFO
  312. $BODY
  313. Categori_zed
  314. _Edit Document
  315. Send Docu_ment
  316. _Forward
  317. _Move to Folder...
  318. _Remove from Folder...
  319. Browse'++LotusScript Development Environment:2:5:(Options):0:66
  320. '++LotusScript Development Environment:2:5:(Forward):0:1
  321. Declare Sub Click(Source As Button)
  322. '++LotusScript Development Environment:2:5:(Declarations):0:2
  323. '++LotusScript Development Environment:2:2:BindEvents:1:129
  324. Private Sub BindEvents(Byval Objectname_ As String)
  325.      Static Source As BUTTON
  326.      Set Source = Bind(Objectname_)
  327.      On Event Click From Source Call Click
  328. End Sub
  329. '++LotusScript Development Environment:2:2:Click:1:12
  330. Sub Click(Source As Button)
  331.      
  332.      Browse
  333. End Sub
  334. _Deletel'++LotusScript Development Environment:2:5:(Options):0:66
  335. '++LotusScript Development Environment:2:5:(Forward):0:1
  336. Declare Sub Click(Source As Button)
  337. '++LotusScript Development Environment:2:5:(Declarations):0:2
  338. '++LotusScript Development Environment:2:2:BindEvents:1:129
  339. Private Sub BindEvents(Byval Objectname_ As String)
  340.      Static Source As BUTTON
  341.      Set Source = Bind(Objectname_)
  342.      On Event Click From Source Call Click
  343. End Sub
  344. '++LotusScript Development Environment:2:2:Click:1:12
  345. Sub Click(Source As Button)
  346.      ViewDelete
  347. End Sub
  348. _Reduce to Bookmarki'++LotusScript Development Environment:2:5:(Options):0:66
  349. '++LotusScript Development Environment:2:5:(Forward):0:1
  350. Declare Sub Click(Source As Button)
  351. '++LotusScript Development Environment:2:5:(Declarations):0:2
  352. '++LotusScript Development Environment:2:2:BindEvents:1:129
  353. Private Sub BindEvents(Byval Objectname_ As String)
  354.      Static Source As BUTTON
  355.      Set Source = Bind(Objectname_)
  356.      On Event Click From Source Call Click
  357. End Sub
  358. '++LotusScript Development Environment:2:2:Click:1:12
  359. Sub Click(Source As Button)
  360.      
  361.      Dim docCollection As NotesDocumentCollection
  362.      Dim docLocal As NotesDocument
  363.      
  364.      Set docCollection = db.UnprocessedDocuments
  365.      If (docCollection.Count = 0) Then
  366.           Msgbox "You must select a document.",16,"Error"
  367.           Exit Sub
  368.      End If
  369.      Set docLocal = docCollection.GetFirstDocument
  370.      While Not (docLocal Is Nothing)
  371.           RemoveObjects docLocal
  372.           ReduceToLink docLocal
  373.           Set docLocal = docCollection.GetNextDocument(docLocal)
  374.      Wend
  375. End Sub
  376. Print...'++LotusScript Development Environment:2:5:(Options):0:66
  377. '++LotusScript Development Environment:2:5:(Forward):0:1
  378. Declare Sub Click(Source As Button)
  379. '++LotusScript Development Environment:2:5:(Declarations):0:2
  380. '++LotusScript Development Environment:2:2:BindEvents:1:129
  381. Private Sub BindEvents(Byval Objectname_ As String)
  382.      Static Source As BUTTON
  383.      Set Source = Bind(Objectname_)
  384.      On Event Click From Source Call Click
  385. End Sub
  386. '++LotusScript Development Environment:2:2:Click:1:12
  387. Sub Click(Source As Button)
  388.      
  389.      PrintWebDocument
  390. End Sub
  391. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  392. '++LotusScript Development Environment:2:5:(Forward):0:1
  393. Declare Sub Click(Source As Button)
  394. '++LotusScript Development Environment:2:5:(Declarations):0:2
  395. '++LotusScript Development Environment:2:2:BindEvents:1:129
  396. Private Sub BindEvents(Byval Objectname_ As String)
  397.      Static Source As BUTTON
  398.      Set Source = Bind(Objectname_)
  399.      On Event Click From Source Call Click
  400. End Sub
  401. '++LotusScript Development Environment:2:2:Click:1:12
  402. Sub Click(Source As Button)
  403.      
  404.      Dim docLocal As NotesDocument
  405.      Dim docCollection As NotesDocumentCollection     
  406.      Set docCollection = db.UnprocessedDocuments
  407.      If (docCollection.Count = 0) Then
  408.           Msgbox "You must select a document.",16,"Error"
  409.           Exit Sub
  410.      Else
  411.           For j = 1 To docCollection.Count
  412.                Set docLocal = docCollection.getnthdocument(j)               
  413.                If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options", docLocal)) Then   
  414.                     Select Case docLocal.ForwardOptions(0)
  415.                     Case "1" : 'user wants to forward the URL only
  416.                          Call CreateIELink(doclocal.url(0), doclocal.title(0))
  417.                     Case "2" : 'user wants to send entire page
  418.                          Call  ViewForward(docLocal)
  419.                     End Select
  420.           'remove any remaining fields that don't need to be carried around
  421.                     docLocal.RemoveItem "ForwardOptions" 
  422.                     docLocal.save True, False
  423.                     
  424.                End If
  425.                Exit Sub
  426.           Next
  427.      End If
  428.      Exit Sub
  429. End Sub
  430. '++LotusScript Development Environment:2:5:(Options):0:74
  431. Option Public
  432. Use "InternetFunctions"
  433. '++LotusScript Development Environment:2:5:(Forward):0:1
  434. '++LotusScript Development Environment:2:5:(Declarations):0:2
  435. '++LotusScript Development Environment:2:5:(Options):0:66
  436. '++LotusScript Development Environment:2:5:(Forward):0:1
  437. Declare Sub Postopen(Source As Notesuiview)
  438. Declare Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  439. '++LotusScript Development Environment:2:5:(Declarations):0:2
  440. '++LotusScript Development Environment:2:2:BindEvents:1:129
  441. Private Sub BindEvents(Byval Objectname_ As String)
  442.      Static Source As NOTESUIVIEW
  443.      Set Source = Bind(Objectname_)
  444.      On Event Postopen From Source Call Postopen
  445.      On Event Queryaddtofolder From Source Call Queryaddtofolder
  446. End Sub
  447. '++LotusScript Development Environment:2:2:Postopen:1:12
  448. Sub Postopen(Source As Notesuiview)
  449.      InstantiateObjects
  450. End Sub
  451. '++LotusScript Development Environment:2:2:Queryaddtofolder:1:12
  452. Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  453.      Call MoveToFolder(source,target,continue)
  454. End Sub
  455. O=Lotus Notes
  456. O=Lotus Notes
  457. PURSAFO
  458. |.:#U
  459. O=Lotus Notes
  460. CN=Lotus Notes Template Development/O=Lotus Notes
  461. PURSAFO
  462. $SCRIPTOBJ_12
  463. $SCRIPTOBJ_11
  464. $TITLE
  465. $Index
  466. $Formula
  467. $FormulaClass
  468. $VIEWFORMAT
  469. $FormFormula
  470. $Comment
  471. $ACTIONS
  472. $SCRIPTOBJ_6
  473. $SCRIPTOBJ_7
  474. $SCRIPTOBJ_8
  475. $SCRIPTOBJ_9
  476. $SCRIPTOBJ_10
  477. $ViewGlobalScript
  478. $ViewGlobalScript_O
  479. $ViewScript
  480. $ViewScript_O
  481. FOLDER_DIRECTORY_OBJECT
  482. Favorites and Bookmarks|Bookmarks|Favorites|Bookmarks
  483. Personal Web Navigator Internet Options
  484. &Arial
  485. '++LotusScript Development Environment:2:5:(Options):0:74
  486. Option Public
  487. Use "InternetFunctions"
  488. '++LotusScript Development Environment:2:5:(Forward):0:1
  489. '++LotusScript Development Environment:2:5:(Declarations):0:10
  490. Dim DocWasSaved As Integer
  491. Dim HPValue As String
  492. Dim OldHPValue As String
  493. Dim SearchValue As String
  494. Dim OldSearchValue As String
  495. Dim uidoc As notesuidocument
  496.  Admin'++LotusScript Development Environment:2:5:(Options):0:66
  497. '++LotusScript Development Environment:2:5:(Forward):0:1
  498. Declare Sub Postopen(Source As Notesuidocument)
  499. Declare Sub Querysave(Source As Notesuidocument, Continue As Variant)
  500. Declare Sub Queryclose(Source As Notesuidocument, Continue As Variant)
  501. '++LotusScript Development Environment:2:5:(Declarations):0:2
  502. '++LotusScript Development Environment:2:2:BindEvents:1:129
  503. Private Sub BindEvents(Byval Objectname_ As String)
  504.      Static Source As NOTESUIDOCUMENT
  505.      Set Source = Bind(Objectname_)
  506.      On Event Postopen From Source Call Postopen
  507.      On Event Querysave From Source Call Querysave
  508.      On Event Queryclose From Source Call Queryclose
  509. End Sub
  510. '++LotusScript Development Environment:2:2:Postopen:1:12
  511. Sub Postopen(Source As Notesuidocument)
  512.      'initialize some varibales
  513.      Set w = New notesuiworkspace
  514.      Set uidoc = w.currentdocument
  515.      Set note = source.Document
  516.      Set session = New NotesSession
  517.      Set db = session.CurrentDatabase
  518.      'we need to see if a profile document exists
  519.      Set view = db.GetView("(Internet Profile)")
  520.      Set docProfile = view.GetFirstDocument
  521.      If Not (docProfile Is Nothing) Then
  522.           'clear out any existing items, even though there probably isn't any
  523.           Forall fields In note.Items
  524.                fields.Remove
  525.           End Forall
  526.                'copy the items from the docProfile to this and disable saving
  527.           docProfile.CopyAllItems note
  528.      End If
  529.      DocWasSaved = False
  530.      source.Refresh
  531. End Sub
  532. '++LotusScript Development Environment:2:2:Querysave:1:12
  533. Sub Querysave(Source As Notesuidocument, Continue As Variant)
  534.      
  535.      Dim lpSubKey1 As String
  536.      Dim IEHomePageURL As String
  537.      Dim NewHPValue As String
  538.      Dim IESearchURL As String
  539.      Dim NewSearchValue As String
  540.      
  541.      If (docProfile Is Nothing) Then
  542.           note.Saveoptions = "1"
  543.      Else
  544.           note.saveoptions = "0"
  545.           DocWasSaved = True
  546.           
  547.      End If
  548.      Call Session.Setenvironmentvar("W3LocalFormSave", "1", False)
  549.      
  550.      'If the home page or the search url have changed, write them out to the registry
  551.      
  552.      If GetcurrentLocation = "3" Then
  553.           If ( source.document.startupoptions(0) ="1") And (source.document.openurl(0) <> "") Then
  554.           'synchronize homepage with IE if Location is set to Notes with IE
  555.                NewHPValue = source.fieldgettext("OpenURL")
  556.                If NewHPValue <> OldHPValue Then
  557.                     lpSubKey1 ="SOFTWARE\Microsoft\Internet Explorer\Main"
  558.                     IEHomePageURL =  GetRegValue (lpsubkey1, "Start Page" )
  559.                     CompareResult = CompareValues (IEHomePageURL, NewHPValue)
  560.                     Select Case CompareResult
  561.                     Case "SetRegistry"
  562.           'Put the Notes Value in the W32 Registry
  563.                          Call SetRegValue(lpSubKey1, "Start Page", NewHPValue)
  564.                     Case "SetNotes"
  565.           'Put the W32 Registry value in Notes
  566.                          docprofile.OpenURL = IEHomePageURL
  567.                          Call docprofile.save(True, False)
  568.                     End Select
  569.                End If
  570.           End If
  571.           
  572.           'Sync search page values if they have changed
  573.           
  574.           NewSearchValue = source.fieldgettext("PreferredSearchEngine")
  575.           NewSearchURL = source.fieldgettext("SearchURL")
  576.           If NewSearchValue <> OldSearchValue Then
  577.                lpSubKey1 ="SOFTWARE\Microsoft\Internet Explorer\Main"
  578.                IESearchURL =  GetRegValue (lpsubkey1, "Search Page" )
  579.                CompareResult = CompareValues (IESearchURL, NewSearchURL)
  580.                Select Case CompareResult
  581.                Case "SetRegistry"
  582.           'Put the Notes Value in the W32 Registry
  583.                     Call SetRegValue(lpSubKey1, "Search Page", NewSearchURL)
  584.                Case "SetNotes"
  585.           'Put the W32 Registry value in Notes
  586.                     source.document.SearchURL = IESearchURL
  587.                End Select
  588.           End If
  589.      End If
  590. End Sub
  591. '++LotusScript Development Environment:2:2:Queryclose:1:12
  592. Sub Queryclose(Source As Notesuidocument, Continue As Variant)
  593.      source.refreshhideformulas
  594.           'see if there is a profile document
  595.      If Not (DocWasSaved) Or (docProfile Is Nothing) Then
  596.           'there isn't a profile document, go ahead and save
  597.           Exit Sub
  598.      Else
  599.           'we need to delete the items in the docprofile and copy the current items to it
  600.           Forall fields In docProfile.Items
  601.                fields.Remove
  602.           End Forall
  603.           note.CopyAllItems docProfile
  604.           docProfile.SaveOptions = "1"
  605.           docProfile.Save True, True
  606.      End If
  607. End Sub
  608. '++LotusScript Development Environment:2:5:(Options):0:66
  609. '++LotusScript Development Environment:2:5:(Forward):0:1
  610. Declare Sub Exiting(Source As Field)
  611. '++LotusScript Development Environment:2:5:(Declarations):0:2
  612. '++LotusScript Development Environment:2:2:BindEvents:1:129
  613. Private Sub BindEvents(Byval Objectname_ As String)
  614.      Static Source As FIELD
  615.      Set Source = Bind(Objectname_)
  616.      On Event Exiting From Source Call Exiting
  617. End Sub
  618. '++LotusScript Development Environment:2:2:Exiting:1:12
  619. Sub Exiting(Source As Field)
  620.      
  621. End Sub
  622. '++LotusScript Development Environment:2:5:(Options):0:66
  623. '++LotusScript Development Environment:2:5:(Forward):0:1
  624. Declare Sub Exiting(Source As Field)
  625. Declare Sub Entering(Source As Field)
  626. '++LotusScript Development Environment:2:5:(Declarations):0:2
  627. '++LotusScript Development Environment:2:2:BindEvents:1:129
  628. Private Sub BindEvents(Byval Objectname_ As String)
  629.      Static Source As FIELD
  630.      Set Source = Bind(Objectname_)
  631.      On Event Exiting From Source Call Exiting
  632.      On Event Entering From Source Call Entering
  633. End Sub
  634. '++LotusScript Development Environment:2:2:Exiting:1:12
  635. Sub Exiting(Source As Field)
  636.      
  637. End Sub
  638. '++LotusScript Development Environment:2:2:Entering:1:12
  639. Sub Entering(Source As Field)
  640.      HPvalue = uidoc.fieldgettext("OpenURL")
  641.      OldHPValue = HPvalue
  642. End Sub
  643. '++LotusScript Development Environment:2:5:(Options):0:66
  644. '++LotusScript Development Environment:2:5:(Forward):0:1
  645. Declare Sub Exiting(Source As Field)
  646. '++LotusScript Development Environment:2:5:(Declarations):0:2
  647. '++LotusScript Development Environment:2:2:BindEvents:1:129
  648. Private Sub BindEvents(Byval Objectname_ As String)
  649.      Static Source As FIELD
  650.      Set Source = Bind(Objectname_)
  651.      On Event Exiting From Source Call Exiting
  652. End Sub
  653. '++LotusScript Development Environment:2:2:Exiting:1:12
  654. Sub Exiting(Source As Field)
  655.      
  656. End Sub
  657. '++LotusScript Development Environment:2:5:(Options):0:66
  658. '++LotusScript Development Environment:2:5:(Forward):0:1
  659. Declare Sub Entering(Source As Field)
  660. Declare Sub Exiting(Source As Field)
  661. '++LotusScript Development Environment:2:5:(Declarations):0:2
  662. '++LotusScript Development Environment:2:2:BindEvents:1:129
  663. Private Sub BindEvents(Byval Objectname_ As String)
  664.      Static Source As FIELD
  665.      Set Source = Bind(Objectname_)
  666.      On Event Entering From Source Call Entering
  667.      On Event Exiting From Source Call Exiting
  668. End Sub
  669. '++LotusScript Development Environment:2:2:Entering:1:12
  670. Sub Entering(Source As Field)
  671.      Searchvalue = uidoc.fieldgettext("PreferredSearchEngine")
  672.      OldSearchValue = Searchvalue
  673. End Sub
  674. '++LotusScript Development Environment:2:2:Exiting:1:12
  675. Sub Exiting(Source As Field)
  676.      
  677. End Sub
  678. '++LotusScript Development Environment:2:5:(Options):0:66
  679. '++LotusScript Development Environment:2:5:(Forward):0:1
  680. Declare Sub Exiting(Source As Field)
  681. '++LotusScript Development Environment:2:5:(Declarations):0:2
  682. '++LotusScript Development Environment:2:2:BindEvents:1:129
  683. Private Sub BindEvents(Byval Objectname_ As String)
  684.      Static Source As FIELD
  685.      Set Source = Bind(Objectname_)
  686.      On Event Exiting From Source Call Exiting
  687. End Sub
  688. '++LotusScript Development Environment:2:2:Exiting:1:12
  689. Sub Exiting(Source As Field)
  690.      Dim  w As New notesuiworkspace
  691.      Dim uidoc As notesuidocument
  692.      Dim docnote As notesdocument
  693.      Set uidoc = w.currentdocument
  694.      uidoc.refresh
  695.      Set docnote = uidoc.document
  696.      If "" <> (uidoc.fieldgettext("*")) Then
  697.           var = docnote.GetItemValue("*")
  698.           Forall item In var
  699.                If Not (item = "*") Then
  700.                     uidoc.fieldclear(item)
  701.                End If
  702.           End Forall
  703.      End If     
  704. End Sub
  705. DiskSizeOptions
  706. ReduceReadG
  707.     0S0E
  708. Internet Options for
  709.     0S0E
  710. DisplayName
  711.     Startup options:
  712. StartUpOptionsCheck this box to specify a default Web page each time you open this database.
  713. Open home page on database open:|1
  714. http://notes.net/welcome.nsf
  715. startupoptions
  716. OpenURL
  717. You have selected to have a home page opened every time the database is opened.  Please enter a home page in the home page field.
  718.     5S6S9S10SOpenURLEnter the URL for the Web page you want to open each time you open this database.
  719.       Database size options:
  720. ReduceDays
  721.     1S2S
  722. ReduceNumDaysSelect the number of days that a page should be in the database before Notes purges it.
  723. 15306090
  724. ReduceNumMBSelect the size the database should reach before Notes warns you.
  725. 5102550
  726.     days
  727.     megabytes
  728.      Collaboration options:
  729.     Share specified Web pages and Rating documents with:
  730.     Server:
  731.     Database:
  732. web.nsf
  733. WebServer
  734. web.nsf
  735. WebServer
  736. names.nsf
  737. ($ServersLookup)
  738. WebServer
  739. WebDBName
  740.     0S0E
  741. WebDatabaseSpecify the name of the Server Web Navigator database to share Web pages and Ratings documents with.
  742. SaveHTML
  743.     0S0E
  744. Underline/Blue
  745. Anchor_styleChoose a style for URLs on Web pages.
  746. Bold/Underline/BlueUnderline/BlueBold/BlueUnderline only
  747. Times 12
  748. BodyChoose a font for the body tag on Web pages.    
  749. Times 10Times 11Times 12Helvetica 10Helvetica 11Helvetica 12Courier 10Courier 11Courier 12
  750. Courier
  751. FixedChoose a font for tags that display "fixed" type on Web pages.
  752. TimesHelveticaCourier
  753. Courier
  754. PlainChoose a font for plaintext type tags on Web pages.
  755. TimesHelveticaCourier
  756. Times
  757. AddressChoose a font for the address tag on Web pages.
  758. TimesHelveticaCourier
  759. Courier
  760. ListingChoose a font for listing type tags on Web pages.
  761. TimesHelveticaCourier
  762.      Presentation preferences:
  763.     Anchors:
  764.     Body text:
  765.     Fixed:
  766.     Plain:
  767.     Address:
  768.     Listing:
  769.      Network preferences:
  770.     Internet Network Preferences can be set by editing your current location document.
  771.     0S0E
  772.     Edit Location...
  773.     Search for updates every:
  774. SearchFrequencyChoose how often you want the agent to check to see if the contents of the page have changed.
  775. Hour|04 Hours|1Day|2Week|3
  776.     When updates are found:
  777. UpdatesFoundOptionsSpecify how you want to be alerted when the contents of the page changes.
  778. Mail the actual page|0Send a summary|1
  779.     Send to:
  780.     0S0E
  781. Page Minder
  782. sendmailto
  783. You must enter an e-mail address for Page Minder to send updates to.{
  784.     1S6S7S9S10S13S
  785. SendMailToSpecify the name of the person to alert when the contents of the page changes.
  786.     Preload Web pages:
  787. ScanAheadEnter the number of levels of pages you want this agent to retrieve.
  788.     level(s) ahead
  789.     Preferred Search Engine:
  790. PreferredSearchEngineSpecify the search engine you want to use when you click the Search button.
  791. AltaVista|0CNet|4Excite|1Lycos|2Other|5Yahoo|3
  792. PreferredSearchEngine
  793.     1S2S
  794. PreferredSearchEngine
  795. http://altavista.digital.com/
  796. PreferredSearchEngine
  797. http://www.excite.com/
  798. PreferredSearchEngine
  799. http://www.lycos.com/
  800. PreferredSearchEngine
  801. http://www.yahoo.com/
  802. PreferredSearchEngine
  803. http://www.search.com/
  804. PreferredSearchEngine
  805. SearchURL
  806. http://
  807.     3S4S5S6S7S8S9S10S11S12S13S14S15S16S17S18S19S20S21S22S23S24S25S26S27S28S33S34S35S36S38S
  808. SearchURLEnter the URL of a specific search engine you want to associate with the Search button.
  809.      Search options:
  810.      Page Minder agent preferences:
  811.      Web Ahead agent preferences:
  812. ReduceDaysChoose how you want Notes to purge the database.
  813. Reduce full pages to links if not read within:|0Remove pages from database if not read in:|1Disable|2
  814. ReduceSizeSpecify that Notes should warn you by displaying a message box when the database exceeds a certain size.
  815. Warn me when the database exceeds:|1
  816. Web Ahead
  817.     0S0E
  818. Web Ahead
  819.     0S0E
  820.     0R4S
  821. Enabled Background Agents
  822. You have just enabled a background agent on your Notes workstation.  Please make sure that you have enabled background agents in your Notes preferences by choosing File - Tools - User Preferences and selecting Enable scheduled local agents.
  823.     0R6S
  824.     Enable Web Ahead
  825. Page Minder
  826.     0S0E
  827. Page Minder
  828.     0S0E
  829.     0R4S
  830. Enabled Background Agents
  831. You have just enabled a background agent on your Notes workstation.  Please make sure that you have enabled background agents in your Notes preferences by choosing File - Tools - User Preferences and selecting Enable scheduled local agents.
  832.     0R6S
  833.     Enable Page Minder
  834.     Home Page:
  835. SendMailTo
  836. SendMailTo
  837.     1S2S3S10S11S
  838.     0S0E
  839.     Address...
  840. Page Minder
  841.     0S0E
  842. Page Minder
  843.     0S0E
  844.     Disable Page Minder
  845. Web Ahead
  846.     0S0E
  847. Web Ahead
  848.     0S0E
  849.     Disable Web Ahead
  850.     0S0E
  851. WebServerPlease enter the name of the InterNotes Server which you would like to share web pages with
  852. Housekeeping
  853. reducedays
  854.     0S0E
  855. Housekeeping
  856.     0S0E
  857.     Disable Housekeeping 
  858. Housekeeping
  859. reducedays
  860.     0S0E
  861. Housekeeping
  862.     0S0E
  863.      Enable Housekeeping 
  864.     0S0E
  865. KeepPage
  866. Automatically store pages for disconnected use|0Manually store pages for disconnected use|1
  867. SaveHTMLCheck to save the source HTML text in the HTMLSource field in the Notes document.
  868. Save as Rich Text only|0Save as Rich Text and HTML|1Save as MIME only|2
  869.     HTML Save Options:
  870. $Script1
  871. Categori_zeK
  872. _Edit Document
  873. Send Docu_ment
  874. _Forward
  875. _Move To Folder...
  876. _Remove From FolderK
  877. Close
  878.     0S0E
  879. Save 
  880.     0S0E
  881. Categori_zeK
  882. _Edit Document
  883. Send Docu_ment
  884. _Forward
  885. _Move To Folder...
  886. _Remove From FolderK
  887. Close
  888.     0S0E
  889. Save 
  890.     0S0E
  891. O=Lotus Notes
  892. O=Lotus Notes
  893. PURSAFO
  894. |.:#U
  895. O=Lotus Notes
  896. CN=Lotus Notes Template Development/O=Lotus Notes
  897. PURSAFO
  898. xyv    !
  899. Xm$Yl
  900. $INFO
  901. $WINDOWTITLE
  902. $Script
  903. $$Script_O
  904. $$ScriptName
  905. $$FormScript
  906. $$$FormScript_O
  907. $$StartUpOptions
  908. $StartUpOptions_O
  909. $$OpenURL
  910. $OpenURL_O
  911. $$ScanAhead
  912. $ScanAhead_O
  913. $$PreferredSearchEngine
  914. $PreferredSearchEngine_O
  915. $$$Script1
  916. $$Script1_O
  917. $BODY
  918. $V5ACTIONS
  919. $ACTIONS
  920. Categori_ze0
  921. _Edit Document
  922. Send Docu_ment
  923. _Forward
  924. _Move To Folder...
  925. _Remove From Folder
  926. O=Lotus Notes
  927. O=Lotus Notes
  928. PURSAFO
  929. |.:#U
  930. O=Lotus Notes
  931. CN=Lotus Notes Template Development/O=Lotus Notes
  932. PURSAFO
  933. Fde!f^^
  934. ML(_}
  935. $TITLE
  936. $Index
  937. $Formula
  938. $FormulaClass
  939. $VIEWFORMAT
  940. $Comment
  941. $ACTIONS
  942. Categori_zeK
  943. _Edit Document
  944. Send Docu_ment
  945. _Forward
  946. _Move to Folder...
  947. _Remove from Folder...
  948. Browse'++LotusScript Development Environment:2:5:(Options):0:66
  949. '++LotusScript Development Environment:2:5:(Forward):0:1
  950. Declare Sub Click(Source As Button)
  951. '++LotusScript Development Environment:2:5:(Declarations):0:2
  952. '++LotusScript Development Environment:2:2:BindEvents:1:129
  953. Private Sub BindEvents(Byval Objectname_ As String)
  954.      Static Source As BUTTON
  955.      Set Source = Bind(Objectname_)
  956.      On Event Click From Source Call Click
  957. End Sub
  958. '++LotusScript Development Environment:2:2:Click:1:12
  959. Sub Click(Source As Button)
  960.      
  961.      Browse
  962. End Sub
  963. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  964. '++LotusScript Development Environment:2:5:(Forward):0:1
  965. Declare Sub Click(Source As Button)
  966. '++LotusScript Development Environment:2:5:(Declarations):0:2
  967. '++LotusScript Development Environment:2:2:BindEvents:1:129
  968. Private Sub BindEvents(Byval Objectname_ As String)
  969.      Static Source As BUTTON
  970.      Set Source = Bind(Objectname_)
  971.      On Event Click From Source Call Click
  972. End Sub
  973. '++LotusScript Development Environment:2:2:Click:1:12
  974. Sub Click(Source As Button)
  975.      
  976.      ViewDelete
  977. End Sub
  978. Print...'++LotusScript Development Environment:2:5:(Options):0:66
  979. '++LotusScript Development Environment:2:5:(Forward):0:1
  980. Declare Sub Click(Source As Button)
  981. '++LotusScript Development Environment:2:5:(Declarations):0:2
  982. '++LotusScript Development Environment:2:2:BindEvents:1:129
  983. Private Sub BindEvents(Byval Objectname_ As String)
  984.      Static Source As BUTTON
  985.      Set Source = Bind(Objectname_)
  986.      On Event Click From Source Call Click
  987. End Sub
  988. '++LotusScript Development Environment:2:2:Click:1:12
  989. Sub Click(Source As Button)
  990.      
  991.      PrintWebDocument
  992. End Sub
  993. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  994. '++LotusScript Development Environment:2:5:(Forward):0:1
  995. Declare Sub Click(Source As Button)
  996. '++LotusScript Development Environment:2:5:(Declarations):0:2
  997. '++LotusScript Development Environment:2:2:BindEvents:1:129
  998. Private Sub BindEvents(Byval Objectname_ As String)
  999.      Static Source As BUTTON
  1000.      Set Source = Bind(Objectname_)
  1001.      On Event Click From Source Call Click
  1002. End Sub
  1003. '++LotusScript Development Environment:2:2:Click:1:12
  1004. Sub Click(Source As Button)
  1005.      
  1006.      Dim docLocal As NotesDocument
  1007.      Dim docCollection As NotesDocumentCollection     
  1008.      Set docCollection = db.UnprocessedDocuments
  1009.      If (docCollection.Count = 0) Then
  1010.           Msgbox "You must select a document.",16,"Error"
  1011.           Exit Sub
  1012.      Else
  1013.           For j = 1 To docCollection.Count
  1014.                Set docLocal = docCollection.getnthdocument(j)               
  1015.                If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options", docLocal)) Then   
  1016.                     Select Case docLocal.ForwardOptions(0)
  1017.                     Case "1" : 'user wants to forward the URL only
  1018.                          Call CreateIELink(doclocal.url(0), doclocal.title(0))
  1019.                     Case "2" : 'user wants to send entire page
  1020.                          Call  ViewForward(docLocal)
  1021.                     End Select
  1022.           'remove any remaining fields that don't need to be carried around
  1023.                     docLocal.RemoveItem "ForwardOptions" 
  1024.                     docLocal.save True, False
  1025.                     
  1026.                End If
  1027.                Exit Sub
  1028.           Next
  1029.      End If
  1030.      Exit Sub
  1031. End Sub
  1032. '++LotusScript Development Environment:2:5:(Options):0:74
  1033. Option Public
  1034. Use "InternetFunctions"
  1035. '++LotusScript Development Environment:2:5:(Forward):0:1
  1036. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1037. '++LotusScript Development Environment:2:5:(Options):0:66
  1038. '++LotusScript Development Environment:2:5:(Forward):0:1
  1039. Declare Sub Postopen(Source As Notesuiview)
  1040. Declare Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  1041. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1042. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1043. Private Sub BindEvents(Byval Objectname_ As String)
  1044.      Static Source As NOTESUIVIEW
  1045.      Set Source = Bind(Objectname_)
  1046.      On Event Postopen From Source Call Postopen
  1047.      On Event Queryaddtofolder From Source Call Queryaddtofolder
  1048. End Sub
  1049. '++LotusScript Development Environment:2:2:Postopen:1:12
  1050. Sub Postopen(Source As Notesuiview)
  1051.      InstantiateObjects
  1052. End Sub
  1053. '++LotusScript Development Environment:2:2:Queryaddtofolder:1:12
  1054. Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  1055.      Call MoveToFolder(source,target,continue)
  1056. End Sub
  1057. O=Lotus Notes
  1058. O=Lotus Notes
  1059. PURSAFO
  1060. |.:#U
  1061. O=Lotus Notes
  1062. CN=Lotus Notes Template Development/O=Lotus Notes
  1063. PURSAFO
  1064. $SCRIPTOBJ_10
  1065. $TITLE
  1066. $Index
  1067. $Formula
  1068. $FormulaClass
  1069. $Totals
  1070. $VIEWFORMAT
  1071. $Comment
  1072. $ACTIONS
  1073. $SCRIPTOBJ_6
  1074. $SCRIPTOBJ_7
  1075. $SCRIPTOBJ_8
  1076. $SCRIPTOBJ_9
  1077. $ViewGlobalScript
  1078. $ViewGlobalScript_O
  1079. $ViewScript
  1080. $ViewScript_O
  1081. '++LotusScript Development Environment:2:5:(Options):0:74
  1082. Use "InternetFunctions"
  1083. '++LotusScript Development Environment:2:5:(Forward):0:1
  1084. Declare Sub Postopen(Source As Notesuidatabase)
  1085. Declare Sub PerformWebSetup
  1086. Declare Sub ReduceDocumentsToLinks
  1087. Declare Sub RemoveDocumentsFromDatabase
  1088. Declare Function DocumentCanBeProcessed  As Integer
  1089. Declare Sub SetupExpirationDates
  1090. Declare Sub ReduceOneDocumentToLink
  1091. Declare Sub Queryclose(Source As Notesuidatabase, Continue As Variant)
  1092. '++LotusScript Development Environment:2:5:(Declarations):0:10
  1093. 'Active_X_Personal_Web_Navigator: 
  1094. Dim docCollection As NotesDocumentCollection
  1095. Dim urldoc As NotesDocument
  1096. Dim doc As NotesDocument
  1097. Dim dtExpiration As NotesDateTime
  1098. Dim dtLastAccessed As NotesDateTime
  1099. Dim hskpgagent As NotesAgent
  1100. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1101. Private Sub BindEvents(Byval Objectname_ As String)
  1102.      Static Source As NOTESUIDATABASE
  1103.      Set Source = Bind(Objectname_)
  1104.      On Event Postopen From Source Call Postopen
  1105.      On Event Queryclose From Source Call Queryclose
  1106. End Sub
  1107. '++LotusScript Development Environment:2:2:Postopen:1:12
  1108. Sub Postopen(Source As Notesuidatabase)
  1109.      'intialize variables
  1110.      InstantiateObjects
  1111.      Dim BrowserDoc As notesdocument
  1112.      Dim BrowserobjectCollection As notesdocumentcollection
  1113.      Dim iedoc As New notesdocument(db)
  1114.      Dim BrowserOption As Variant
  1115.      Dim dt As New notesdatetime ("1/1/90")
  1116.      
  1117.      On Error 4005 Goto LoadHomeURL
  1118.      
  1119.      
  1120.      'Get current location retriever value
  1121.      BrowserOption = GetLocationItem("WebRetriever")
  1122.      
  1123.      
  1124.      'ensure that the user's profile document exists
  1125.      
  1126.      If (docprofile Is Nothing) Then 
  1127.           PerformWebSetup    
  1128.           'Get the current folders in the database for future use by the bookmark function
  1129.           Goto LoadHomeURL
  1130.      Else
  1131.           'Get the current folders in the database for future use by the bookmark function
  1132.           If (docprofile.ReduceDays(0) <> "2") Then
  1133.                Set hskpgagent = db.getagent("Housekeeping")
  1134.                If Not(hskpgagent.IsEnabled) Then                
  1135.                     Msgbox "You have specified that you would like to reduce the unread pages in your Personal"  _
  1136.                     + "Web Database.  Please select Actions - Internet Options to enable the housekeeping " _
  1137.                     + "agent which will perform this task nightly at 1:00 AM.", 16,"Enable Housekeeping Agent"    
  1138.                End If
  1139.           End If
  1140.           
  1141.           If (docprofile.ReduceSize(0) = "1") Then
  1142.                'compare the current database size against the limit set in the user profile
  1143.                If (db.Size > Cdbl(docprofile.ReduceNumMB(0)) *  1048576) Then Msgbox "The size of this database exceeds the user specified amount of "_
  1144.                & docprofile.ReduceNumMB(0) & "MB.",16,"Internet Options"
  1145.           End If
  1146.           
  1147.           'open up the user's home page if they have specified one 
  1148.           If (docprofile.StartUpOptions(0) = "1") Then
  1149. LoadHomeURL: 
  1150.                If BrowserOption(0) = "3" Then
  1151.                     CheckRegistrySettings
  1152.                     Set BrowserObjectCollection = db.search(("(Form = ""WebBrowserForm""|Form=""WebBrowser4Form"")& home = ""1"""), dt, 0)
  1153.                     
  1154.                     If BrowserObjectCollection.count <> 0 Then
  1155.                          Set BrowserDoc = BrowserObjectCollection.getfirstdocument
  1156.                          Call BrowserDoc.replaceitemvalue("url", docprofile.openurl(0))
  1157.                          Call BrowserDoc.save(True, False)
  1158.                          Call w.editdocument(False, browserdoc)                         
  1159.                     Else
  1160.                          If session.GetEnvironmentString("IEVersionMinor", False)="70" Then
  1161.                               Call iedoc.replaceitemvalue("Form", "WebBrowserForm")
  1162.                          End If
  1163.                          If Cint(session.GetEnvironmentString("IEVersionMinor", False))>70 Then
  1164.                               Call iedoc.replaceitemvalue("Form", "WebBrowser4Form")
  1165.                          End If
  1166.                          Call iedoc.replaceitemvalue("home", "1")
  1167.                          Call iedoc.replaceitemvalue("SaveOptions", "1")
  1168.                          Call ieDoc.replaceitemvalue("url", docprofile.openurl(0))
  1169.                          Call ieDoc.save(True,False)
  1170.                          Call w.viewrefresh
  1171.                          Call w.editdocument(False, iedoc)
  1172.                     End If
  1173.                Elseif BrowserOption(0) = "0" Then
  1174.                     w.URLOpen docprofile.OpenURL(0)
  1175.                End If
  1176.           End If
  1177.      End If
  1178. End Sub
  1179. '++LotusScript Development Environment:2:2:PerformWebSetup:1:8
  1180. Sub PerformWebSetup
  1181.                'create the new document with default settings
  1182.      Set docprofile = New NotesDocument(db)
  1183.      docprofile.Form = "Admin"
  1184.      docprofile.StartUpOptions = "1"
  1185.      docprofile.OpenURL = "http://notes.net/welcome.nsf"
  1186.      docprofile.PreferredSearchEngine = "4"
  1187.      docprofile.SearchURL="http://www.search.com/"
  1188.      docprofile.ScanAhead = "1"
  1189.      docprofile.SearchFrequency = "2"
  1190.      docprofile.UpdatesFoundOptions = "1"
  1191.      docprofile.SendMailTo = session.UserName
  1192.      docprofile.ReduceDays = "2"
  1193.      docprofile.KeepPage = "0"
  1194.      docprofile.Save True, True
  1195. End Sub
  1196. '++LotusScript Development Environment:2:2:ReduceDocumentsToLinks:1:8
  1197. Sub ReduceDocumentsToLinks
  1198.      SetupExpirationDates
  1199.      
  1200.      Set docCollection = db.AllDocuments
  1201.      Set doc = docCollection.GetFirstDocument
  1202.      While Not (doc Is Nothing)
  1203.           If (DocumentCanBeProcessed) Then ReduceOneDocumentToLink
  1204.           Set doc = docCollection.GetNextDocument(doc)
  1205.      Wend
  1206. End Sub
  1207. '++LotusScript Development Environment:2:2:RemoveDocumentsFromDatabase:1:8
  1208. Sub RemoveDocumentsFromDatabase
  1209.      SetupExpirationDates
  1210.      
  1211.      Set docCollection = db.AllDocuments
  1212.      For i = 1 To docCollection.Count
  1213.           Set doc = docCollection.GetNthDocument(i)          
  1214.           If (DocumentCanBeProcessed) Then 
  1215.                Print "Removing pages that have not been read for " & docprofile.ReduceNumDays(0) & " days..."
  1216.                doc.Remove True
  1217.           End If               
  1218.      Next
  1219. End Sub
  1220. '++LotusScript Development Environment:2:1:DocumentCanBeProcessed:1:8
  1221. Function DocumentCanBeProcessed  As Integer
  1222. 'determines if a document meets the criteria to be reduced or removed from the database
  1223.      If (doc.Form(0) = "Admin") Then 
  1224.           DocumentCanBeProcessed = False
  1225.           Exit Function
  1226.      End If
  1227. 'if this is the home page, do not process it
  1228.      If (doc.Url(0) = docprofile.OpenUrl(0)) Then
  1229.           DocumentCanBeProcessed = False
  1230.           Exit Function          
  1231.      End If
  1232. 'compare the last accessed date/time
  1233.      dtLastAccessed.LSLocalTime = doc.LastAccessed
  1234.      If (dtExpiration.TimeDifference(dtLastAccessed) > 0) Then DocumentCanBeProcessed = True
  1235. End Function
  1236. '++LotusScript Development Environment:2:2:SetupExpirationDates:1:8
  1237. Sub SetupExpirationDates
  1238. 'initiate the date/time objects
  1239.      Set dtLastAccessed = New NotesDateTime("")
  1240.      Set dtExpiration = New NotesDateTime("")
  1241.      dtLastAccessed.SetNow
  1242.      dtExpiration.SetNow
  1243. 'dtExpired must be set back the number of days specified in the profile document
  1244.      dtExpiration.AdjustDay(-1*Cint(docprofile.ReduceNumDays(0)))
  1245. End Sub
  1246. '++LotusScript Development Environment:2:2:ReduceOneDocumentToLink:1:8
  1247. Sub ReduceOneDocumentToLink
  1248.      Print "Reducing pages that have not been read for " & docprofile.ReduceNumDays(0) & " days..."
  1249.      doc.RemoveItem "Body"
  1250.      doc.RemoveItem "HTMLSouce"
  1251.      doc.RemoveItem "HTMLBody"
  1252.      doc.RemoveItem "$Background"
  1253.      doc.RemoveItem "$FILE"
  1254.      doc.RemoveItem "URLLinks1"
  1255.      doc.RemoveItem "WebAheadStatus"
  1256.      doc.RemoveItem "WebAgentError"
  1257.      doc.RemoveItem "PageMinderStatus"
  1258.      doc.Save True,True
  1259. End Sub
  1260. '++LotusScript Development Environment:2:2:Queryclose:1:12
  1261. Sub Queryclose(Source As Notesuidatabase, Continue As Variant)
  1262.      
  1263. End Sub
  1264. x    x    $
  1265. O=Lotus Notes
  1266. O=Lotus Notes
  1267. PURSAFO
  1268. |.:#U
  1269. O=Lotus Notes
  1270. CN=Lotus Notes Template Development/O=Lotus Notes
  1271. PURSAFO
  1272. $DBScript
  1273. $DBScript_O
  1274. $TITLE
  1275. $Flags
  1276. $PublicAccess
  1277.  ShareWebPage
  1278. SharedOptions
  1279.     1S2S
  1280.     This Web page will be copied to the following Web Navigator database (the location of the Web Navigator database can be changed by choosing Actions - Internet Options from the menu)
  1281. Rating
  1282. SharedOptions
  1283.     3S4S5S6S
  1284. Rating
  1285. Rating
  1286. Rating
  1287. Rating
  1288. SharedOptions
  1289.     3S4S5S6S
  1290. Rating
  1291. Rating
  1292. Rating
  1293. Rating
  1294. SharedOptions
  1295.     3S4S5S6S
  1296. Rating
  1297. Rating
  1298. Rating
  1299. Rating
  1300. SharedOptions
  1301.     3S4S5S6S
  1302. Rating
  1303. Rating
  1304. Rating
  1305. Rating
  1306. SharedOptions
  1307.     3S4S5S6S
  1308. Rating
  1309. Rating
  1310. Rating
  1311. Rating
  1312. SharedOptions
  1313.     3S4S5S6S
  1314. Rating
  1315. Rating
  1316. Rating
  1317. Rating
  1318. SharedOptions
  1319.     3S4S5S6S
  1320. Rating
  1321. Rating
  1322. Rating
  1323. Rating
  1324. SharedOptions
  1325.     3S4S5S6S
  1326. Rating
  1327. Rating
  1328. Rating
  1329. Rating
  1330. SharedOptions
  1331.     3S4S5S6S
  1332. Rating
  1333. Rating
  1334. Rating
  1335. Rating
  1336. SharedOptions
  1337.     3S4S5S6S
  1338. Rating
  1339. Rating
  1340. Rating
  1341. SharedOptions
  1342.     1S2S
  1343. Title
  1344. Title
  1345. Poor   < ------------------------------  >   Great!
  1346. contentSelect category from list that best describes contents of this document
  1347. ArtsBusinessComputersCultureEducationEntertainmentFinanceGovernmentInternetPublicationsRecreationReferenceScienceShoppingSports
  1348. Category:
  1349. CommentsWrite your descriptive comments about the page here!
  1350. Your comments:
  1351. SharedOptions
  1352. Copy page to shared Web Navigator database|2Create Rating in shared Web Navigator database|3
  1353. SharedOptions
  1354.     1S2S
  1355.     Send URL to:
  1356. tmpWebServer
  1357. tmpWebServer
  1358. tmpWebDb
  1359. tmpWebDb
  1360.     Server:
  1361.     Path:
  1362. SharedOptions
  1363. Rating
  1364. You must enter a rating for this page.{
  1365.     3S4S5S6S7S8S
  1366. Rating
  1367. O=Lotus Notes
  1368. O=Lotus Notes
  1369. PURSAFO
  1370. |.:#U
  1371. O=Lotus Notes
  1372. CN=Lotus Notes Template Development/O=Lotus Notes
  1373. PURSAFO
  1374. nV%BS
  1375. $TITLE
  1376. $INFO
  1377. $$Script_O
  1378. $$ScriptName
  1379. $BODY
  1380. '++LotusScript Development Environment:2:5:(Options):0:74
  1381. Option Public
  1382. '++LotusScript Development Environment:2:5:(Forward):0:1
  1383. Declare Sub Initialize
  1384. Declare Sub ExtractHTTPAddress(szEntry As String) 
  1385. Declare Sub CreateBookmarkDocument
  1386. '++LotusScript Development Environment:2:5:(Declarations):0:10
  1387. Dim ws As NotesUIWorkspace
  1388. Dim session As NotesSession
  1389. Dim db As NotesDatabase
  1390. Dim bookmark As NotesDocument
  1391. Dim note As NotesDocument
  1392. Dim hFile As Integer
  1393. Dim szPath As String
  1394. Dim szEntry As String
  1395. Dim szURL As String
  1396. Dim szTitle As String
  1397. '++LotusScript Development Environment:2:2:Initialize:1:10
  1398. Sub Initialize
  1399.      
  1400. End Sub
  1401. '++LotusScript Development Environment:2:2:ExtractHTTPAddress:1:8
  1402. Sub ExtractHTTPAddress(szEntry As String) 
  1403.      Dim posHTTPBegin As Integer
  1404.      Dim posHTTPEnd As Integer
  1405.      Dim posTITLEBegin As Integer
  1406.      Dim posTITLEEnd As Integer
  1407.      
  1408. 'first, get the position of an HTTP referece
  1409.      posHTTPBegin = Instr(1,szEntry,"http",5)
  1410.      If (posHTTPBegin = 0) Then 
  1411.           szURL = ""
  1412.           Exit Sub
  1413.      Else
  1414. 'get the position of the closing quote
  1415.           posHTTPEnd = Instr(posHTTPBegin,szEntry,"/""",5)
  1416.           szURL = Mid$(szEntry,posHTTPBegin,(posHTTPEnd-posHTTPBegin)+1)
  1417. 'now, we need to get the title
  1418.           posTITLEBegin = Instr(posHTTPEnd,szEntry,">",5)
  1419.           If (posTITLEBegin = 0) Then
  1420.                szTitle = ""
  1421.           Else
  1422.                posTITLEEnd = Instr(posTITLEBegin,szEntry,"</a",5)
  1423.                szTitle = Mid$(szEntry,posTITLEBegin+1,(posTITLEEnd-posTITLEBegin)-1)               
  1424.           End If
  1425.      End If   
  1426. End Sub
  1427. '++LotusScript Development Environment:2:2:CreateBookmarkDocument:1:8
  1428. Sub CreateBookmarkDocument
  1429.      
  1430.      Set bookmark = New NotesDocument(db)
  1431.      
  1432.      bookmark.URL = szURL
  1433.      bookmark.Form = "HTMLForm"
  1434.      bookmark.Title = szTitle
  1435.      bookmark.Subject = szTitle
  1436.      bookmark.Imported = True     
  1437.      Call bookmark.Save(True,True,True)
  1438.      Call bookmark.PutInFolder("My Bookmarks")
  1439.      
  1440. End Sub
  1441. (ImportBookmark)'++LotusScript Development Environment:2:5:(Options):0:66
  1442. '++LotusScript Development Environment:2:5:(Forward):0:1
  1443. Declare Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  1444. Declare Sub Postopen(Source As Notesuidocument)
  1445. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1446. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1447. Private Sub BindEvents(Byval Objectname_ As String)
  1448.      Static Source As NOTESUIDOCUMENT
  1449.      Set Source = Bind(Objectname_)
  1450.      On Event Queryopen From Source Call Queryopen
  1451.      On Event Postopen From Source Call Postopen
  1452. End Sub
  1453. '++LotusScript Development Environment:2:2:Queryopen:1:12
  1454. Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  1455.      
  1456. End Sub
  1457. '++LotusScript Development Environment:2:2:Postopen:1:12
  1458. Sub Postopen(Source As Notesuidocument)
  1459.      Set ws = New NotesUIWorkspace
  1460.      Set session = New NotesSession
  1461.      Set db = session.CurrentDatabase
  1462.      Set note = source.Document
  1463. End Sub
  1464.     Netscape Bookmark file:
  1465. BookmarkFile
  1466. bookmarkfile
  1467. Choose path for Netscape Bookmarks
  1468.     1S2S
  1469.     Browse...
  1470.     For example, C:\NETSCAPE\NAVIGATOR\BOOKMARK.HTM
  1471. O=Lotus Notes
  1472. O=Lotus Notes
  1473. PURSAFO
  1474. |.:#U
  1475. O=Lotus Notes
  1476. CN=Lotus Notes Template Development/O=Lotus Notes
  1477. PURSAFO
  1478. $TITLE
  1479. $INFO
  1480. $Script
  1481. $$Script_O
  1482. $$ScriptName
  1483. $$FormScript
  1484. $$$FormScript_O
  1485. $BODY
  1486. (ImportFavorite)
  1487.     Microsoft Favorites Directory or filename:
  1488. BookmarkFile
  1489.     For example, C:\WIN95\PROFILES\USERNAME\FAVORITES
  1490. bookmarkfile
  1491. Choose path for Microsoft Favorite
  1492.     1S2S
  1493.     Browse...
  1494. O=Lotus Notes
  1495. O=Lotus Notes
  1496. PURSAFO
  1497. |.:#U
  1498. O=Lotus Notes
  1499. CN=Lotus Notes Template Development/O=Lotus Notes
  1500. PURSAFO
  1501. [:dsk
  1502. $TITLE
  1503. $INFO
  1504. $$ScriptName
  1505. $BODY
  1506. 11/03/97 11:35:36 AM Teresa Deane/Iris updated [-Default-]
  1507. 11/03/97 11:35:16 AM Teresa Deane/Iris added [-Default-]
  1508. 11/03/97 11:34:30 AM Teresa Deane/Iris updated OtherDomainServers
  1509. 11/03/97 11:34:16 AM Teresa Deane/Iris updated LocalDomainServers
  1510. 05/21/97 12:51:15 PM Teresa Deane/Iris updated [OtherDomainServers]
  1511. 05/21/97 12:51:07 PM Teresa Deane/Iris added [OtherDomainServers]
  1512. 05/21/97 12:50:59 PM Teresa Deane/Iris updated OtherDomainServers
  1513. 05/21/97 12:50:56 PM Teresa Deane/Iris updated LocalDomainServers
  1514. 05/21/97 12:50:52 PM Teresa Deane/Iris updated [LocalDomainServers]
  1515. 05/21/97 12:50:45 PM Teresa Deane/Iris added [LocalDomainServers]
  1516. 05/21/97 12:50:36 PM Teresa Deane/Iris deleted Teresa Deane/Iris
  1517. 05/21/97 12:50:33 PM Teresa Deane/Iris deleted Teresa Deane/Deane
  1518. 05/20/97 02:17:48 PM Teresa Deane/Iris added Teresa Deane/Deane
  1519. 05/20/97 02:17:46 PM Teresa Deane/Iris updated Teresa Deane/Iris
  1520. 05/20/97 02:17:46 PM Teresa Deane/Iris added Teresa Deane/Iris
  1521. 05/20/97 02:17:46 PM Teresa Deane/Iris added LocalDomainServers
  1522. 05/20/97 02:17:46 PM Teresa Deane/Iris added OtherDomainServers
  1523. -Default-
  1524. OtherDomainServers
  1525. LocalDomainServers
  1526. [LocalDomainServers]
  1527. [OtherDomainServers]
  1528. [-Default-]
  1529. WebRefreshFailed
  1530. Refresh of 
  1531. Title
  1532.  failed
  1533. Title
  1534.     3S4S9S10S
  1535. &Arial
  1536. '++LotusScript Development Environment:2:5:(Options):0:74
  1537. Option Public
  1538. Use "InternetFunctions"
  1539. '++LotusScript Development Environment:2:5:(Forward):0:1
  1540. Declare Sub Initialize
  1541. Declare Sub InstantiateFormObjects
  1542. '++LotusScript Development Environment:2:5:(Declarations):0:10
  1543. Dim uidoc As NotesUIDocument
  1544. Dim doc As NotesDocument
  1545. '++LotusScript Development Environment:2:2:Initialize:1:10
  1546. Sub Initialize
  1547.      
  1548. End Sub
  1549. '++LotusScript Development Environment:2:2:InstantiateFormObjects:1:8
  1550. Sub InstantiateFormObjects
  1551. 'call the global instantiate objects     
  1552.      InstantiateObjects
  1553.      Set uidoc = w.CurrentDocument    
  1554.      Set doc = uidoc.Document     
  1555. End Sub
  1556. HTMLForm'++LotusScript Development Environment:2:5:(Options):0:66
  1557. '++LotusScript Development Environment:2:5:(Forward):0:1
  1558. Declare Sub Postopen(Source As Notesuidocument)
  1559. Declare Sub Terminate
  1560. Declare Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  1561. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1562. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1563. Private Sub BindEvents(Byval Objectname_ As String)
  1564.     Static Source As NOTESUIDOCUMENT
  1565.     Set Source = Bind(Objectname_)
  1566.     On Event Postopen From Source Call Postopen
  1567.     On Event Queryopen From Source Call Queryopen
  1568. End Sub
  1569. '++LotusScript Development Environment:2:2:Postopen:1:12
  1570. Sub Postopen(Source As Notesuidocument)
  1571.     'Dim doc As notesdocument
  1572.     'Dim w As New notesuiworkspace
  1573.     'Dim locationdoc As notesdocument
  1574.     'Dim BrowserObjectCollection As notesdocumentcollection
  1575.     'Dim dt As New notesdatetime ("1/1/90")
  1576.     'Dim BrowserDoc As notesdocument
  1577.     'source.refreshhideformulas
  1578. 'If we are in the process of forwarding the document, don't open it with the web browser form.     
  1579.     'If source.document.forward(0) = "1" Then
  1580.     '    Exit Sub
  1581.     'End If
  1582.     'If Not (source.inpreviewpane)  Then
  1583.     '    InstantiateObjects
  1584.     '    Set doc = source.document
  1585.     '    Dim url As String
  1586.     '    url = doc.url(0)
  1587.     '    If GetcurrentLocation = "3" Then
  1588.     '        source.close
  1589.     '        w.urlopen(url)
  1590.     '    End If
  1591.     'End If
  1592. End Sub
  1593. '++LotusScript Development Environment:2:2:Terminate:1:10
  1594. Sub Terminate
  1595. End Sub
  1596. '++LotusScript Development Environment:2:2:Queryopen:1:12
  1597. Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  1598. End Sub
  1599. Lotus Product)
  1600. V0.0^
  1601. D-43#
  1602. A}L%K<$S
  1603. A}d8}
  1604. A}d8}
  1605. A}t8}
  1606. A}L%K<$S
  1607. K<#, 4#
  1608. ^,FK<
  1609. K<FQT>}
  1610. K<F,T8
  1611. K<#, 4#
  1612. K<#, 4#
  1613. ^LFK<#,
  1614. ^\FK<#-X3#
  1615. K\F,`>#
  1616. ^lFK<#-X3#
  1617. KLF,P;#
  1618. K<F,T8
  1619. E}89J
  1620. K|F-43#
  1621.                                                                                                                                                                                         
  1622. Title:
  1623. Title
  1624. Title
  1625. You must enter a subject for your document.
  1626. Title
  1627.                         
  1628. URL:        
  1629. Stub/Status:
  1630. HTTPStatus
  1631. Type:        
  1632. Host:        
  1633.             File Name:    
  1634.     0S0E
  1635. FileName
  1636. SaveOptions
  1637. Subject
  1638. Subject
  1639.     1S2S3S
  1640. Subject
  1641. Title
  1642. Subject
  1643.                                                                                                                                                                                         
  1644. '++LotusScript Development Environment:2:5:(Options):0:66
  1645. '++LotusScript Development Environment:2:5:(Forward):0:1
  1646. Declare Sub Click(Source As Button)
  1647. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1648. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1649. Private Sub BindEvents(Byval Objectname_ As String)
  1650.      Static Source As BUTTON
  1651.      Set Source = Bind(Objectname_)
  1652.      On Event Click From Source Call Click
  1653. End Sub
  1654. '++LotusScript Development Environment:2:2:Click:1:12
  1655. Sub Click(Source As Button)
  1656.      
  1657.      If (doc Is Nothing) Then InstantiateFormObjects
  1658.      OpenHomeURL
  1659. End Sub
  1660. Forward
  1661. Forward
  1662. '++LotusScript Development Environment:2:5:(Options):0:66
  1663. '++LotusScript Development Environment:2:5:(Forward):0:1
  1664. Declare Sub Click(Source As Button)
  1665. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1666. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1667. Private Sub BindEvents(Byval Objectname_ As String)
  1668.      Static Source As BUTTON
  1669.      Set Source = Bind(Objectname_)
  1670.      On Event Click From Source Call Click
  1671. End Sub
  1672. '++LotusScript Development Environment:2:2:Click:1:12
  1673. Sub Click(Source As Button)
  1674.      InstantiateFormObjects
  1675.      Call NotesForwardNote(doc)
  1676. End Sub
  1677. Print... 
  1678.     0S0E
  1679. Share...'++LotusScript Development Environment:2:5:(Options):0:66
  1680. '++LotusScript Development Environment:2:5:(Forward):0:1
  1681. Declare Sub Click(Source As Button)
  1682. Declare Function GetInternetProfile As NotesDocument
  1683. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1684. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1685. Private Sub BindEvents(Byval Objectname_ As String)
  1686.      Static Source As BUTTON
  1687.      Set Source = Bind(Objectname_)
  1688.      On Event Click From Source Call Click
  1689. End Sub
  1690. '++LotusScript Development Environment:2:2:Click:1:12
  1691. Sub Click(Source As Button)
  1692.      If (doc Is Nothing) Then InstantiateFormObjects
  1693.      If doc.hasitem("URL") Then
  1694.           If (docProfile Is Nothing) Then
  1695.                Msgbox "You need to specify a Web Server and Web Database to share pages with. Choose Actions - Internet Options from the menu."
  1696.                Exit Sub 
  1697.           End If
  1698.           doc.tmpWebServer  = docProfile.WebServer
  1699.           doc.tmpWebDb = docProfile.WebDatabase
  1700.       'first, display a prompt to get user input
  1701.           If (w.DialogBox("ShareWebPage",True,True,"Share Options")) Then
  1702.                doc.Save True, True
  1703.           'determine which action we need to take
  1704.                Select Case doc.SharedOptions(0)
  1705.        '   Case "1" : 'user wants to forward this as a bookmark
  1706.                'CreateNotesLink doc               
  1707.                Case "2" : 'user wants to copy this to the shared web database
  1708.                     CopyDocumentToSharedDatabase doc, doc.url(0)               
  1709.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  1710.                     CreateRatingDocument doc, doc.url(0), doc.title(0)
  1711.                End Select
  1712.           'remove any remaining fields that don't need to be carried around
  1713.                doc.removeItem "ForwardTo"
  1714.                doc.RemoveItem "SharedOptions" 
  1715.                doc.removeItem "ForwardTo"
  1716.                doc.RemoveItem "SharedOptions" 
  1717.                doc.RemoveItem "Rating"
  1718.                doc.removeItem "Content"
  1719.                doc.removeItem "Comments"
  1720.                doc.RemoveItem "tmpWebServer"
  1721.                doc.RemoveItem "tmpWebDb"
  1722.                doc.Save True,True          
  1723.           End If
  1724.      Else
  1725.           Msgbox "This document does not contain a URL."
  1726.      End If
  1727. End Sub
  1728. '++LotusScript Development Environment:2:1:GetInternetProfile:1:8
  1729. Function GetInternetProfile As NotesDocument
  1730.      'we need to get the profile document to make sure this is feasible and to get the location of the shared db
  1731.      Set view = db.getView("(Internet Profile)")
  1732.      Set GetInternetProfile = view.GetFirstDocument
  1733. End Function
  1734. Internet Profiles
  1735. Internet Options
  1736. webserver
  1737.     12S13S
  1738. Categori_ze 
  1739. _Edit Document
  1740. Send Docu_ment    
  1741. _Remove from Folder...
  1742. Open History Folder 
  1743. Import Microsoft Favorites...
  1744. '++LotusScript Development Environment:2:5:(Options):0:66
  1745. '++LotusScript Development Environment:2:5:(Forward):0:1
  1746. Declare Sub Click(Source As Button)
  1747. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1748. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1749. Private Sub BindEvents(Byval Objectname_ As String)
  1750.      Static Source As BUTTON
  1751.      Set Source = Bind(Objectname_)
  1752.      On Event Click From Source Call Click
  1753. End Sub
  1754. '++LotusScript Development Environment:2:2:Click:1:12
  1755. Sub Click(Source As Button)
  1756.      ImportFavorites
  1757. End Sub
  1758. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  1759. '++LotusScript Development Environment:2:5:(Forward):0:1
  1760. Declare Sub Click(Source As Button)
  1761. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1762. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1763. Private Sub BindEvents(Byval Objectname_ As String)
  1764.      Static Source As BUTTON
  1765.      Set Source = Bind(Objectname_)
  1766.      On Event Click From Source Call Click
  1767. End Sub
  1768. '++LotusScript Development Environment:2:2:Click:1:12
  1769. Sub Click(Source As Button)
  1770.      ImportBookmarks
  1771. End Sub
  1772. '++LotusScript Development Environment:2:5:(Options):0:66
  1773. '++LotusScript Development Environment:2:5:(Forward):0:1
  1774. Declare Sub Click(Source As Button)
  1775. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1776. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1777. Private Sub BindEvents(Byval Objectname_ As String)
  1778.      Static Source As BUTTON
  1779.      Set Source = Bind(Objectname_)
  1780.      On Event Click From Source Call Click
  1781. End Sub
  1782. '++LotusScript Development Environment:2:2:Click:1:12
  1783. Sub Click(Source As Button)
  1784.      
  1785.      If (doc Is Nothing) Then InstantiateFormObjects
  1786.      OpenHomeURL
  1787. End Sub
  1788. Forwardn
  1789. Forward+'++LotusScript Development Environment:2:5:(Options):0:66
  1790. '++LotusScript Development Environment:2:5:(Forward):0:1
  1791. Declare Sub Click(Source As Button)
  1792. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1793. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1794. Private Sub BindEvents(Byval Objectname_ As String)
  1795.      Static Source As BUTTON
  1796.      Set Source = Bind(Objectname_)
  1797.      On Event Click From Source Call Click
  1798. End Sub
  1799. '++LotusScript Development Environment:2:2:Click:1:12
  1800. Sub Click(Source As Button)
  1801.      InstantiateFormObjects
  1802.      Call NotesForwardNote(doc)
  1803. End Sub
  1804. Print... 
  1805.     0S0E
  1806. Share...'++LotusScript Development Environment:2:5:(Options):0:66
  1807. '++LotusScript Development Environment:2:5:(Forward):0:1
  1808. Declare Sub Click(Source As Button)
  1809. Declare Function GetInternetProfile As NotesDocument
  1810. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1811. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1812. Private Sub BindEvents(Byval Objectname_ As String)
  1813.      Static Source As BUTTON
  1814.      Set Source = Bind(Objectname_)
  1815.      On Event Click From Source Call Click
  1816. End Sub
  1817. '++LotusScript Development Environment:2:2:Click:1:12
  1818. Sub Click(Source As Button)
  1819.      If (doc Is Nothing) Then InstantiateFormObjects
  1820.      If doc.hasitem("URL") Then
  1821.           If (docProfile Is Nothing) Then
  1822.                Msgbox "You need to specify a Web Server and Web Database to share pages with. Choose Actions - Internet Options from the menu."
  1823.                Exit Sub 
  1824.           End If
  1825.           doc.tmpWebServer  = docProfile.WebServer
  1826.           doc.tmpWebDb = docProfile.WebDatabase
  1827.       'first, display a prompt to get user input
  1828.           If (w.DialogBox("ShareWebPage",True,True,"Share Options")) Then
  1829.                doc.Save True, True
  1830.           'determine which action we need to take
  1831.                Select Case doc.SharedOptions(0)
  1832.        '   Case "1" : 'user wants to forward this as a bookmark
  1833.                'CreateNotesLink doc               
  1834.                Case "2" : 'user wants to copy this to the shared web database
  1835.                     CopyDocumentToSharedDatabase doc, doc.url(0)               
  1836.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  1837.                     CreateRatingDocument doc, doc.url(0), doc.title(0)
  1838.                End Select
  1839.           'remove any remaining fields that don't need to be carried around
  1840.                doc.removeItem "ForwardTo"
  1841.                doc.RemoveItem "SharedOptions" 
  1842.                doc.removeItem "ForwardTo"
  1843.                doc.RemoveItem "SharedOptions" 
  1844.                doc.RemoveItem "Rating"
  1845.                doc.removeItem "Content"
  1846.                doc.removeItem "Comments"
  1847.                doc.RemoveItem "tmpWebServer"
  1848.                doc.RemoveItem "tmpWebDb"
  1849.                doc.Save True,True          
  1850.           End If
  1851.      Else
  1852.           Msgbox "This document does not contain a URL."
  1853.      End If
  1854. End Sub
  1855. '++LotusScript Development Environment:2:1:GetInternetProfile:1:8
  1856. Function GetInternetProfile As NotesDocument
  1857.      'we need to get the profile document to make sure this is feasible and to get the location of the shared db
  1858.      Set view = db.getView("(Internet Profile)")
  1859.      Set GetInternetProfile = view.GetFirstDocument
  1860. End Function
  1861. Internet Profiles
  1862. Internet Options
  1863. webserver
  1864.     12S13S
  1865. Categori_zen
  1866. _Edit Document
  1867. Send Docu_ment    
  1868. _Remove from Folder...
  1869. Open History Folder 
  1870. Import Microsoft Favorites...
  1871. '++LotusScript Development Environment:2:5:(Options):0:66
  1872. '++LotusScript Development Environment:2:5:(Forward):0:1
  1873. Declare Sub Click(Source As Button)
  1874. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1875. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1876. Private Sub BindEvents(Byval Objectname_ As String)
  1877.      Static Source As BUTTON
  1878.      Set Source = Bind(Objectname_)
  1879.      On Event Click From Source Call Click
  1880. End Sub
  1881. '++LotusScript Development Environment:2:2:Click:1:12
  1882. Sub Click(Source As Button)
  1883.      ImportFavorites
  1884. End Sub
  1885. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  1886. '++LotusScript Development Environment:2:5:(Forward):0:1
  1887. Declare Sub Click(Source As Button)
  1888. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1889. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1890. Private Sub BindEvents(Byval Objectname_ As String)
  1891.      Static Source As BUTTON
  1892.      Set Source = Bind(Objectname_)
  1893.      On Event Click From Source Call Click
  1894. End Sub
  1895. '++LotusScript Development Environment:2:2:Click:1:12
  1896. Sub Click(Source As Button)
  1897.      ImportBookmarks
  1898. End Sub
  1899. O=Lotus Notes
  1900. O=Lotus Notes
  1901. PURSAFO
  1902. |.:#U
  1903. O=Lotus Notes
  1904. CN=Lotus Notes Template Development/O=Lotus Notes
  1905. PURSAFO
  1906. Counter
  1907. $Hotspot0_O
  1908. Created
  1909. Expiration
  1910. Privacy_flags
  1911. Original_Date
  1912. Last_Modified
  1913. $SCRIPTOBJ_21
  1914. $SCRIPTOBJ_20
  1915. $SCRIPTOBJ_16
  1916. $SCRIPTOBJ_17
  1917. $INFO
  1918. $WINDOWTITLE
  1919. $Script
  1920. $$Script_O
  1921. $$ScriptName
  1922. $$FormScript
  1923. $$$FormScript_O
  1924. $BODY
  1925. $V5ACTIONS
  1926. $ACTIONS
  1927. $SCRIPTOBJ_0
  1928. $SCRIPTOBJ_2
  1929. $SCRIPTOBJ_4
  1930. $SCRIPTOBJ_11
  1931. $SCRIPTOBJ_12
  1932. Browse'++LotusScript Development Environment:2:5:(Options):0:66
  1933. '++LotusScript Development Environment:2:5:(Forward):0:1
  1934. Declare Sub Click(Source As Button)
  1935. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1936. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1937. Private Sub BindEvents(Byval Objectname_ As String)
  1938.      Static Source As BUTTON
  1939.      Set Source = Bind(Objectname_)
  1940.      On Event Click From Source Call Click
  1941. End Sub
  1942. '++LotusScript Development Environment:2:2:Click:1:12
  1943. Sub Click(Source As Button)
  1944.      Browse
  1945.      
  1946. End Sub
  1947. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  1948. '++LotusScript Development Environment:2:5:(Forward):0:1
  1949. Declare Sub Click(Source As Button)
  1950. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1951. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1952. Private Sub BindEvents(Byval Objectname_ As String)
  1953.      Static Source As BUTTON
  1954.      Set Source = Bind(Objectname_)
  1955.      On Event Click From Source Call Click
  1956. End Sub
  1957. '++LotusScript Development Environment:2:2:Click:1:12
  1958. Sub Click(Source As Button)
  1959.      ViewDelete     
  1960.      
  1961. End Sub
  1962. Print...'++LotusScript Development Environment:2:5:(Options):0:66
  1963. '++LotusScript Development Environment:2:5:(Forward):0:1
  1964. Declare Sub Click(Source As Button)
  1965. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1966. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1967. Private Sub BindEvents(Byval Objectname_ As String)
  1968.      Static Source As BUTTON
  1969.      Set Source = Bind(Objectname_)
  1970.      On Event Click From Source Call Click
  1971. End Sub
  1972. '++LotusScript Development Environment:2:2:Click:1:12
  1973. Sub Click(Source As Button)
  1974.      PrintWebDocument
  1975.      
  1976. End Sub
  1977. _Search.'++LotusScript Development Environment:2:5:(Options):0:66
  1978. '++LotusScript Development Environment:2:5:(Forward):0:1
  1979. Declare Sub Click(Source As Button)
  1980. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1981. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1982. Private Sub BindEvents(Byval Objectname_ As String)
  1983.      Static Source As BUTTON
  1984.      Set Source = Bind(Objectname_)
  1985.      On Event Click From Source Call Click
  1986. End Sub
  1987. '++LotusScript Development Environment:2:2:Click:1:12
  1988. Sub Click(Source As Button)
  1989.      
  1990.      Dim docLocal As NotesDocument
  1991.      Dim docCollection As NotesDocumentCollection     
  1992.      Set docCollection = db.UnprocessedDocuments
  1993.      If (docCollection.Count = 0) Then
  1994.           Msgbox "You must select a document.",16,"Error"
  1995.           Exit Sub
  1996.      End If
  1997.      Set docLocal = docCollection.GetFirstDocument
  1998.      OpenSearchSite docLocal
  1999. End Sub
  2000. $IndexY
  2001.     0S0E
  2002. _Forward
  2003. Sh_are...b'++LotusScript Development Environment:2:5:(Options):0:66
  2004. '++LotusScript Development Environment:2:5:(Forward):0:1
  2005. Declare Sub Click(Source As Button)
  2006. Declare Function GetInternetProfile
  2007. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2008. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2009. Private Sub BindEvents(Byval Objectname_ As String)
  2010.      Static Source As BUTTON
  2011.      Set Source = Bind(Objectname_)
  2012.      On Event Click From Source Call Click
  2013. End Sub
  2014. '++LotusScript Development Environment:2:2:Click:1:12
  2015. Sub Click(Source As Button)
  2016.      
  2017.      Dim docLocal As NotesDocument
  2018.      Dim webdoc As notesdocument
  2019.      Dim docCollection As NotesDocumentCollection     
  2020.      Set docCollection = db.UnprocessedDocuments
  2021.      If (docCollection.Count = 0) Then
  2022.           Msgbox "You must select a document.",16,"Error"
  2023.           Exit Sub
  2024.      End If
  2025.      Set docLocal = docCollection.GetFirstDocument
  2026.      If docLocal.hasitem("URL") Then
  2027.           docLocal.tmpWebServer  = docProfile.WebServer
  2028.           docLocal.tmpWebDb = docProfile.WebDatabase
  2029.           docLocal.Save True, True
  2030.           If (w.DialogBox("ShareWebPage", True, True, False, False, False, False, "Share Options", doclocal)) Then
  2031.                docLocal.Save True, True
  2032.                Select Case docLocal.SharedOptions(0)
  2033.                'case 1 was previously forward bookmark.  That's now done off of the forward option
  2034.                Case "2" : 'user wants to copy this to the shared web database
  2035.                     If docLocal.Form(0) = "WebBrowserForm" Then
  2036.                          CopyDocumentToSharedDatabase docLocal, browserobject.locationurl
  2037.                     Else
  2038.                          CopyDocumentToSharedDatabase docLocal, docLocal.url(0)
  2039.                     End If
  2040.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  2041.                     If docLocal.Form(0) = "WebBrowserForm" Then
  2042.                          CreateRatingDocument docLocal, browserobject.locationurl,browserobject.locationname
  2043.                     Else
  2044.                          CreateRatingDocument docLocal,docLocal.url(0),docLocal.title(0)
  2045.                     End If
  2046.                End Select
  2047.           'remove any remaining fields that don't need to be carried around
  2048.                docLocal.removeItem "ForwardTo"
  2049.                docLocal.RemoveItem "SharedOptions" 
  2050.                docLocal.RemoveItem "Rating"
  2051.                docLocal.removeItem "Content"
  2052.                docLocal.removeItem "Comments"
  2053.           End If     
  2054.           docLocal.RemoveItem "tmpWebServer"
  2055.           docLocal.RemoveItem "tmpWebDb"
  2056.           docLocal.Save True, True
  2057.      Else
  2058.           Msgbox "This document does not contain a URL."
  2059.      End If
  2060. End Sub
  2061. '++LotusScript Development Environment:2:1:GetInternetProfile:1:8
  2062. Function GetInternetProfile
  2063.          'we need to get the profile document to make sure this is feasible and to get the location of the shared db
  2064.      Set view = db.getView("(Internet Profile)")
  2065.      Set GetInternetProfile = view.GetFirstDocument
  2066. End Function
  2067. Internet Profiles
  2068. Internet Options
  2069. WebServer
  2070.     0S0E
  2071. Categori_ze
  2072. _Edit Document
  2073. Send Docu_ment    
  2074. _Move to Folder...
  2075. Move Page to Folder... 
  2076.     0S0E
  2077. _Remove from Folder...
  2078. _Reduce to Bookmarko'++LotusScript Development Environment:2:5:(Options):0:66
  2079. '++LotusScript Development Environment:2:5:(Forward):0:1
  2080. Declare Sub Click(Source As Button)
  2081. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2082. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2083. Private Sub BindEvents(Byval Objectname_ As String)
  2084.      Static Source As BUTTON
  2085.      Set Source = Bind(Objectname_)
  2086.      On Event Click From Source Call Click
  2087. End Sub
  2088. '++LotusScript Development Environment:2:2:Click:1:12
  2089. Sub Click(Source As Button)
  2090.      
  2091.      Dim docCollection As NotesDocumentCollection
  2092.      Dim docLocal As NotesDocument
  2093.      
  2094.      Set docCollection = db.UnprocessedDocuments
  2095.      If (docCollection.Count = 0) Then
  2096.           Msgbox "You must select a document.",16,"Error"
  2097.           Exit Sub
  2098.      End If
  2099.      Set docLocal = docCollection.GetFirstDocument
  2100.      While Not (docLocal Is Nothing)
  2101.           RemoveObjects docLocal
  2102.           ReduceToLink docLocal
  2103.           Set docLocal = docCollection.GetNextDocument(docLocal)
  2104.      Wend
  2105. End Sub
  2106. Import Microsoft Favorites...t'++LotusScript Development Environment:2:5:(Options):0:66
  2107. '++LotusScript Development Environment:2:5:(Forward):0:1
  2108. Declare Sub Click(Source As Button)
  2109. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2110. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2111. Private Sub BindEvents(Byval Objectname_ As String)
  2112.      Static Source As BUTTON
  2113.      Set Source = Bind(Objectname_)
  2114.      On Event Click From Source Call Click
  2115. End Sub
  2116. '++LotusScript Development Environment:2:2:Click:1:12
  2117. Sub Click(Source As Button)
  2118.      
  2119.      ImportFavorites
  2120. End Sub
  2121. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  2122. '++LotusScript Development Environment:2:5:(Forward):0:1
  2123. Declare Sub Click(Source As Button)
  2124. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2125. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2126. Private Sub BindEvents(Byval Objectname_ As String)
  2127.      Static Source As BUTTON
  2128.      Set Source = Bind(Objectname_)
  2129.      On Event Click From Source Call Click
  2130. End Sub
  2131. '++LotusScript Development Environment:2:2:Click:1:12
  2132. Sub Click(Source As Button)
  2133.      
  2134.      ImportBookmarks
  2135. End Sub
  2136. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  2137. '++LotusScript Development Environment:2:5:(Forward):0:1
  2138. Declare Sub Click(Source As Button)
  2139. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2140. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2141. Private Sub BindEvents(Byval Objectname_ As String)
  2142.      Static Source As BUTTON
  2143.      Set Source = Bind(Objectname_)
  2144.      On Event Click From Source Call Click
  2145. End Sub
  2146. '++LotusScript Development Environment:2:2:Click:1:12
  2147. Sub Click(Source As Button)
  2148.      
  2149.      Dim docLocal As NotesDocument
  2150.      Dim docCollection As NotesDocumentCollection     
  2151.      Set docCollection = db.UnprocessedDocuments
  2152.      If (docCollection.Count = 0) Then
  2153.           Msgbox "You must select a document.",16,"Error"
  2154.           Exit Sub
  2155.      Else
  2156.           For j = 1 To docCollection.Count
  2157.                Set docLocal = docCollection.getnthdocument(j)               
  2158.                If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options", docLocal)) Then   
  2159.                     Select Case docLocal.ForwardOptions(0)
  2160.                     Case "1" : 'user wants to forward the URL only
  2161.                          Call CreateIELink(doclocal.url(0), doclocal.title(0))
  2162.                     Case "2" : 'user wants to send entire page
  2163.                          Call  ViewForward(docLocal)
  2164.                     End Select
  2165.           'remove any remaining fields that don't need to be carried around
  2166.                     docLocal.RemoveItem "ForwardOptions" 
  2167.                     docLocal.save True, False
  2168.                     
  2169.                End If
  2170.                Exit Sub
  2171.           Next
  2172.      End If
  2173.      Exit Sub
  2174. End Sub
  2175. '++LotusScript Development Environment:2:5:(Options):0:74
  2176. Option Public
  2177. Use "InternetFunctions"
  2178. '++LotusScript Development Environment:2:5:(Forward):0:1
  2179. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2180. '++LotusScript Development Environment:2:5:(Options):0:66
  2181. '++LotusScript Development Environment:2:5:(Forward):0:1
  2182. Declare Sub Postopen(Source As Notesuiview)
  2183. Declare Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  2184. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2185. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2186. Private Sub BindEvents(Byval Objectname_ As String)
  2187.      Static Source As NOTESUIVIEW
  2188.      Set Source = Bind(Objectname_)
  2189.      On Event Postopen From Source Call Postopen
  2190.      On Event Queryaddtofolder From Source Call Queryaddtofolder
  2191. End Sub
  2192. '++LotusScript Development Environment:2:2:Postopen:1:12
  2193. Sub Postopen(Source As Notesuiview)
  2194.      InstantiateObjects
  2195. End Sub
  2196. '++LotusScript Development Environment:2:2:Queryaddtofolder:1:12
  2197. Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  2198.      Call MoveToFolder(source,target,continue)
  2199. End Sub
  2200. O=Lotus Notes
  2201. O=Lotus Notes
  2202. PURSAFO
  2203. |.:#U
  2204. O=Lotus Notes
  2205. CN=Lotus Notes Template Development/O=Lotus Notes
  2206. PURSAFO
  2207. @^sgF
  2208. $SCRIPTOBJ_20
  2209. $SCRIPTOBJ_19
  2210. $SCRIPTOBJ_17
  2211. $SCRIPTOBJ_18
  2212. $SCRIPTOBJ_16
  2213. $TITLE
  2214. $Name
  2215. $Index
  2216. $Formula
  2217. $FormulaClass
  2218. $VIEWFORMAT
  2219. $FormFormula
  2220. $Comment
  2221. $ACTIONS
  2222. $SCRIPTOBJ_0
  2223. $SCRIPTOBJ_1
  2224. $SCRIPTOBJ_2
  2225. $SCRIPTOBJ_3
  2226. $SCRIPTOBJ_5
  2227. $SCRIPTOBJ_12
  2228. $SCRIPTOBJ_13
  2229. $SCRIPTOBJ_14
  2230. $SCRIPTOBJ_15
  2231. $ViewGlobalScript
  2232. $ViewGlobalScript_O
  2233. $ViewScript
  2234. $ViewScript_O
  2235.  Forward
  2236. ForwardOptions
  2237. Forward bookmark to page|1Forward copy of page|2
  2238. ForwardOptions
  2239.     0S0E
  2240.     0S0E
  2241. ?_?__
  2242. `!b`1
  2243. 7`^///?
  2244. ?b___
  2245. `bOOO
  2246. `<b!R
  2247.                                 
  2248.     0S0E
  2249.     0S0E
  2250. ForwardOptions
  2251.     0S0E
  2252.     0S0E
  2253. ;&565'
  2254. 5&E5E5
  2255. &64&6&646'
  2256. ?_?__
  2257. `!b`1
  2258. 7`^///?
  2259. ?b___
  2260. `bOOO
  2261. `<b!R
  2262.                                 4
  2263. tFlags$UpdatedBy
  2264. Create Authorize--------apikoff/O=Iris$$;;;;;;;;WR1
  2265. off/O=Iris$$
  2266. O=Lotus Notes
  2267. O=Lotus Notes
  2268. PURSAFO
  2269. |.:#U
  2270. O=Lotus Notes
  2271. CN=Lotus Notes Template Development/O=Lotus Notes
  2272. PURSAFO
  2273.  A-cx
  2274. $TITLE
  2275. $INFO
  2276. $$ScriptName
  2277. $BODY
  2278. STG28821
  2279. '++LotusScript Development Environment:2:5:(Options):0:66
  2280. '++LotusScript Development Environment:2:5:(Forward):0:1
  2281. Declare Sub Beforenavigate(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Cancel As Integer)
  2282. Declare Sub Navigatecomplete(Source As Webbrowser, Url As String)
  2283. Declare Sub Framebeforenavigate(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Cancel As Integer)
  2284. Declare Sub Framenavigatecomplete(Source As Webbrowser, Url As String)
  2285. Declare Sub Framenewwindow(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Processed As Integer)
  2286. Declare Sub Downloadbegin(Source As Webbrowser)
  2287. Declare Sub Downloadcomplete(Source As Webbrowser)
  2288. Declare Sub Progresschange(Source As Webbrowser, Progress As Long, Progressmax As Long)
  2289. Declare Sub Titlechange(Source As Webbrowser, Text As String)
  2290. Declare Sub Statustextchange(Source As Webbrowser, Text As String)     
  2291. Declare Sub Initialize
  2292. Declare Sub Newwindow(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Processed As Integer)
  2293. '++LotusScript Development Environment:2:5:(Declarations):0:10
  2294. Dim WebDatabase As notesdatabase
  2295. Dim datadoc As notesdocument
  2296. Dim Session As notessession
  2297. Dim DocNoteID As notesdocument
  2298. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2299. Private Sub BindEvents(Byval Objectname_ As String)
  2300.      Static Source As WEBBROWSER
  2301.      Set Source = Bind(Objectname_)
  2302.      On Event Beforenavigate From Source Call Beforenavigate
  2303.      On Event Navigatecomplete From Source Call Navigatecomplete
  2304.      On Event Framebeforenavigate From Source Call Framebeforenavigate
  2305.      On Event Framenavigatecomplete From Source Call Framenavigatecomplete
  2306.      On Event Framenewwindow From Source Call Framenewwindow
  2307.      On Event Downloadbegin From Source Call Downloadbegin
  2308.      On Event Downloadcomplete From Source Call Downloadcomplete
  2309.      On Event Progresschange From Source Call Progresschange
  2310.      On Event Titlechange From Source Call Titlechange
  2311.      On Event Statustextchange From Source Call Statustextchange
  2312.      On Event Newwindow From Source Call Newwindow
  2313. End Sub
  2314. '++LotusScript Development Environment:2:2:Beforenavigate:1:12
  2315. Sub Beforenavigate(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Cancel As Integer)
  2316.       '    A navigation has requested a new window be opened
  2317.      ' we'll take care of everything and tell the caller we opened a new window
  2318.      ' otherwise the IE application starts up in a new window
  2319.      
  2320.      On Error 213 Resume Next
  2321.      
  2322.      If uidoc.inpreviewpane And firstnavigatedone Then
  2323.           If Instr(parseURL(url), "mailto") =0 Then
  2324.                Dim iedoc As New notesdocument(db)
  2325.                Dim newuidoc As NotesUIDocument
  2326.                Call iedoc.replaceitemvalue("Form", "WebBrowserForm")
  2327.                Call iedoc.replaceitemvalue("SaveOptions", "1")
  2328.                Call iedoc.replaceitemvalue("$ShowNavigationBar", "1")
  2329.                Call iedoc.replaceitemvalue("$NavigateToURL", Url)
  2330.                Call ieDoc.save(True,False)
  2331.                Call w.viewrefresh
  2332.                Call w.editdocument(False, iedoc) 
  2333.                Set newuidoc = w.currentdocument        
  2334.                Set browserobject=newuidoc.GetObject("Browser")
  2335.                browserobject.Navigate Url, Flags, Targetframename, Postdata,  Headers 
  2336.                Cancel = True
  2337.           Else
  2338.                browserobject.Navigate Url, Flags, Targetframename, Postdata,  Headers 
  2339.           End If
  2340.      End If       
  2341. End Sub
  2342. '++LotusScript Development Environment:2:2:Navigatecomplete:1:12
  2343. Sub Navigatecomplete(Source As Webbrowser, Url As String)
  2344.      Dim nulldoc As notesdocument
  2345.      'Error 213 is OLEException Error in lserr.lss
  2346.      On Error 213 Goto ErrorRoutine
  2347.      
  2348.      If url <>"" Then
  2349.      ' Set the URL in the Navigation Bar URL field
  2350.           uidoc.NavBarSetText Url
  2351.           If docprofile Is Nothing Then 
  2352.                'This will happen if the user is opening the database for the first time therefore the dbopen script has not been
  2353.                'executed.  Go ahead and retrieve the document because keeppage is on automatically.
  2354.                Set   nulldoc = db.getdocumentbyurl (url, True, False, Empty$, Empty$, Empty$, Empty$,Empty$, True)
  2355.                Exit Sub
  2356.           End If
  2357.           If docprofile.keeppage(0) = "0" Then
  2358.                 ' Request the URL to be retrieved but don't wait for it to come in
  2359.               ' Print "(DEBUG) - Queue request for: " + url
  2360.                Set   nulldoc = db.getdocumentbyurl (url, True, False, Empty$, Empty$, Empty$, Empty$,Empty$, True)
  2361.           End If
  2362.           
  2363.      End If
  2364.      
  2365.      Exit Sub
  2366. ErrorRoutine:
  2367.      Print "Error:  Accessing web browser control ErrOLEException("& Err & ")"
  2368.      Resume Next
  2369.      
  2370. End Sub
  2371. '++LotusScript Development Environment:2:2:Framebeforenavigate:1:12
  2372. Sub Framebeforenavigate(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Cancel As Integer)
  2373.      
  2374. End Sub
  2375. '++LotusScript Development Environment:2:2:Framenavigatecomplete:1:12
  2376. Sub Framenavigatecomplete(Source As Webbrowser, Url As String)
  2377.      
  2378. End Sub
  2379. '++LotusScript Development Environment:2:2:Framenewwindow:1:12
  2380. Sub Framenewwindow(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Processed As Integer)
  2381.      
  2382.  '    A navigation has requested a new window be opened
  2383.      ' we'll take care of everything and tell the caller we opened a new window
  2384.      ' otherwise the IE application starts up in a new window
  2385.      
  2386.      
  2387.      Dim iedoc As New notesdocument(db)
  2388.      Dim newuidoc As NotesUIDocument
  2389.      
  2390.      Call iedoc.replaceitemvalue("Form", "WebBrowserForm")
  2391.      Call iedoc.replaceitemvalue("SaveOptions", "1")
  2392.      Call iedoc.replaceitemvalue("$ShowNavigationBar", "1")
  2393.      Call iedoc.replaceitemvalue("$NavigateToURL", Url)
  2394.      Call ieDoc.save(True,False)
  2395.      Call w.viewrefresh
  2396.      Call w.editdocument(False, iedoc) 
  2397.      Set newuidoc = w.currentdocument
  2398.      
  2399.      Set browserobject=newuidoc.GetObject("Browser")
  2400.      browserobject.Navigate Url, Flags, "", Postdata,  Headers 
  2401.      
  2402.      Processed = True
  2403.      
  2404. End Sub
  2405. '++LotusScript Development Environment:2:2:Downloadbegin:1:12
  2406. Sub Downloadbegin(Source As Webbrowser)
  2407.     '   Start Animation...
  2408.      uidoc.Navbarspinnerstart
  2409. End Sub
  2410. '++LotusScript Development Environment:2:2:Downloadcomplete:1:12
  2411. Sub Downloadcomplete(Source As Webbrowser)
  2412.      
  2413.      '   Stop Animation...
  2414.      uidoc.Navbarspinnerstop
  2415.      
  2416. End Sub
  2417. '++LotusScript Development Environment:2:2:Progresschange:1:12
  2418. Sub Progresschange(Source As Webbrowser, Progress As Long, Progressmax As Long)
  2419.      Dim percent As Long
  2420.      If progress = -1 Then
  2421.           Print "   Done"
  2422.      Else  
  2423.           If ProgressMax > 0 Then
  2424.                percent = (Progress * 100) / Progressmax
  2425.                If percent > 0 Then
  2426.                     Print "   " & percent & " %  complete"
  2427.                End If
  2428.           Else
  2429.                If progress >0 Then 
  2430.                     Print "   " & progress & " bytes read"
  2431.                End If 
  2432.           End If
  2433.      End If
  2434.      
  2435. End Sub
  2436. '++LotusScript Development Environment:2:2:Titlechange:1:12
  2437. Sub Titlechange(Source As Webbrowser, Text As String)
  2438.      Dim NavBarURL As String
  2439. '    Ask the browser object for the current URL     
  2440.      NavBarURL = browserobject.LocationURL     
  2441. '    Set the Text in the Nav bar and the window title
  2442.      uidoc.NavBarSetText NavBarURL, Text
  2443. End Sub
  2444. '++LotusScript Development Environment:2:2:Statustextchange:1:12
  2445. Sub Statustextchange(Source As Webbrowser, Text As String)     
  2446.      Print "   " & Text 
  2447. End Sub
  2448. '++LotusScript Development Environment:2:2:Initialize:1:10
  2449. Sub Initialize
  2450.      '*
  2451.      '*  Initialize  Variables and declare local variables
  2452.      '*
  2453.      Dim InterNetProfile As Notesdocument
  2454.      Dim ProfileView As notesview
  2455.      Dim URL As Variant
  2456.      
  2457.      Set Session = New NotesSession
  2458.      Set WebDatabase = Session.CurrentDatabase
  2459. End Sub
  2460. '++LotusScript Development Environment:2:2:Newwindow:1:12
  2461. Sub Newwindow(Source As Webbrowser, Url As String, Flags As Long, Targetframename As String, Postdata As Variant, Headers As String, Processed As Integer)
  2462.          '
  2463.  '    A navigation has requested a new window be opened
  2464.      ' we'll take care of everything and tell the caller we opened a new window
  2465.      ' otherwise the IE application starts up in a new window
  2466.      
  2467.   '   InstantiateWebBrowserFormObjects
  2468.      
  2469.      Dim iedoc As New notesdocument(db)
  2470.      Dim newuidoc As NotesUIDocument
  2471.     'Print "Got New Window request..."
  2472.      
  2473.      Call iedoc.replaceitemvalue("Form", "WebBrowserForm")
  2474.      Call iedoc.replaceitemvalue("SaveOptions", "1")
  2475.      Call iedoc.replaceitemvalue("$ShowNavigationBar", "1")
  2476.      Call iedoc.replaceitemvalue("$NavigateToURL", Url)
  2477.      Call ieDoc.save(True,False)
  2478.      Call w.viewrefresh
  2479.      Call w.editdocument(False, iedoc) 
  2480.      Set newuidoc = w.currentdocument
  2481.      
  2482.      Set browserobject=newuidoc.GetObject("Browser")
  2483.      browserobject.Navigate Url, Flags, "", Postdata,  Headers 
  2484.      
  2485.      Processed=True
  2486. End Sub
  2487. Lotus Product
  2488. 8    X    H    H    
  2489. x    x    `
  2490. Notes Web Browsing
  2491.     0S0E
  2492. &Arial
  2493. '++LotusScript Development Environment:2:5:(Options):0:74
  2494. Option Public
  2495. Use "InternetFunctions"
  2496. '++LotusScript Development Environment:2:5:(Forward):0:1
  2497. Declare Sub InstantiateWebBrowserFormObjects
  2498. '++LotusScript Development Environment:2:5:(Declarations):0:10
  2499. 'Global Form Variables
  2500. Dim uidoc As notesuidocument
  2501. Dim doc As notesdocument
  2502. Dim browserobject As Variant
  2503. '++LotusScript Development Environment:2:2:InstantiateWebBrowserFormObjects:1:8
  2504. Sub InstantiateWebBrowserFormObjects
  2505.     InstantiateObjects
  2506. End Sub
  2507. Lotus Product
  2508. V0.0s
  2509. WebBrowserForm'++LotusScript Development Environment:2:5:(Options):0:66
  2510. '++LotusScript Development Environment:2:5:(Forward):0:1
  2511. Declare Sub Postopen(Source As Notesuidocument)
  2512. Declare Sub Queryclose(Source As Notesuidocument, Continue As Variant)
  2513. Declare Sub Initialize
  2514. Declare Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  2515. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2516. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2517. Private Sub BindEvents(Byval Objectname_ As String)
  2518.     Static Source As NOTESUIDOCUMENT
  2519.     Set Source = Bind(Objectname_)
  2520.     On Event Postopen From Source Call Postopen
  2521.     On Event Queryclose From Source Call Queryclose
  2522.     On Event Queryopen From Source Call Queryopen
  2523. End Sub
  2524. '++LotusScript Development Environment:2:2:Postopen:1:12
  2525. Sub Postopen(Source As Notesuidocument)
  2526.     InstantiateWebBrowserFormObjects
  2527.     Set uidoc = source
  2528.     Set doc = uidoc.Document     
  2529.     Set browserobject=uidoc.GetObject("Browser")
  2530.     If docprofile Is Nothing Then
  2531.         Set docprofile = New NotesDocument(db)
  2532.         docprofile.Form = "Admin"
  2533.         docprofile.StartUpOptions = "1"
  2534.         docprofile.OpenURL = "http://notes.net/welcome.nsf"
  2535.         docprofile.PreferredSearchEngine = "4"
  2536.         docprofile.SearchURL="http://www.search.com/"
  2537.         docprofile.ScanAhead = "1"
  2538.         docprofile.SearchFrequency = "2"
  2539.         docprofile.UpdatesFoundOptions = "1"
  2540.         docprofile.SendMailTo = session.UserName
  2541.         docprofile.ReduceDays = "2"
  2542.         docprofile.KeepPage = "0"
  2543.         docprofile.Save True, True
  2544.     End If
  2545.     uidoc.refreshhideformulas
  2546.            ' Make sure there is a URL field and it's not empty before we try to
  2547.           ' navigate there
  2548.     If doc.hasitem("URL")   And doc.URL(0) <> "" Then
  2549.               ' Print "Postopen Navigating to " + doc.URL(0)
  2550.         browserobject.navigate doc.url(0)
  2551.         If source.inpreviewpane Then
  2552.             firstnavigatedone = True
  2553.         End If
  2554.     End If    
  2555. End Sub
  2556. '++LotusScript Development Environment:2:2:Queryclose:1:12
  2557. Sub Queryclose(Source As Notesuidocument, Continue As Variant)
  2558.     ' If source.document.hasitem("firstnavigatedone") Then          
  2559.     FirstNavigateDone = False
  2560.      '     source.document.removeitem("firstnavigatedone")
  2561.       '    source.document.removeitem("$FILE")
  2562.        '   source.document.removeitem("$OLEOBJINFO")
  2563.         '  source.document.save True, False
  2564.    '  Print "reset flag field"
  2565.    ' Print firstnavigatedone
  2566.      'End If
  2567. End Sub
  2568. '++LotusScript Development Environment:2:2:Initialize:1:10
  2569. Sub Initialize
  2570. End Sub
  2571. '++LotusScript Development Environment:2:2:Queryopen:1:12
  2572. Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  2573. End Sub
  2574. Lotus Product
  2575. OBJECT
  2576. <    <    0
  2577. SaveOptions
  2578. EXT34422Shell.Explorer.1
  2579. $OLEPreviewActivate
  2580. '++LotusScript Development Environment:2:5:(Options):0:66
  2581. '++LotusScript Development Environment:2:5:(Forward):0:1
  2582. Declare Sub Click(Source As Button)
  2583. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2584. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2585. Private Sub BindEvents(Byval Objectname_ As String)
  2586.      Static Source As BUTTON
  2587.      Set Source = Bind(Objectname_)
  2588.      On Event Click From Source Call Click
  2589. End Sub
  2590. '++LotusScript Development Environment:2:2:Click:1:12
  2591. Sub Click(Source As Button)
  2592.      
  2593.      InstantiateWebBrowserFormObjects
  2594.      If docprofile.OpenURL(0) <> "" Then
  2595.           browserobject.GoHome
  2596.      Else
  2597.           Msgbox "Home page is not specified in your Internet Options.  "  _
  2598.           + "Please select Actions - Internet Options to specify a home page. " , 16,"Open Home Page"    
  2599.      End If
  2600. End Sub
  2601. Keep Page '++LotusScript Development Environment:2:5:(Options):0:66
  2602. '++LotusScript Development Environment:2:5:(Forward):0:1
  2603. Declare Sub Click(Source As Button)
  2604. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2605. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2606. Private Sub BindEvents(Byval Objectname_ As String)
  2607.      Static Source As BUTTON
  2608.      Set Source = Bind(Objectname_)
  2609.      On Event Click From Source Call Click
  2610. End Sub
  2611. '++LotusScript Development Environment:2:2:Click:1:12
  2612. Sub Click(Source As Button)
  2613.      
  2614.      On Error Resume Next
  2615.      InstantiateWebBrowserFormObjects
  2616.      Dim nulldoc As notesdocument
  2617.      Dim url As String
  2618.      url = browserobject.locationURL
  2619.      If  url <>"" Then
  2620.           ' Request the URL to be retrieved but don't wait for it to come in
  2621.           Print "(DEBUG) - Queue request for: " + url
  2622.           Set   nulldoc = db.getdocumentbyurl (url, True, False, Empty$, Empty$, Empty$, Empty$,Empty$, True)
  2623.      End If
  2624.      uidoc.refreshhideformulas
  2625. End Sub
  2626. (Internet Profile)
  2627. Internet Options
  2628. keeppage
  2629.     0S0E
  2630. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  2631. '++LotusScript Development Environment:2:5:(Forward):0:1
  2632. Declare Sub Click(Source As Button)
  2633. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2634. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2635. Private Sub BindEvents(Byval Objectname_ As String)
  2636.      Static Source As BUTTON
  2637.      Set Source = Bind(Objectname_)
  2638.      On Event Click From Source Call Click
  2639. End Sub
  2640. '++LotusScript Development Environment:2:2:Click:1:12
  2641. Sub Click(Source As Button)
  2642.      
  2643.      InstantiateWebBrowserFormObjects
  2644.      Call IEForwardNote(doc,Browserobject)
  2645. End Sub
  2646. Print... 
  2647.     0S0E
  2648. Share...'++LotusScript Development Environment:2:5:(Options):0:66
  2649. '++LotusScript Development Environment:2:5:(Forward):0:1
  2650. Declare Sub Click(Source As Button)
  2651. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2652. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2653. Private Sub BindEvents(Byval Objectname_ As String)
  2654.      Static Source As BUTTON
  2655.      Set Source = Bind(Objectname_)
  2656.      On Event Click From Source Call Click
  2657. End Sub
  2658. '++LotusScript Development Environment:2:2:Click:1:12
  2659. Sub Click(Source As Button)
  2660.      
  2661.      InstantiateWebBrowserFormObjects
  2662.      If doc.form(0) <> "HelpForm" Then
  2663.           
  2664.           doc.url=browserobject.locationurl
  2665.           doc.title=browserobject.locationname
  2666.           
  2667.           If (docProfile Is Nothing) Then
  2668.                Msgbox "You need to specify a Web Server and Web Database to share pages with. Choose Actions - Internet Options from the menu."
  2669.                Exit Sub 
  2670.           End If
  2671.           doc.tmpWebServer  = docProfile.WebServer
  2672.           doc.tmpWebDb = docProfile.WebDatabase
  2673.       'first, display a prompt to get user input
  2674.           If (w.DialogBox("ShareWebPage",True,True,"Share Options")) Then
  2675.               'determine which action we need to take
  2676.                Select Case doc.SharedOptions(0)
  2677.                     
  2678.                Case "2" : 'user wants to copy this to the shared web database
  2679.                     If getcurrentlocation="3" Then
  2680.                          CopyDocumentToSharedDatabase doc, browserobject.locationurl
  2681.                     Else
  2682.                          CopyDocumentToSharedDatabase doc, doc.url(0)
  2683.                     End If
  2684.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  2685.                     If getcurrentlocation="3" Then
  2686.                          CreateRatingDocument doc, browserobject.locationurl, browserobject.Locationname
  2687.                     Else
  2688.                          CreateRatingDocument doc,doc.url(0), doc.title(0)
  2689.                     End If
  2690.                End Select
  2691.           'remove any remaining fields that don't need to be carried around
  2692.                doc.removeItem "ForwardTo"
  2693.                doc.RemoveItem "SharedOptions" 
  2694.                doc.removeItem "ForwardTo"
  2695.                doc.RemoveItem "SharedOptions" 
  2696.                doc.RemoveItem "Rating"
  2697.                doc.removeItem "Content"
  2698.                doc.removeItem "Comments"
  2699.                doc.RemoveItem "tmpWebServer"
  2700.                doc.RemoveItem "tmpWebDb"
  2701.                doc.Save True,True          
  2702.           End If
  2703.      Else
  2704.           Msgbox "This document is a help document."
  2705.      End If
  2706. End Sub
  2707. Internet Profiles
  2708. Internet Options
  2709. webserver
  2710.     12S13S
  2711. _Move To Folder...
  2712. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  2713. '++LotusScript Development Environment:2:5:(Forward):0:1
  2714. Declare Sub Click(Source As Button)
  2715. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2716. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2717. Private Sub BindEvents(Byval Objectname_ As String)
  2718.      Static Source As BUTTON
  2719.      Set Source = Bind(Objectname_)
  2720.      On Event Click From Source Call Click
  2721. End Sub
  2722. '++LotusScript Development Environment:2:2:Click:1:12
  2723. Sub Click(Source As Button)
  2724.      
  2725.      InstantiateWebBrowserFormObjects
  2726.      Dim webdoc As notesdocument
  2727.      Dim noteid As String
  2728.      noteid = ""
  2729.      
  2730.      Response = Msgbox ("This will permanently delete the selected page from the database.  Do you want to continue?", 20, "Delete Document")
  2731.      If Response = 6 Then    
  2732.           uidoc.close
  2733.           Set webdoc=db.getdocumentbyurl(doc.url(0))
  2734.           Call RemoveObjects(webdoc)
  2735.          ' webdoc.Remove True
  2736.           
  2737.           If doc.isuidocopen Then
  2738.                noteid = doc.noteid             
  2739.                Delete doc
  2740.                Set doc = db.getdocumentbyid (noteid) 
  2741.                doc.remove True
  2742.                w.viewrefresh  
  2743.                w.viewrefresh
  2744.           Else
  2745.                doc.Remove True 
  2746.           End If
  2747.           
  2748.           w.viewrefresh
  2749.           
  2750.           
  2751.           
  2752.      End If
  2753.      
  2754. End Sub
  2755. Categori_zes
  2756. _Edit Document    
  2757. Send Docu_ment
  2758. _Forward
  2759. $ControlURLNavigate''++LotusScript Development Environment:2:5:(Options):0:66
  2760. '++LotusScript Development Environment:2:5:(Forward):0:1
  2761. Declare Sub Click(Source As Button)
  2762. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2763. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2764. Private Sub BindEvents(Byval Objectname_ As String)
  2765.      Static Source As BUTTON
  2766.      Set Source = Bind(Objectname_)
  2767.      On Event Click From Source Call Click
  2768. End Sub
  2769. '++LotusScript Development Environment:2:2:Click:1:12
  2770. Sub Click(Source As Button)
  2771.      
  2772.      InstantiateWebBrowserFormObjects
  2773.      Dim URL As Variant
  2774.      Dim Reload As Variant
  2775.      Dim Flags As Integer
  2776.      Dim TmpUrl As String
  2777.      
  2778.      URL = doc.GetitemValue("$NavigateToURL")
  2779.      Reload = doc.GetItemValue("$ReloadRefresh")
  2780.      Flags =Val (Reload(0))
  2781.      On Error 213  Resume Next
  2782.      
  2783.      TmpUrl=browserobject.LocationURL
  2784.      
  2785.      If Flags = 1 Then
  2786.           Flags = 4
  2787.      End If
  2788.      
  2789.      
  2790.      If URL(0) <> "" Then
  2791.           If URL(0) = TmpUrl Then
  2792.               ' Print "Refreshing " + Url(0)
  2793.                browserobject.Refresh     
  2794.           Else
  2795.              '  Print "Attempting " + URL(0) + " Flags = "+ Str(Flags)
  2796.                browserobject.Navigate URL(0), Flags
  2797.                
  2798.           ' Once navigation is done delete the item form the form
  2799.                doc.REMOVEITEM("$NavigateToURL")
  2800.                doc.RemoveItem("$ReloadRefresh")
  2801.                Call doc.Save( True, False )
  2802.           End If
  2803.      Else
  2804.           Messagebox "No URL specified.", 0, "ErrorNavigating"
  2805.      End If     
  2806. End Sub
  2807. _Remove From Foldere
  2808. Open History Folderu
  2809. Import Microsoft Favorites...
  2810. '++LotusScript Development Environment:2:5:(Options):0:66
  2811. '++LotusScript Development Environment:2:5:(Forward):0:1
  2812. Declare Sub Click(Source As Button)
  2813. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2814. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2815. Private Sub BindEvents(Byval Objectname_ As String)
  2816.      Static Source As BUTTON
  2817.      Set Source = Bind(Objectname_)
  2818.      On Event Click From Source Call Click
  2819. End Sub
  2820. '++LotusScript Development Environment:2:2:Click:1:12
  2821. Sub Click(Source As Button)
  2822.      
  2823.      ImportFavorites
  2824. End Sub
  2825. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  2826. '++LotusScript Development Environment:2:5:(Forward):0:1
  2827. Declare Sub Click(Source As Button)
  2828. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2829. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2830. Private Sub BindEvents(Byval Objectname_ As String)
  2831.      Static Source As BUTTON
  2832.      Set Source = Bind(Objectname_)
  2833.      On Event Click From Source Call Click
  2834. End Sub
  2835. '++LotusScript Development Environment:2:2:Click:1:12
  2836. Sub Click(Source As Button)
  2837.      
  2838.      ImportBookmarks
  2839. End Sub
  2840. Internet Properties...'++LotusScript Development Environment:2:5:(Options):0:66
  2841. '++LotusScript Development Environment:2:5:(Forward):0:1
  2842. Declare Sub Click(Source As Button)
  2843. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2844. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2845. Private Sub BindEvents(Byval Objectname_ As String)
  2846.      Static Source As BUTTON
  2847.      Set Source = Bind(Objectname_)
  2848.      On Event Click From Source Call Click
  2849. End Sub
  2850. '++LotusScript Development Environment:2:2:Click:1:12
  2851. Sub Click(Source As Button)
  2852.      
  2853.      Dim iret As Integer
  2854.      iret=Shell("rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl", 1)
  2855. End Sub
  2856.     0S0E
  2857. '++LotusScript Development Environment:2:5:(Options):0:66
  2858. '++LotusScript Development Environment:2:5:(Forward):0:1
  2859. Declare Sub Click(Source As Button)
  2860. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2861. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2862. Private Sub BindEvents(Byval Objectname_ As String)
  2863.      Static Source As BUTTON
  2864.      Set Source = Bind(Objectname_)
  2865.      On Event Click From Source Call Click
  2866. End Sub
  2867. '++LotusScript Development Environment:2:2:Click:1:12
  2868. Sub Click(Source As Button)
  2869.      
  2870.      InstantiateWebBrowserFormObjects
  2871.      If docprofile.OpenURL(0) <> "" Then
  2872.           browserobject.GoHome
  2873.      Else
  2874.           Msgbox "Home page is not specified in your Internet Options.  "  _
  2875.           + "Please select Actions - Internet Options to specify a home page. " , 16,"Open Home Page"    
  2876.      End If
  2877. End Sub
  2878. Keep Pagee'++LotusScript Development Environment:2:5:(Options):0:66
  2879. '++LotusScript Development Environment:2:5:(Forward):0:1
  2880. Declare Sub Click(Source As Button)
  2881. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2882. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2883. Private Sub BindEvents(Byval Objectname_ As String)
  2884.      Static Source As BUTTON
  2885.      Set Source = Bind(Objectname_)
  2886.      On Event Click From Source Call Click
  2887. End Sub
  2888. '++LotusScript Development Environment:2:2:Click:1:12
  2889. Sub Click(Source As Button)
  2890.      
  2891.      On Error Resume Next
  2892.      InstantiateWebBrowserFormObjects
  2893.      Dim nulldoc As notesdocument
  2894.      Dim url As String
  2895.      url = browserobject.locationURL
  2896.      If  url <>"" Then
  2897.           ' Request the URL to be retrieved but don't wait for it to come in
  2898.           Print "(DEBUG) - Queue request for: " + url
  2899.           Set   nulldoc = db.getdocumentbyurl (url, True, False, Empty$, Empty$, Empty$, Empty$,Empty$, True)
  2900.      End If
  2901.      uidoc.refreshhideformulas
  2902. End Sub
  2903. (Internet Profile)
  2904. Internet Options
  2905. keeppage
  2906.     0S0E
  2907. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  2908. '++LotusScript Development Environment:2:5:(Forward):0:1
  2909. Declare Sub Click(Source As Button)
  2910. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2911. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2912. Private Sub BindEvents(Byval Objectname_ As String)
  2913.      Static Source As BUTTON
  2914.      Set Source = Bind(Objectname_)
  2915.      On Event Click From Source Call Click
  2916. End Sub
  2917. '++LotusScript Development Environment:2:2:Click:1:12
  2918. Sub Click(Source As Button)
  2919.      
  2920.      InstantiateWebBrowserFormObjects
  2921.      Call IEForwardNote(doc,Browserobject)
  2922. End Sub
  2923. Print... 
  2924.     0S0E
  2925. Share...'++LotusScript Development Environment:2:5:(Options):0:66
  2926. '++LotusScript Development Environment:2:5:(Forward):0:1
  2927. Declare Sub Click(Source As Button)
  2928. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2929. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2930. Private Sub BindEvents(Byval Objectname_ As String)
  2931.      Static Source As BUTTON
  2932.      Set Source = Bind(Objectname_)
  2933.      On Event Click From Source Call Click
  2934. End Sub
  2935. '++LotusScript Development Environment:2:2:Click:1:12
  2936. Sub Click(Source As Button)
  2937.      
  2938.      InstantiateWebBrowserFormObjects
  2939.      If doc.form(0) <> "HelpForm" Then
  2940.           
  2941.           doc.url=browserobject.locationurl
  2942.           doc.title=browserobject.locationname
  2943.           
  2944.           If (docProfile Is Nothing) Then
  2945.                Msgbox "You need to specify a Web Server and Web Database to share pages with. Choose Actions - Internet Options from the menu."
  2946.                Exit Sub 
  2947.           End If
  2948.           doc.tmpWebServer  = docProfile.WebServer
  2949.           doc.tmpWebDb = docProfile.WebDatabase
  2950.       'first, display a prompt to get user input
  2951.           If (w.DialogBox("ShareWebPage",True,True,"Share Options")) Then
  2952.               'determine which action we need to take
  2953.                Select Case doc.SharedOptions(0)
  2954.                     
  2955.                Case "2" : 'user wants to copy this to the shared web database
  2956.                     If getcurrentlocation="3" Then
  2957.                          CopyDocumentToSharedDatabase doc, browserobject.locationurl
  2958.                     Else
  2959.                          CopyDocumentToSharedDatabase doc, doc.url(0)
  2960.                     End If
  2961.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  2962.                     If getcurrentlocation="3" Then
  2963.                          CreateRatingDocument doc, browserobject.locationurl, browserobject.Locationname
  2964.                     Else
  2965.                          CreateRatingDocument doc,doc.url(0), doc.title(0)
  2966.                     End If
  2967.                End Select
  2968.           'remove any remaining fields that don't need to be carried around
  2969.                doc.removeItem "ForwardTo"
  2970.                doc.RemoveItem "SharedOptions" 
  2971.                doc.removeItem "ForwardTo"
  2972.                doc.RemoveItem "SharedOptions" 
  2973.                doc.RemoveItem "Rating"
  2974.                doc.removeItem "Content"
  2975.                doc.removeItem "Comments"
  2976.                doc.RemoveItem "tmpWebServer"
  2977.                doc.RemoveItem "tmpWebDb"
  2978.                doc.Save True,True          
  2979.           End If
  2980.      Else
  2981.           Msgbox "This document is a help document."
  2982.      End If
  2983. End Sub
  2984. Internet Profiles
  2985. Internet Options
  2986. webserver
  2987.     12S13S
  2988. _Move To Folder...
  2989. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  2990. '++LotusScript Development Environment:2:5:(Forward):0:1
  2991. Declare Sub Click(Source As Button)
  2992. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2993. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2994. Private Sub BindEvents(Byval Objectname_ As String)
  2995.      Static Source As BUTTON
  2996.      Set Source = Bind(Objectname_)
  2997.      On Event Click From Source Call Click
  2998. End Sub
  2999. '++LotusScript Development Environment:2:2:Click:1:12
  3000. Sub Click(Source As Button)
  3001.      
  3002.      InstantiateWebBrowserFormObjects
  3003.      Dim webdoc As notesdocument
  3004.      Dim noteid As String
  3005.      noteid = ""
  3006.      
  3007.      Response = Msgbox ("This will permanently delete the selected page from the database.  Do you want to continue?", 20, "Delete Document")
  3008.      If Response = 6 Then    
  3009.           uidoc.close
  3010.           Set webdoc=db.getdocumentbyurl(doc.url(0))
  3011.           Call RemoveObjects(webdoc)
  3012.          ' webdoc.Remove True
  3013.           
  3014.           If doc.isuidocopen Then
  3015.                noteid = doc.noteid             
  3016.                Delete doc
  3017.                Set doc = db.getdocumentbyid (noteid) 
  3018.                doc.remove True
  3019.                w.viewrefresh  
  3020.                w.viewrefresh
  3021.           Else
  3022.                doc.Remove True 
  3023.           End If
  3024.           
  3025.           w.viewrefresh
  3026.           
  3027.           
  3028.           
  3029.      End If
  3030.      
  3031. End Sub
  3032. Categori_ze 
  3033. _Edit Document    
  3034. Send Docu_ment
  3035. _Forward
  3036. $ControlURLNavigatec'++LotusScript Development Environment:2:5:(Options):0:66
  3037. '++LotusScript Development Environment:2:5:(Forward):0:1
  3038. Declare Sub Click(Source As Button)
  3039. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3040. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3041. Private Sub BindEvents(Byval Objectname_ As String)
  3042.      Static Source As BUTTON
  3043.      Set Source = Bind(Objectname_)
  3044.      On Event Click From Source Call Click
  3045. End Sub
  3046. '++LotusScript Development Environment:2:2:Click:1:12
  3047. Sub Click(Source As Button)
  3048.      
  3049.      InstantiateWebBrowserFormObjects
  3050.      Dim URL As Variant
  3051.      Dim Reload As Variant
  3052.      Dim Flags As Integer
  3053.      Dim TmpUrl As String
  3054.      
  3055.      URL = doc.GetitemValue("$NavigateToURL")
  3056.      Reload = doc.GetItemValue("$ReloadRefresh")
  3057.      Flags =Val (Reload(0))
  3058.      On Error 213  Resume Next
  3059.      
  3060.      TmpUrl=browserobject.LocationURL
  3061.      
  3062.      If Flags = 1 Then
  3063.           Flags = 4
  3064.      End If
  3065.      
  3066.      
  3067.      If URL(0) <> "" Then
  3068.           If URL(0) = TmpUrl Then
  3069.               ' Print "Refreshing " + Url(0)
  3070.                browserobject.Refresh     
  3071.           Else
  3072.              '  Print "Attempting " + URL(0) + " Flags = "+ Str(Flags)
  3073.                browserobject.Navigate URL(0), Flags
  3074.                
  3075.           ' Once navigation is done delete the item form the form
  3076.                doc.REMOVEITEM("$NavigateToURL")
  3077.                doc.RemoveItem("$ReloadRefresh")
  3078.                Call doc.Save( True, False )
  3079.           End If
  3080.      Else
  3081.           Messagebox "No URL specified.", 0, "ErrorNavigating"
  3082.      End If     
  3083. End Sub
  3084. _Remove From FolderN
  3085. Open History Folder 
  3086. Import Microsoft Favorites...
  3087. '++LotusScript Development Environment:2:5:(Options):0:66
  3088. '++LotusScript Development Environment:2:5:(Forward):0:1
  3089. Declare Sub Click(Source As Button)
  3090. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3091. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3092. Private Sub BindEvents(Byval Objectname_ As String)
  3093.      Static Source As BUTTON
  3094.      Set Source = Bind(Objectname_)
  3095.      On Event Click From Source Call Click
  3096. End Sub
  3097. '++LotusScript Development Environment:2:2:Click:1:12
  3098. Sub Click(Source As Button)
  3099.      
  3100.      ImportFavorites
  3101. End Sub
  3102. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  3103. '++LotusScript Development Environment:2:5:(Forward):0:1
  3104. Declare Sub Click(Source As Button)
  3105. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3106. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3107. Private Sub BindEvents(Byval Objectname_ As String)
  3108.      Static Source As BUTTON
  3109.      Set Source = Bind(Objectname_)
  3110.      On Event Click From Source Call Click
  3111. End Sub
  3112. '++LotusScript Development Environment:2:2:Click:1:12
  3113. Sub Click(Source As Button)
  3114.      
  3115.      ImportBookmarks
  3116. End Sub
  3117. Internet Properties...'++LotusScript Development Environment:2:5:(Options):0:66
  3118. '++LotusScript Development Environment:2:5:(Forward):0:1
  3119. Declare Sub Click(Source As Button)
  3120. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3121. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3122. Private Sub BindEvents(Byval Objectname_ As String)
  3123.      Static Source As BUTTON
  3124.      Set Source = Bind(Objectname_)
  3125.      On Event Click From Source Call Click
  3126. End Sub
  3127. '++LotusScript Development Environment:2:2:Click:1:12
  3128. Sub Click(Source As Button)
  3129.      
  3130.      Dim iret As Integer
  3131.      iret=Shell("rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl", 1)
  3132. End Sub
  3133.     0S0E
  3134. Lotus Product
  3135. OBJECT
  3136. Lotus Product
  3137. Lotus Product)
  3138. V0.0^
  3139. D-43#
  3140. A}L%K<$S
  3141. A}d8}
  3142. A}d8}
  3143. A}t8}
  3144. A}L%K<$S
  3145. K<#, 4#
  3146. ^,FK<
  3147. K<FQT>}
  3148. K<F,T8
  3149. K<#, 4#
  3150. K<#, 4#
  3151. ^LFK<#,
  3152. ^\FK<#-X3#
  3153. K\F,`>#
  3154. ^lFK<#-X3#
  3155. KLF,P;#
  3156. K<F,T8
  3157. E}89J
  3158. K|F-43#
  3159. Lotus Product
  3160. OBJECT
  3161. Lotus Product
  3162. V0.0S
  3163. Lotus Product
  3164. OBJECT
  3165. Lotus Product
  3166. OBJECT
  3167. Lotus Product
  3168. OBJECT
  3169. Lotus Product
  3170. OBJECT
  3171. O=Lotus Notes
  3172. O=Lotus Notes
  3173. PURSAFO
  3174. |.:#U
  3175. O=Lotus Notes
  3176. CN=Lotus Notes Template Development/O=Lotus Notes
  3177. PURSAFO
  3178. $FILE
  3179. EXT61806.lss
  3180. $FILE
  3181. EXT61806.lso
  3182. $SCRIPTOBJ_26
  3183. $SCRIPTOBJ_18
  3184. $SCRIPTOBJ_21
  3185. $SCRIPTOBJ_22
  3186. $SCRIPTOBJ_23
  3187. $SCRIPTOBJ_24
  3188. $SCRIPTOBJ_25
  3189. $FILE
  3190. STG28821
  3191. $FILE
  3192. EXT34422
  3193. $OLEOBJINFO
  3194. $INFO
  3195. $WINDOWTITLE
  3196. $Script
  3197. $$Script_O
  3198. $$ScriptName
  3199. $$FormScript
  3200. $$$FormScript_O
  3201. $FILE
  3202. EXT34422.lss
  3203. $FILE
  3204. EXT34422.lso
  3205. $BODY
  3206. $V5ACTIONS
  3207. $ACTIONS
  3208. $SCRIPTOBJ_0
  3209. $SCRIPTOBJ_1
  3210. $SCRIPTOBJ_2
  3211. $SCRIPTOBJ_4
  3212. $SCRIPTOBJ_6
  3213. $SCRIPTOBJ_11
  3214. $SCRIPTOBJ_14
  3215. $SCRIPTOBJ_15
  3216. $SCRIPTOBJ_16
  3217. ,D    } 
  3218. ^t    K,
  3219. Nt    PD
  3220. _Forward
  3221. Categori_zeK
  3222. _Edit Document
  3223. Send Docu_ment
  3224. _Move to Folder...
  3225. _Remove from Folder...
  3226. >|'++LotusScript Development Environment:2:5:(Options):0:74
  3227. Option Public
  3228. Use "InternetFunctions"
  3229. '++LotusScript Development Environment:2:5:(Forward):0:1
  3230. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3231. '++LotusScript Development Environment:2:5:(Options):0:66
  3232. '++LotusScript Development Environment:2:5:(Forward):0:1
  3233. Declare Sub Postopen(Source As Notesuiview)
  3234. Declare Sub Initialize
  3235. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3236. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3237. Private Sub BindEvents(Byval Objectname_ As String)
  3238.      Static Source As NOTESUIVIEW
  3239.      Set Source = Bind(Objectname_)
  3240.      On Event Postopen From Source Call Postopen
  3241. End Sub
  3242. '++LotusScript Development Environment:2:2:Postopen:1:12
  3243. Sub Postopen(Source As Notesuiview)
  3244.      InstantiateObjects
  3245. End Sub
  3246. '++LotusScript Development Environment:2:2:Initialize:1:10
  3247. Sub Initialize
  3248.      ' Create a Browser form
  3249.      
  3250.      
  3251.      
  3252. End Sub
  3253. O=Lotus Notes
  3254. O=Lotus Notes
  3255. PURSAFO
  3256. |.:#U
  3257. O=Lotus Notes
  3258. CN=Lotus Notes Template Development/O=Lotus Notes
  3259. PURSAFO
  3260. $SCRIPTOBJ_19
  3261. $SCRIPTOBJ_20
  3262. $SCRIPTOBJ_7
  3263. $SCRIPTOBJ_9
  3264. $SCRIPTOBJ_10
  3265. $SCRIPTOBJ_18
  3266. $TITLE
  3267. $Index
  3268. $Formula
  3269. $FormulaClass
  3270. $VIEWFORMAT
  3271. $Comment
  3272. $ACTIONS
  3273. $ViewGlobalScript
  3274. $ViewScript
  3275. $ViewScript_O
  3276. '++LotusScript Development Environment:2:5:(Options):0:74
  3277. Option Public
  3278. Use "AgentFunctions"
  3279. '++LotusScript Development Environment:2:5:(Forward):0:1
  3280. Declare Sub Initialize
  3281. Declare Sub ReduceDocumentsToLinks
  3282. Declare Sub RemoveDocumentsFromDatabase
  3283. Declare Sub SetupExpirationDates
  3284. Declare Function DocumentCanBeProcessed  As Integer
  3285. Declare Sub ReduceOneDocumentToLink
  3286. '++LotusScript Development Environment:2:5:(Declarations):0:10
  3287. Dim housekeepingagent As notesagent
  3288. Dim docCollection As NotesDocumentCollection
  3289. Dim urldoc As NotesDocument
  3290. Dim doc As NotesDocument
  3291. Dim dtExpiration As NotesDateTime
  3292. Dim dtLastAccessed As NotesDateTime
  3293. '++LotusScript Development Environment:2:2:Initialize:1:10
  3294. Sub Initialize
  3295.      On Error Goto ProcessError
  3296.      InstantiateAgentObjects
  3297.      
  3298.      'Open the error log for error handling
  3299.      Set HousekeepingAgent = Session.currentagent
  3300.      Set AgentLog = OpenLog(HousekeepingAgent.name)
  3301.      
  3302.      If LogLocation = "Agent Log" Then agentLog.LogErrors = True   
  3303.      Call logaction( "Starting Housekeeping agent.....")
  3304.      
  3305.       'check to see if we need to perform and database/document cleanup
  3306.      If (docprofile.ReduceDays(0) = "0") Then
  3307.           ReduceDocumentsToLinks
  3308.      Elseif (docprofile.ReduceDays(0) = "1") Then
  3309.           RemoveDocumentsFromDatabase
  3310.      End If
  3311.      Goto Cleanup
  3312.      
  3313. ProcessError:
  3314.      Call logerror(Err, Error$)
  3315.      Call logaction("The preceeding error occurred in the Initialization routine of the Housekeeping Agent.")
  3316.      Resume Next     
  3317. Cleanup:
  3318.      Call logaction("Housekeeping Agent finished."     )
  3319.      If LogLocation = "Agent Log" Then  Call agentlog.close
  3320.      
  3321. End Sub
  3322. '++LotusScript Development Environment:2:2:ReduceDocumentsToLinks:1:8
  3323. Sub ReduceDocumentsToLinks
  3324.      On Error Goto ProcessError
  3325.      SetupExpirationDates
  3326.      
  3327.      Set docCollection = db.AllDocuments
  3328.      Set doc = docCollection.GetFirstDocument
  3329.      While Not (doc Is Nothing)
  3330.           If (DocumentCanBeProcessed) Then ReduceOneDocumentToLink
  3331.           Set doc = docCollection.GetNextDocument(doc)
  3332.      Wend
  3333.      Exit Sub
  3334. ProcessError:
  3335.      Call logerror(Err, Error$)
  3336.      Call logaction("The preceeding error occurred in the ReduceDocumentsToLinks routine of the Housekeeping Agent.")
  3337.      Resume Next 
  3338.      
  3339. End Sub
  3340. '++LotusScript Development Environment:2:2:RemoveDocumentsFromDatabase:1:8
  3341. Sub RemoveDocumentsFromDatabase
  3342.      On Error Goto ProcessError
  3343.      SetupExpirationDates
  3344.      Set docCollection = db.AllDocuments
  3345.      For i = 1 To docCollection.Count
  3346.           Set doc = docCollection.GetNthDocument(i)          
  3347.           If (DocumentCanBeProcessed) Then 
  3348.                Call RemoveObjects(doc)
  3349.                Call logaction( "Removing pages that have not been read for " & docprofile.ReduceNumDays(0) & " days...")
  3350.                doc.Remove True
  3351.           End If               
  3352.      Next
  3353.      Exit Sub
  3354.      
  3355. ProcessError:
  3356.      Call logerror(Err, Error$)
  3357.      Call logaction("The preceeding error occurred in the RemoveDocumentsFromDatabase routine of the Housekeeping Agent.")
  3358.      Resume Next 
  3359.      
  3360. End Sub
  3361. '++LotusScript Development Environment:2:2:SetupExpirationDates:1:8
  3362. Sub SetupExpirationDates
  3363.      On Error Goto ProcessError
  3364. 'initiate the date/time objects
  3365.      Set dtLastAccessed = New NotesDateTime("")
  3366.      Set dtExpiration = New NotesDateTime("")
  3367.      dtLastAccessed.SetNow
  3368.      dtExpiration.SetNow
  3369. 'dtExpired must be set back the number of days specified in the profile document
  3370.      dtExpiration.AdjustDay(-1*Cint(docprofile.ReduceNumDays(0)))
  3371.      Exit Sub
  3372. ProcessError:
  3373.      Call logerror(Err, Error$)
  3374.      Call logaction("The preceeding error occurred in the SetExpirationDates routine of the Housekeeping Agent.")
  3375.      Resume Next 
  3376. End Sub
  3377. '++LotusScript Development Environment:2:1:DocumentCanBeProcessed:1:8
  3378. Function DocumentCanBeProcessed  As Integer
  3379.      On Error Goto ProcessError
  3380. 'determines if a document meets the criteria to be reduced or removed from the database
  3381.      If (doc.Form(0) = "Admin") Then 
  3382.           DocumentCanBeProcessed = False
  3383.           Exit Function
  3384.      End If
  3385. 'if this is the home page, do not process it
  3386.      If (doc.Url(0) = docprofile.OpenUrl(0)) Then
  3387.           DocumentCanBeProcessed = False
  3388.           Exit Function          
  3389.      End If
  3390.      'if this page is a Web Browser Object page, do not process it
  3391.      If (doc.form(0) = "WebBrowserForm") Then
  3392.           documentcanbeprocessed = False
  3393.           Exit Function
  3394.      End If
  3395. 'compare the last accessed date/time
  3396.      dtLastAccessed.LSLocalTime = doc.LastAccessed
  3397.      If (dtExpiration.TimeDifference(dtLastAccessed) > 0) Then DocumentCanBeProcessed = True
  3398.      Exit Function
  3399. ProcessError:
  3400.      Call logerror(Err, Error$)
  3401.      Call logaction("The preceeding error occurred in the DocumentCanBeProcessed routine of the Housekeeping Agent.")
  3402.      Resume Next 
  3403. End Function
  3404. '++LotusScript Development Environment:2:2:ReduceOneDocumentToLink:1:8
  3405. Sub ReduceOneDocumentToLink
  3406.      On Error Goto ProcessError
  3407.      
  3408.      Call logaction( "Reducing pages that have not been read for " & docprofile.ReduceNumDays(0) & " days...")
  3409.      doc.RemoveItem "Body"
  3410.      doc.RemoveItem "HTMLSouce"
  3411.      doc.RemoveItem "HTMLBody"
  3412.      doc.RemoveItem "$Background"
  3413.      doc.RemoveItem "$FILE"
  3414.      doc.RemoveItem "URLLinks1"
  3415.      doc.RemoveItem "WebAheadStatus"
  3416.      doc.RemoveItem "WebAgentError"
  3417.      doc.RemoveItem "PageMinderStatus"
  3418.      doc.Save True,True
  3419.      Exit Sub
  3420.      
  3421. ProcessError:
  3422.      Call logerror(Err, Error$)
  3423.      Call logaction("The preceeding error occurred in the ReduceOneDocumentToLink routine of the Housekeeping Agent.")
  3424.      Resume Next 
  3425. End Sub
  3426. O=Lotus Notes
  3427. O=Lotus Notes
  3428. PURSAFO
  3429. |.:#U
  3430. O=Lotus Notes
  3431. CN=Lotus Notes Template Development/O=Lotus Notes
  3432. PURSAFO
  3433. {>HX!
  3434. $TITLE
  3435. $AssistType
  3436. $AssistLastRun
  3437. $AssistDocCount
  3438. $AssistFlags
  3439. $AssistTrigger
  3440. $AssistInfo
  3441. $AssistQuery
  3442. $AssistAction
  3443. $AssistAction_Ex
  3444. O=Lotus Notes
  3445. O=Lotus Notes
  3446. PURSAFO
  3447. |.:#U
  3448. O=Lotus Notes
  3449. CN=Lotus Notes Template Development/O=Lotus Notes
  3450. PURSAFO
  3451. sZ%!ZM}
  3452. $Flags
  3453. O=Lotus Notes
  3454. O=Lotus Notes
  3455. PURSAFO
  3456. |.:#U
  3457. O=Lotus Notes
  3458. CN=Lotus Notes Template Development/O=Lotus Notes
  3459. PURSAFO
  3460. sZ%!ZM}
  3461. $Flags
  3462. O=Lotus Notes
  3463. O=Lotus Notes
  3464. PURSAFO
  3465. |.:#U
  3466. O=Lotus Notes
  3467. CN=Lotus Notes Template Development/O=Lotus Notes
  3468. PURSAFO
  3469. sZ%!ZM}
  3470. #p9aC
  3471. nAM#j
  3472. $Flags
  3473. O=Lotus Notes
  3474. O=Lotus Notes
  3475. PURSAFO
  3476. |.:#U
  3477. O=Lotus Notes
  3478. CN=Lotus Notes Template Development/O=Lotus Notes
  3479. PURSAFO
  3480. sZ%!ZM}
  3481. $Flags
  3482. EAll Pages|($All)|Main
  3483. www.G
  3484. www.`
  3485.     15S18S36S39S
  3486. $44Title$36$Conflict
  3487. HTMLForm
  3488. $Title
  3489. HTMLFormDoc
  3490. Guided Tour
  3491. DeferredObject
  3492. Title
  3493. BLANK.HTM
  3494. bookmark
  3495.     L1S21S
  3496. www.G
  3497. www.`
  3498.     15S18S36S39S
  3499. ?TitlePage Title$36Date
  3500. IEVersion
  3501. IEVersionMinor|
  3502.     1S2S
  3503. Admin
  3504. Admin
  3505. forward
  3506. HTMLForm
  3507. IEVersion
  3508. Admin
  3509. Admin
  3510. forward
  3511. HTMLForm
  3512. WebBrowserForm
  3513. IEVersion
  3514. Admin
  3515. Admin
  3516. forward
  3517. HTMLForm
  3518. WebBrowser4Form
  3519.     0R9RT12S13S23RTT29RTTT32S33S46RTT50RTTT53S54S66RTT69RT70R
  3520. CN=Marina Bodik/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes##################
  3521. All Bookmarks
  3522. www.G
  3523. www.`
  3524.     15S18S36S39S
  3525. $44Title$36$Conflict
  3526. Bookmark
  3527.     L1S1
  3528. Title
  3529. www.G
  3530. www.`
  3531.     15S18S36S39S
  3532. Q@TitlePage Title$36Date
  3533. IEVersion
  3534. IEVersionMinor|
  3535.     1S2S
  3536. Admin
  3537. Admin
  3538. forward
  3539. HTMLForm
  3540. IEVersion
  3541. Admin
  3542. Admin
  3543. forward
  3544. HTMLForm
  3545. WebBrowserForm
  3546. IEVersion
  3547. Admin
  3548. Admin
  3549. forward
  3550. HTMLForm
  3551. WebBrowser4Form
  3552.     0R9RT12S13S23RTT29RTTT32S33S46RTT50RTTT53S54S66RTT69RT70RY
  3553. CN=Marina Bodik/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes###################################
  3554. Web Bots\Page MinderWeb Bots\Page Minder
  3555. Bookmark
  3556. HelpForm
  3557. PageMinderStatus
  3558. PageMinderStatus
  3559. PageMinderStatus
  3560. PageMinderStatus
  3561. PageMinderStatus
  3562.     6S9S10S
  3563. $39Title$36URL$Conflict
  3564. $39Title
  3565. Title
  3566. Bookmark
  3567. HelpForm
  3568. PageMinderStatus
  3569. PageMinderStatus
  3570. PageMinderStatus
  3571. PageMinderStatus
  3572. PageMinderStatus
  3573.     6S9S10STitlePageTitle$36Date
  3574. URLURL&
  3575. IEVersion
  3576. IEVersionMinor|
  3577.     1S2S
  3578. Admin
  3579. Admin
  3580. forward
  3581. HTMLForm
  3582. HelpForm
  3583. HelpForm
  3584. IEVersion
  3585. Admin
  3586. Admin
  3587. forward
  3588. HTMLForm
  3589. HelpForm
  3590. HelpForm
  3591. WebBrowserForm
  3592. IEVersion
  3593. Admin
  3594. Admin
  3595. forward
  3596. HTMLForm
  3597. HelpForm
  3598. HelpForm
  3599. WebBrowser4Form
  3600.     0R9RT12S13S23S27S29RTT35RTTT38S39S49S2E53S58RTT62RTTT65S66S76S2E80S84RTT87RT88R3FY
  3601. CN=Marina Bodik/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes
  3602. #####################
  3603. Web Bots\Web AheadWeb Bots\Web Ahead
  3604. Bookmark
  3605. HelpForm
  3606. PageMinderStatus
  3607. PageMinderStatus
  3608. PageMinderStatus
  3609. PageMinderStatus
  3610. PageMinderStatus
  3611.     6S9S10S
  3612. $39Title$36URL$Conflict
  3613. $39Title
  3614. Title
  3615. Bookmark
  3616. HelpForm
  3617. PageMinderStatus
  3618. PageMinderStatus
  3619. PageMinderStatus
  3620. PageMinderStatus
  3621. PageMinderStatus
  3622.     6S9S10STitlePageTitle$36Date
  3623. URLURL&
  3624. IEVersion
  3625. IEVersionMinor|
  3626.     1S2S
  3627. Admin
  3628. Admin
  3629. forward
  3630. HTMLForm
  3631. HelpForm
  3632. HelpForm
  3633. IEVersion
  3634. Admin
  3635. Admin
  3636. forward
  3637. HTMLForm
  3638. HelpForm
  3639. HelpForm
  3640. WebBrowserForm
  3641. IEVersion
  3642. Admin
  3643. Admin
  3644. forward
  3645. HTMLForm
  3646. HelpForm
  3647. HelpForm
  3648. WebBrowser4Form
  3649.     0R9RT12S13S23S27S29RTT35RTTT38S39S49S2E53S58RTT62RTTT65S66S76S2E80S84RTT87RT88R3FY
  3650. CN=Marina Bodik/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes
  3651. #########################
  3652. CN=Teresa Deane/O=IrisCN=Marina Bodik/O=IrisCN=Lotus Notes Template Development/O=Lotus NotesInternetFunctionss34Q1#########################################################
  3653. Internet Options...303
  3654. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#########################################
  3655. Page Minder
  3656. 1SfL3
  3657. CN=Marina Bodik/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes###############################################
  3658. (Images)N
  3659. URL$Conflict
  3660. HTTPContent_type
  3661. image
  3662.     L1S1
  3663. URLURL&
  3664. IEVersion
  3665. IEVersionMinor|
  3666.     1S2S
  3667. Admin
  3668. Admin
  3669. forward
  3670. HTMLForm
  3671. IEVersion
  3672. Admin
  3673. Admin
  3674. forward
  3675. HTMLForm
  3676. WebBrowserForm
  3677. IEVersion
  3678. Admin
  3679. Admin
  3680. forward
  3681. HTMLForm
  3682. WebBrowser4Form
  3683.     0R9RT12S13S23RTT29RTTT32S33S46RTT50RTTT53S54S66RTT69RT70RY
  3684. CN=Marina Bodik/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes
  3685. ##########################################################
  3686. HelpFormUsing the Page Minder Feature
  3687. CN=Teresa Deane/O=Iris#############
  3688. >%!-eWv
  3689. HelpFormUsing the Web Ahead Feature
  3690. CN=Teresa Deane/O=Iris###############
  3691. http://www.lotus.com/Lotus Development Corporation1
  3692. CN=Teresa Deane/O=Iris
  3693. ###########################################
  3694. IBM Home Page1http://www.ibm.com/
  3695. CN=Teresa Deane/O=Iris
  3696. #####################################################
  3697. 1Notes Nethttp://www.notes.net/
  3698. CN=Teresa Deane/O=Iris
  3699. ##########################################################
  3700. WebBrowserForm11http://notes.net/welcome.nsf
  3701. CN=Teresa Deane/O=Iris
  3702. ##########################
  3703. STG16257
  3704. EXT11761
  3705. EXT11761browser$BodyWebBrowser4FormCD
  3706. EXT11761.lsseo
  3707. EXT11761.lso
  3708. SaveOptions$OLEPreviewActivate
  3709. CN=Teresa Deane/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes############
  3710. ##########################################################
  3711. ##########################################################
  3712. ##########################################################
  3713. ##########################################################
  3714. ##########################################################
  3715. ##########################################################
  3716. ##########################################################
  3717. ##########################################################
  3718. ##########################################################
  3719. ##########################################################
  3720. ##########################################################
  3721. ##########################################################
  3722. ##########################################################
  3723. ##########################################################
  3724. ##########################################################
  3725. ##########################################################
  3726. ##########################################################
  3727. ##########################################################
  3728. ##########################################################
  3729. ##########################################################
  3730. ##########################################################
  3731. ##########################################################
  3732. ##########################################################
  3733. ##########################################################
  3734. ##########################################################
  3735. ##########################################################
  3736. ##########################################################
  3737. ##########################################################
  3738. ##########################################################
  3739. ##########################################################
  3740. ##########################################################
  3741. ##########################################################
  3742. ##########################################################
  3743. ##########################################################
  3744. ##########################################################
  3745. ##########################################################
  3746. ##########################################################
  3747. ##########################################################
  3748. ##########################################################
  3749. ##########################################################
  3750. ##########################################################
  3751. ##########################################################
  3752. ##########################################################
  3753. ##########################################################
  3754.     0S0E
  3755.     0S0E
  3756.     0S0E
  3757.     0S0E
  3758. Browse'++LotusScript Development Environment:2:5:(Options):0:66
  3759. '++LotusScript Development Environment:2:5:(Forward):0:1
  3760. Declare Sub Click(Source As Button)
  3761. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3762. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3763. Private Sub BindEvents(Byval Objectname_ As String)
  3764.      Static Source As BUTTON
  3765.      Set Source = Bind(Objectname_)
  3766.      On Event Click From Source Call Click
  3767. End Sub
  3768. '++LotusScript Development Environment:2:2:Click:1:12
  3769. Sub Click(Source As Button)
  3770.      
  3771.      Browse
  3772. End Sub
  3773. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  3774. '++LotusScript Development Environment:2:5:(Forward):0:1
  3775. Declare Sub Click(Source As Button)
  3776. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3777. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3778. Private Sub BindEvents(Byval Objectname_ As String)
  3779.      Static Source As BUTTON
  3780.      Set Source = Bind(Objectname_)
  3781.      On Event Click From Source Call Click
  3782. End Sub
  3783. '++LotusScript Development Environment:2:2:Click:1:12
  3784. Sub Click(Source As Button)
  3785.      
  3786.      viewdelete
  3787.      
  3788. End Sub
  3789. _Reload
  3790.     0S0E
  3791.     0S0E
  3792. Print...'++LotusScript Development Environment:2:5:(Options):0:66
  3793. '++LotusScript Development Environment:2:5:(Forward):0:1
  3794. Declare Sub Click(Source As Button)
  3795. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3796. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3797. Private Sub BindEvents(Byval Objectname_ As String)
  3798.      Static Source As BUTTON
  3799.      Set Source = Bind(Objectname_)
  3800.      On Event Click From Source Call Click
  3801. End Sub
  3802. '++LotusScript Development Environment:2:2:Click:1:12
  3803. Sub Click(Source As Button)
  3804.      
  3805.      PrintWebDocument
  3806. End Sub
  3807. _Search
  3808. '++LotusScript Development Environment:2:5:(Options):0:66
  3809. '++LotusScript Development Environment:2:5:(Forward):0:1
  3810. Declare Sub Click(Source As Button)
  3811. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3812. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3813. Private Sub BindEvents(Byval Objectname_ As String)
  3814.      Static Source As BUTTON
  3815.      Set Source = Bind(Objectname_)
  3816.      On Event Click From Source Call Click
  3817. End Sub
  3818. '++LotusScript Development Environment:2:2:Click:1:12
  3819. Sub Click(Source As Button)
  3820.      
  3821.      Dim docLocal As NotesDocument
  3822.      Dim browserobject As Variant
  3823.      Dim objectitem As notesrichtextitem
  3824.      
  3825.      Dim docCollection As NotesDocumentCollection     
  3826.      Set docCollection = db.UnprocessedDocuments
  3827.      If (docCollection.Count = 0) Then
  3828.           Msgbox "You must select a document.",16,"Error"
  3829.           Exit Sub
  3830.      End If
  3831.      Set docLocal = docCollection.GetFirstDocument
  3832.      If docLocal.Form(0) = "WebBrowserForm" Then
  3833.           Set objectitem = docLocal.getfirstitem("Browser")
  3834.           browserobject = objectitem.getembeddedobject("Browser")
  3835.           IESearch(browserobject)
  3836.      Else
  3837.           OpenSearchSite docLocal
  3838.      End If
  3839.      
  3840. End Sub
  3841. _Forward    
  3842. Sh_are...
  3843. '++LotusScript Development Environment:2:5:(Options):0:66
  3844. '++LotusScript Development Environment:2:5:(Forward):0:1
  3845. Declare Sub Click(Source As Button)
  3846. Declare Function GetInternetProfile
  3847. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3848. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3849. Private Sub BindEvents(Byval Objectname_ As String)
  3850.      Static Source As BUTTON
  3851.      Set Source = Bind(Objectname_)
  3852.      On Event Click From Source Call Click
  3853. End Sub
  3854. '++LotusScript Development Environment:2:2:Click:1:12
  3855. Sub Click(Source As Button)
  3856.      
  3857.      Dim docLocal As NotesDocument
  3858.      Dim webdoc As notesdocument
  3859.      Dim docCollection As NotesDocumentCollection     
  3860.      Set docCollection = db.UnprocessedDocuments
  3861.      If (docCollection.Count = 0) Then
  3862.           Msgbox "You must select a document.",16,"Error"
  3863.           Exit Sub
  3864.      End If
  3865.      Set docLocal = docCollection.GetFirstDocument
  3866.      If docLocal.hasitem("URL") Then
  3867.           docLocal.tmpWebServer  = docProfile.WebServer
  3868.           docLocal.tmpWebDb = docProfile.WebDatabase
  3869.           docLocal.Save True, True
  3870.           If (w.DialogBox("ShareWebPage", True, True, False, False, False, False, "Share Options", doclocal)) Then
  3871.                docLocal.Save True, True
  3872.                Select Case docLocal.SharedOptions(0)
  3873.                'case 1 was previously forward bookmark.  That's now done off of the forward option
  3874.                Case "2" : 'user wants to copy this to the shared web database
  3875.                     If docLocal.Form(0) = "WebBrowserForm" Then
  3876.                          CopyDocumentToSharedDatabase docLocal, browserobject.locationurl
  3877.                     Else
  3878.                          CopyDocumentToSharedDatabase docLocal, docLocal.url(0)
  3879.                     End If
  3880.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  3881.                     If docLocal.Form(0) = "WebBrowserForm" Then
  3882.                          CreateRatingDocument docLocal, browserobject.locationurl, browserobject.Locationname
  3883.                     Else
  3884.                          CreateRatingDocument docLocal,docLocal.url(0), docLocal.title(0)
  3885.                     End If
  3886.                End Select
  3887.           'remove any remaining fields that don't need to be carried around
  3888.                docLocal.removeItem "ForwardTo"
  3889.                docLocal.RemoveItem "SharedOptions" 
  3890.                docLocal.RemoveItem "Rating"
  3891.                docLocal.removeItem "Content"
  3892.                docLocal.removeItem "Comments"
  3893.           End If     
  3894.           docLocal.RemoveItem "tmpWebServer"
  3895.           docLocal.RemoveItem "tmpWebDb"
  3896.           docLocal.Save True, True
  3897.      Else
  3898.           Msgbox "This document does not contain a URL."
  3899.      End If
  3900. End Sub
  3901. '++LotusScript Development Environment:2:1:GetInternetProfile:1:8
  3902. Function GetInternetProfile
  3903.          'we need to get the profile document to make sure this is feasible and to get the location of the shared db
  3904.      Set view = db.getView("(Internet Profile)")
  3905.      Set GetInternetProfile = view.GetFirstDocument
  3906. End Function
  3907. Internet Profiles
  3908. Internet Options
  3909. WebServer
  3910.     0S0E
  3911. _Move to Folder...
  3912. Categori_ze
  3913. _Edit Document
  3914. Send Docu_ment
  3915. Move Page to Folder... 
  3916.     0S0E
  3917. _Remove from Folder...
  3918. _Reduce to Bookmarki'++LotusScript Development Environment:2:5:(Options):0:66
  3919. '++LotusScript Development Environment:2:5:(Forward):0:1
  3920. Declare Sub Click(Source As Button)
  3921. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3922. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3923. Private Sub BindEvents(Byval Objectname_ As String)
  3924.      Static Source As BUTTON
  3925.      Set Source = Bind(Objectname_)
  3926.      On Event Click From Source Call Click
  3927. End Sub
  3928. '++LotusScript Development Environment:2:2:Click:1:12
  3929. Sub Click(Source As Button)
  3930.      
  3931.      Dim docCollection As NotesDocumentCollection
  3932.      Dim docLocal As NotesDocument
  3933.      
  3934.      Set docCollection = db.UnprocessedDocuments
  3935.      If (docCollection.Count = 0) Then
  3936.           Msgbox "You must select a document.",16,"Error"
  3937.           Exit Sub
  3938.      End If
  3939.      Set docLocal = docCollection.GetFirstDocument
  3940.      While Not (docLocal Is Nothing)
  3941.           RemoveObjects docLocal
  3942.           ReduceToLink docLocal
  3943.           Set docLocal = docCollection.GetNextDocument(docLocal)
  3944.      Wend
  3945. End Sub
  3946. Open History Folder
  3947. Import Microsoft Favorites... '++LotusScript Development Environment:2:5:(Options):0:66
  3948. '++LotusScript Development Environment:2:5:(Forward):0:1
  3949. Declare Sub Click(Source As Button)
  3950. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3951. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3952. Private Sub BindEvents(Byval Objectname_ As String)
  3953.      Static Source As BUTTON
  3954.      Set Source = Bind(Objectname_)
  3955.      On Event Click From Source Call Click
  3956. End Sub
  3957. '++LotusScript Development Environment:2:2:Click:1:12
  3958. Sub Click(Source As Button)
  3959.      
  3960.      ImportFavorites
  3961. End Sub
  3962. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  3963. '++LotusScript Development Environment:2:5:(Forward):0:1
  3964. Declare Sub Click(Source As Button)
  3965. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3966. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3967. Private Sub BindEvents(Byval Objectname_ As String)
  3968.      Static Source As BUTTON
  3969.      Set Source = Bind(Objectname_)
  3970.      On Event Click From Source Call Click
  3971. End Sub
  3972. '++LotusScript Development Environment:2:2:Click:1:12
  3973. Sub Click(Source As Button)
  3974.      
  3975.      ImportBookmarks
  3976. End Sub
  3977. Internet Properties...'++LotusScript Development Environment:2:5:(Options):0:66
  3978. '++LotusScript Development Environment:2:5:(Forward):0:1
  3979. Declare Sub Click(Source As Button)
  3980. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3981. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3982. Private Sub BindEvents(Byval Objectname_ As String)
  3983.      Static Source As BUTTON
  3984.      Set Source = Bind(Objectname_)
  3985.      On Event Click From Source Call Click
  3986. End Sub
  3987. '++LotusScript Development Environment:2:2:Click:1:12
  3988. Sub Click(Source As Button)
  3989.      
  3990.      Dim iret As Integer
  3991.      iret=Shell("rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl", 1)
  3992. End Sub
  3993.     0S0E
  3994. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  3995. '++LotusScript Development Environment:2:5:(Forward):0:1
  3996. Declare Sub Click(Source As Button)
  3997. '++LotusScript Development Environment:2:5:(Declarations):0:2
  3998. '++LotusScript Development Environment:2:2:BindEvents:1:129
  3999. Private Sub BindEvents(Byval Objectname_ As String)
  4000.      Static Source As BUTTON
  4001.      Set Source = Bind(Objectname_)
  4002.      On Event Click From Source Call Click
  4003. End Sub
  4004. '++LotusScript Development Environment:2:2:Click:1:12
  4005. Sub Click(Source As Button)
  4006.      
  4007.      Dim docLocal As NotesDocument
  4008.      Dim docCollection As NotesDocumentCollection     
  4009.      Set docCollection = db.UnprocessedDocuments
  4010.      If (docCollection.Count = 0) Then
  4011.           Msgbox "You must select a document.",16,"Error"
  4012.           Exit Sub
  4013.      Else
  4014.           For j = 1 To docCollection.Count
  4015.                Set docLocal = docCollection.getnthdocument(j)               
  4016.                If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options", docLocal)) Then   
  4017.                     Select Case docLocal.ForwardOptions(0)
  4018.                     Case "1" : 'user wants to forward the URL only
  4019.                          Call CreateIELink(doclocal.url(0), doclocal.title(0))
  4020.                     Case "2" : 'user wants to send entire page
  4021.                          Call  ViewForward(docLocal)
  4022.                     End Select
  4023.           'remove any remaining fields that don't need to be carried around
  4024.                     docLocal.RemoveItem "ForwardOptions" 
  4025.                     docLocal.save True, False
  4026.                     
  4027.                End If
  4028.                Exit Sub
  4029.           Next
  4030.      End If
  4031.      Exit Sub
  4032. End Sub
  4033. '++LotusScript Development Environment:2:5:(Options):0:74
  4034. Option Public
  4035. Use "InternetFunctions"
  4036. '++LotusScript Development Environment:2:5:(Forward):0:1
  4037. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4038. '++LotusScript Development Environment:2:5:(Options):0:66
  4039. '++LotusScript Development Environment:2:5:(Forward):0:1
  4040. Declare Sub Postopen(Source As Notesuiview)
  4041. Declare Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  4042. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4043. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4044. Private Sub BindEvents(Byval Objectname_ As String)
  4045.      Static Source As NOTESUIVIEW
  4046.      Set Source = Bind(Objectname_)
  4047.      On Event Postopen From Source Call Postopen
  4048.      On Event Queryaddtofolder From Source Call Queryaddtofolder
  4049. End Sub
  4050. '++LotusScript Development Environment:2:2:Postopen:1:12
  4051. Sub Postopen(Source As Notesuiview)
  4052.      InstantiateObjects
  4053. End Sub
  4054. '++LotusScript Development Environment:2:2:Queryaddtofolder:1:12
  4055. Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  4056.      Call MoveToFolder(source,target,continue)
  4057. End Sub
  4058. O=Lotus Notes
  4059. O=Lotus Notes
  4060. PURSAFO
  4061. |.:#U
  4062. O=Lotus Notes
  4063. CN=Lotus Notes Template Development/O=Lotus Notes
  4064. PURSAFO
  4065. $SCRIPTOBJ_22
  4066. $TITLE
  4067. $Index
  4068. $Formula
  4069. $FormulaClass
  4070. $VIEWFORMAT
  4071. $FormFormula
  4072. $Comment
  4073. $ACTIONS
  4074. $SCRIPTOBJ_2
  4075. $SCRIPTOBJ_3
  4076. $SCRIPTOBJ_6
  4077. $SCRIPTOBJ_7
  4078. $SCRIPTOBJ_9
  4079. $SCRIPTOBJ_16
  4080. $SCRIPTOBJ_18
  4081. $SCRIPTOBJ_19
  4082. $SCRIPTOBJ_20
  4083. $SCRIPTOBJ_21
  4084. $ViewGlobalScript
  4085. $ViewGlobalScript_O
  4086. $ViewScript
  4087. $ViewScript_O
  4088. O=Lotus Notes
  4089. O=Lotus Notes
  4090. PURSAFO
  4091. |.:#U
  4092. O=Lotus Notes
  4093. CN=Lotus Notes Template Development/O=Lotus Notes
  4094. PURSAFO
  4095. sZ%!ZM}
  4096. $Flags
  4097.     0S0E
  4098.     0S0E
  4099.     0S0E
  4100.     0S0E
  4101. Browse'++LotusScript Development Environment:2:5:(Options):0:66
  4102. '++LotusScript Development Environment:2:5:(Forward):0:1
  4103. Declare Sub Click(Source As Button)
  4104. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4105. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4106. Private Sub BindEvents(Byval Objectname_ As String)
  4107.      Static Source As BUTTON
  4108.      Set Source = Bind(Objectname_)
  4109.      On Event Click From Source Call Click
  4110. End Sub
  4111. '++LotusScript Development Environment:2:2:Click:1:12
  4112. Sub Click(Source As Button)
  4113.      Browse
  4114. End Sub
  4115. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  4116. '++LotusScript Development Environment:2:5:(Forward):0:1
  4117. Declare Sub Click(Source As Button)
  4118. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4119. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4120. Private Sub BindEvents(Byval Objectname_ As String)
  4121.      Static Source As BUTTON
  4122.      Set Source = Bind(Objectname_)
  4123.      On Event Click From Source Call Click
  4124. End Sub
  4125. '++LotusScript Development Environment:2:2:Click:1:12
  4126. Sub Click(Source As Button)
  4127.      ViewDelete
  4128. End Sub
  4129. _Reloade(
  4130.     0S0E
  4131.     0S0E
  4132. Print...'++LotusScript Development Environment:2:5:(Options):0:66
  4133. '++LotusScript Development Environment:2:5:(Forward):0:1
  4134. Declare Sub Click(Source As Button)
  4135. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4136. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4137. Private Sub BindEvents(Byval Objectname_ As String)
  4138.      Static Source As BUTTON
  4139.      Set Source = Bind(Objectname_)
  4140.      On Event Click From Source Call Click
  4141. End Sub
  4142. '++LotusScript Development Environment:2:2:Click:1:12
  4143. Sub Click(Source As Button)
  4144.      PrintWebDocument
  4145. End Sub
  4146. _Search-'++LotusScript Development Environment:2:5:(Options):0:66
  4147. '++LotusScript Development Environment:2:5:(Forward):0:1
  4148. Declare Sub Click(Source As Button)
  4149. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4150. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4151. Private Sub BindEvents(Byval Objectname_ As String)
  4152.      Static Source As BUTTON
  4153.      Set Source = Bind(Objectname_)
  4154.      On Event Click From Source Call Click
  4155. End Sub
  4156. '++LotusScript Development Environment:2:2:Click:1:12
  4157. Sub Click(Source As Button)
  4158.      Dim docLocal As NotesDocument
  4159.      Dim browserobject As Variant
  4160.      Dim objectitem As notesrichtextitem
  4161.      
  4162.      Dim docCollection As NotesDocumentCollection     
  4163.      Set docCollection = db.UnprocessedDocuments
  4164.      If (docCollection.Count = 0) Then
  4165.           Msgbox "You must select a document.",16,"Error"
  4166.           Exit Sub
  4167.      End If
  4168.      Set docLocal = docCollection.GetFirstDocument
  4169.      If docLocal.Form(0) = "WebBrowserForm" Then
  4170.           Set objectitem = docLocal.getfirstitem("Browser")
  4171.           browserobject = objectitem.getembeddedobject("Browser")
  4172.           IESearch(browserobject)
  4173.      Else
  4174.           OpenSearchSite docLocal
  4175.      End If
  4176.      
  4177. End Sub
  4178. _Forward    
  4179. Sh_are...
  4180. '++LotusScript Development Environment:2:5:(Options):0:66
  4181. '++LotusScript Development Environment:2:5:(Forward):0:1
  4182. Declare Sub Click(Source As Button)
  4183. Declare Function GetInternetProfile
  4184. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4185. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4186. Private Sub BindEvents(Byval Objectname_ As String)
  4187.      Static Source As BUTTON
  4188.      Set Source = Bind(Objectname_)
  4189.      On Event Click From Source Call Click
  4190. End Sub
  4191. '++LotusScript Development Environment:2:2:Click:1:12
  4192. Sub Click(Source As Button)
  4193.      Dim docLocal As NotesDocument
  4194.      Dim webdoc As notesdocument
  4195.      Dim docCollection As NotesDocumentCollection     
  4196.      Set docCollection = db.UnprocessedDocuments
  4197.      If (docCollection.Count = 0) Then
  4198.           Msgbox "You must select a document.",16,"Error"
  4199.           Exit Sub
  4200.      End If
  4201.      Set docLocal = docCollection.GetFirstDocument
  4202.      If docLocal.hasitem("URL") Then
  4203.           docLocal.tmpWebServer  = docProfile.WebServer
  4204.           docLocal.tmpWebDb = docProfile.WebDatabase
  4205.           docLocal.Save True, True
  4206.           If (w.DialogBox("ShareWebPage", True, True, False, False, False, False, "Share Options", doclocal)) Then
  4207.                docLocal.Save True, True
  4208.                Select Case docLocal.SharedOptions(0)
  4209.                'case 1 was previously forward bookmark.  That's now done off of the forward option
  4210.                Case "2" : 'user wants to copy this to the shared web database
  4211.                     If docLocal.Form(0) = "WebBrowserForm" Then
  4212.                          CopyDocumentToSharedDatabase docLocal, browserobject.locationurl
  4213.                     Else
  4214.                          CopyDocumentToSharedDatabase docLocal, docLocal.url(0)
  4215.                     End If
  4216.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  4217.                     If docLocal.Form(0) = "WebBrowserForm" Then
  4218.                          CreateRatingDocument docLocal, browserobject.locationurl, browserobject.Locationname
  4219.                     Else
  4220.                          CreateRatingDocument docLocal,docLocal.url(0), docLocal.title(0)
  4221.                     End If
  4222.                End Select
  4223.           'remove any remaining fields that don't need to be carried around
  4224.                docLocal.removeItem "ForwardTo"
  4225.                docLocal.RemoveItem "SharedOptions" 
  4226.                docLocal.RemoveItem "Rating"
  4227.                docLocal.removeItem "Content"
  4228.                docLocal.removeItem "Comments"
  4229.           End If     
  4230.           docLocal.RemoveItem "tmpWebServer"
  4231.           docLocal.RemoveItem "tmpWebDb"
  4232.           docLocal.Save True, True
  4233.      Else
  4234.           Msgbox "This document does not contain a URL."
  4235.      End If
  4236. End Sub
  4237. '++LotusScript Development Environment:2:1:GetInternetProfile:1:8
  4238. Function GetInternetProfile
  4239.          'we need to get the profile document to make sure this is feasible and to get the location of the shared db
  4240.      Set view = db.getView("(Internet Profile)")
  4241.      Set GetInternetProfile = view.GetFirstDocument
  4242. End Function
  4243. Internet Profiles
  4244. Internet Options
  4245. WebServer
  4246.     0S0E
  4247. _Move to Folder...
  4248. Categori_ze
  4249. _Edit Document
  4250. Send Docu_ment
  4251. Move Page to Folder... 
  4252.     0S0E
  4253. _Remove from Folder...
  4254. Import Microsoft Favorites...w'++LotusScript Development Environment:2:5:(Options):0:66
  4255. '++LotusScript Development Environment:2:5:(Forward):0:1
  4256. Declare Sub Click(Source As Button)
  4257. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4258. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4259. Private Sub BindEvents(Byval Objectname_ As String)
  4260.      Static Source As BUTTON
  4261.      Set Source = Bind(Objectname_)
  4262.      On Event Click From Source Call Click
  4263. End Sub
  4264. '++LotusScript Development Environment:2:2:Click:1:12
  4265. Sub Click(Source As Button)
  4266.      ImportFavorites
  4267. End Sub
  4268. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  4269. '++LotusScript Development Environment:2:5:(Forward):0:1
  4270. Declare Sub Click(Source As Button)
  4271. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4272. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4273. Private Sub BindEvents(Byval Objectname_ As String)
  4274.      Static Source As BUTTON
  4275.      Set Source = Bind(Objectname_)
  4276.      On Event Click From Source Call Click
  4277. End Sub
  4278. '++LotusScript Development Environment:2:2:Click:1:12
  4279. Sub Click(Source As Button)
  4280.      ImportBookmarks
  4281. End Sub
  4282. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  4283. '++LotusScript Development Environment:2:5:(Forward):0:1
  4284. Declare Sub Click(Source As Button)
  4285. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4286. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4287. Private Sub BindEvents(Byval Objectname_ As String)
  4288.      Static Source As BUTTON
  4289.      Set Source = Bind(Objectname_)
  4290.      On Event Click From Source Call Click
  4291. End Sub
  4292. '++LotusScript Development Environment:2:2:Click:1:12
  4293. Sub Click(Source As Button)
  4294.      Dim docLocal As NotesDocument
  4295.      Dim docCollection As NotesDocumentCollection     
  4296.      Set docCollection = db.UnprocessedDocuments
  4297.      If (docCollection.Count = 0) Then
  4298.           Msgbox "You must select a document.",16,"Error"
  4299.           Exit Sub
  4300.      Else
  4301.           For j = 1 To docCollection.Count
  4302.                Set docLocal = docCollection.getnthdocument(j)               
  4303.                If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options", docLocal)) Then   
  4304.                     Select Case docLocal.ForwardOptions(0)
  4305.                     Case "1" : 'user wants to forward the URL only
  4306.                          Call CreateIELink(doclocal.url(0), doclocal.title(0))
  4307.                     Case "2" : 'user wants to send entire page
  4308.                          Call  ViewForward(docLocal)
  4309.                     End Select
  4310.           'remove any remaining fields that don't need to be carried around
  4311.                     docLocal.RemoveItem "ForwardOptions" 
  4312.                     docLocal.save True, False
  4313.                     
  4314.                End If
  4315.                Exit Sub
  4316.           Next
  4317.      End If
  4318.      Exit Sub
  4319. End Sub
  4320. '++LotusScript Development Environment:2:5:(Options):0:74
  4321. Option Public
  4322. Use "InternetFunctions"
  4323. '++LotusScript Development Environment:2:5:(Forward):0:1
  4324. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4325. '++LotusScript Development Environment:2:5:(Options):0:66
  4326. '++LotusScript Development Environment:2:5:(Forward):0:1
  4327. Declare Sub Postopen(Source As Notesuiview)
  4328. Declare Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  4329. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4330. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4331. Private Sub BindEvents(Byval Objectname_ As String)
  4332.      Static Source As NOTESUIVIEW
  4333.      Set Source = Bind(Objectname_)
  4334.      On Event Postopen From Source Call Postopen
  4335.      On Event Queryaddtofolder From Source Call Queryaddtofolder
  4336. End Sub
  4337. '++LotusScript Development Environment:2:2:Postopen:1:12
  4338. Sub Postopen(Source As Notesuiview)
  4339.      InstantiateObjects
  4340. End Sub
  4341. '++LotusScript Development Environment:2:2:Queryaddtofolder:1:12
  4342. Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  4343.  '    Call MoveToFolder(source,target,continue)
  4344. End Sub
  4345. O=Lotus Notes
  4346. O=Lotus Notes
  4347. PURSAFO
  4348. |.:#U
  4349. O=Lotus Notes
  4350. CN=Lotus Notes Template Development/O=Lotus Notes
  4351. PURSAFO
  4352. OS*!?D
  4353. $SCRIPTOBJ_20
  4354. $SCRIPTOBJ_19
  4355. $TITLE
  4356. $Index
  4357. $Formula
  4358. $FormulaClass
  4359. $VIEWFORMAT
  4360. $FormFormula
  4361. $Comment
  4362. $ACTIONS
  4363. $SCRIPTOBJ_2
  4364. $SCRIPTOBJ_3
  4365. $SCRIPTOBJ_6
  4366. $SCRIPTOBJ_7
  4367. $SCRIPTOBJ_9
  4368. $SCRIPTOBJ_16
  4369. $SCRIPTOBJ_17
  4370. $SCRIPTOBJ_18
  4371. $ViewGlobalScript
  4372. $ViewGlobalScript_O
  4373. $ViewScript
  4374. $ViewScript_O
  4375. Browse'++LotusScript Development Environment:2:5:(Options):0:66
  4376. '++LotusScript Development Environment:2:5:(Forward):0:1
  4377. Declare Sub Click(Source As Button)
  4378. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4379. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4380. Private Sub BindEvents(Byval Objectname_ As String)
  4381.      Static Source As BUTTON
  4382.      Set Source = Bind(Objectname_)
  4383.      On Event Click From Source Call Click
  4384. End Sub
  4385. '++LotusScript Development Environment:2:2:Click:1:12
  4386. Sub Click(Source As Button)
  4387.      Browse
  4388. End Sub
  4389. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  4390. '++LotusScript Development Environment:2:5:(Forward):0:1
  4391. Declare Sub Click(Source As Button)
  4392. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4393. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4394. Private Sub BindEvents(Byval Objectname_ As String)
  4395.      Static Source As BUTTON
  4396.      Set Source = Bind(Objectname_)
  4397.      On Event Click From Source Call Click
  4398. End Sub
  4399. '++LotusScript Development Environment:2:2:Click:1:12
  4400. Sub Click(Source As Button)
  4401.      ViewDelete
  4402. End Sub
  4403. Print...'++LotusScript Development Environment:2:5:(Options):0:66
  4404. '++LotusScript Development Environment:2:5:(Forward):0:1
  4405. Declare Sub Click(Source As Button)
  4406. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4407. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4408. Private Sub BindEvents(Byval Objectname_ As String)
  4409.      Static Source As BUTTON
  4410.      Set Source = Bind(Objectname_)
  4411.      On Event Click From Source Call Click
  4412. End Sub
  4413. '++LotusScript Development Environment:2:2:Click:1:12
  4414. Sub Click(Source As Button)
  4415.      PrintWebDocument
  4416. End Sub
  4417. _Forward
  4418. Sh_are...
  4419. '++LotusScript Development Environment:2:5:(Options):0:66
  4420. '++LotusScript Development Environment:2:5:(Forward):0:1
  4421. Declare Sub Click(Source As Button)
  4422. Declare Function GetInternetProfile
  4423. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4424. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4425. Private Sub BindEvents(Byval Objectname_ As String)
  4426.      Static Source As BUTTON
  4427.      Set Source = Bind(Objectname_)
  4428.      On Event Click From Source Call Click
  4429. End Sub
  4430. '++LotusScript Development Environment:2:2:Click:1:12
  4431. Sub Click(Source As Button)
  4432.      
  4433.      Dim docLocal As NotesDocument
  4434.      Dim webdoc As notesdocument
  4435.      Dim docCollection As NotesDocumentCollection   
  4436.      
  4437.      Set docCollection = db.UnprocessedDocuments
  4438.      If (docCollection.Count = 0) Then
  4439.           Msgbox "You must select a document.",16,"Error"
  4440.           Exit Sub
  4441.      End If
  4442.      Set docLocal = docCollection.GetFirstDocument
  4443.      If docLocal.hasitem("URL") Then 
  4444.           docLocal.tmpWebServer  = docProfile.WebServer
  4445.           docLocal.tmpWebDb = docProfile.WebDatabase
  4446.           docLocal.Save True, True
  4447.           If (w.DialogBox("ShareWebPage", True, True, False, False, False, False, "Share Options", doclocal)) Then
  4448.                docLocal.Save True, True
  4449.                Select Case docLocal.SharedOptions(0)
  4450.                'case 1 was previously forward bookmark.  That's now done off of the forward option
  4451.                Case "2" : 'user wants to copy this to the shared web database
  4452.                     If docLocal.Form(0) = "WebBrowserForm" Then
  4453.                          CopyDocumentToSharedDatabase docLocal, browserobject.locationurl
  4454.                     Else
  4455.                          CopyDocumentToSharedDatabase docLocal, docLocal.url(0)
  4456.                     End If
  4457.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  4458.                     If docLocal.Form(0) = "WebBrowserForm" Then
  4459.                          CreateRatingDocument docLocal, browserobject.locationurl, browserobject.locationname
  4460.                     Else
  4461.                          CreateRatingDocument docLocal,docLocal.url(0), docLocal.title(0)
  4462.                     End If
  4463.                End Select
  4464.           'remove any remaining fields that don't need to be carried around
  4465.                docLocal.removeItem "ForwardTo"
  4466.                docLocal.RemoveItem "SharedOptions" 
  4467.                docLocal.RemoveItem "Rating"
  4468.                docLocal.removeItem "Content"
  4469.                docLocal.removeItem "Comments"
  4470.           End If     
  4471.           docLocal.RemoveItem "tmpWebServer"
  4472.           docLocal.RemoveItem "tmpWebDb"
  4473.           docLocal.Save True, True
  4474.      Else
  4475.           Msgbox "This document does not contain a URL."
  4476.      End If
  4477. End Sub
  4478. '++LotusScript Development Environment:2:1:GetInternetProfile:1:8
  4479. Function GetInternetProfile
  4480.          'we need to get the profile document to make sure this is feasible and to get the location of the shared db
  4481.      Set view = db.getView("(Internet Profile)")
  4482.      Set GetInternetProfile = view.GetFirstDocument
  4483. End Function
  4484. Internet Profiles
  4485. Internet Options
  4486. WebServer
  4487.     0S0E
  4488. Categori_zee
  4489. _Edit Document
  4490. Send Docu_ment
  4491. _Move to Folder...    
  4492. Move Page to Folder... 
  4493.     0S0E
  4494. _Remove from Folder...
  4495. Import Microsoft Favorites... '++LotusScript Development Environment:2:5:(Options):0:66
  4496. '++LotusScript Development Environment:2:5:(Forward):0:1
  4497. Declare Sub Click(Source As Button)
  4498. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4499. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4500. Private Sub BindEvents(Byval Objectname_ As String)
  4501.      Static Source As BUTTON
  4502.      Set Source = Bind(Objectname_)
  4503.      On Event Click From Source Call Click
  4504. End Sub
  4505. '++LotusScript Development Environment:2:2:Click:1:12
  4506. Sub Click(Source As Button)
  4507.      
  4508.      ImportFavorites
  4509. End Sub
  4510. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  4511. '++LotusScript Development Environment:2:5:(Forward):0:1
  4512. Declare Sub Click(Source As Button)
  4513. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4514. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4515. Private Sub BindEvents(Byval Objectname_ As String)
  4516.      Static Source As BUTTON
  4517.      Set Source = Bind(Objectname_)
  4518.      On Event Click From Source Call Click
  4519. End Sub
  4520. '++LotusScript Development Environment:2:2:Click:1:12
  4521. Sub Click(Source As Button)
  4522.      
  4523.      ImportBookmarks
  4524. End Sub
  4525. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  4526. '++LotusScript Development Environment:2:5:(Forward):0:1
  4527. Declare Sub Click(Source As Button)
  4528. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4529. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4530. Private Sub BindEvents(Byval Objectname_ As String)
  4531.      Static Source As BUTTON
  4532.      Set Source = Bind(Objectname_)
  4533.      On Event Click From Source Call Click
  4534. End Sub
  4535. '++LotusScript Development Environment:2:2:Click:1:12
  4536. Sub Click(Source As Button)
  4537.      
  4538.      Dim docLocal As NotesDocument
  4539.      Dim docCollection As NotesDocumentCollection     
  4540.      Set docCollection = db.UnprocessedDocuments
  4541.      If (docCollection.Count = 0) Then
  4542.           Msgbox "You must select a document.",16,"Error"
  4543.           Exit Sub
  4544.      Else
  4545.           For j = 1 To docCollection.Count
  4546.                Set docLocal = docCollection.getnthdocument(j)               
  4547.                If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options", docLocal)) Then   
  4548.                     Select Case docLocal.ForwardOptions(0)
  4549.                     Case "1" : 'user wants to forward the URL only
  4550.                          Call CreateIELink(doclocal.url(0), doclocal.title(0))
  4551.                     Case "2" : 'user wants to send entire page
  4552.                          Call  ViewForward(docLocal)
  4553.                     End Select
  4554.           'remove any remaining fields that don't need to be carried around
  4555.                     docLocal.RemoveItem "ForwardOptions" 
  4556.                     docLocal.save True, False
  4557.                     
  4558.                End If
  4559.                Exit Sub
  4560.           Next
  4561.      End If
  4562.      Exit Sub
  4563. End Sub
  4564. '++LotusScript Development Environment:2:5:(Options):0:74
  4565. Option Public
  4566. Use "InternetFunctions"
  4567. '++LotusScript Development Environment:2:5:(Forward):0:1
  4568. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4569. '++LotusScript Development Environment:2:5:(Options):0:66
  4570. '++LotusScript Development Environment:2:5:(Forward):0:1
  4571. Declare Sub Postopen(Source As Notesuiview)
  4572. Declare Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  4573. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4574. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4575. Private Sub BindEvents(Byval Objectname_ As String)
  4576.      Static Source As NOTESUIVIEW
  4577.      Set Source = Bind(Objectname_)
  4578.      On Event Postopen From Source Call Postopen
  4579.      On Event Queryaddtofolder From Source Call Queryaddtofolder
  4580. End Sub
  4581. '++LotusScript Development Environment:2:2:Postopen:1:12
  4582. Sub Postopen(Source As Notesuiview)
  4583.      InstantiateObjects
  4584. End Sub
  4585. '++LotusScript Development Environment:2:2:Queryaddtofolder:1:12
  4586. Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  4587.      Call MoveToFolder(source,target,continue)
  4588. End Sub
  4589. O=Lotus Notes
  4590. O=Lotus Notes
  4591. PURSAFO
  4592. |.:#U
  4593. O=Lotus Notes
  4594. CN=Lotus Notes Template Development/O=Lotus Notes
  4595. PURSAFO
  4596. $SCRIPTOBJ_14
  4597. $TITLE
  4598. $Name
  4599. $Index
  4600. $Formula
  4601. $FormulaClass
  4602. $VIEWFORMAT
  4603. $FormFormula
  4604. $Comment
  4605. $ACTIONS
  4606. $SCRIPTOBJ_0
  4607. $SCRIPTOBJ_1
  4608. $SCRIPTOBJ_2
  4609. $SCRIPTOBJ_4
  4610. $SCRIPTOBJ_11
  4611. $SCRIPTOBJ_12
  4612. $SCRIPTOBJ_13
  4613. $ViewGlobalScript
  4614. $ViewGlobalScript_O
  4615. $ViewScript
  4616. $ViewScript_O
  4617. Web Bots\Page Minder
  4618. >%!-eWv
  4619. Browse'++LotusScript Development Environment:2:5:(Options):0:66
  4620. '++LotusScript Development Environment:2:5:(Forward):0:1
  4621. Declare Sub Click(Source As Button)
  4622. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4623. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4624. Private Sub BindEvents(Byval Objectname_ As String)
  4625.      Static Source As BUTTON
  4626.      Set Source = Bind(Objectname_)
  4627.      On Event Click From Source Call Click
  4628. End Sub
  4629. '++LotusScript Development Environment:2:2:Click:1:12
  4630. Sub Click(Source As Button)
  4631.      
  4632.      Browse
  4633. End Sub
  4634. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  4635. '++LotusScript Development Environment:2:5:(Forward):0:1
  4636. Declare Sub Click(Source As Button)
  4637. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4638. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4639. Private Sub BindEvents(Byval Objectname_ As String)
  4640.      Static Source As BUTTON
  4641.      Set Source = Bind(Objectname_)
  4642.      On Event Click From Source Call Click
  4643. End Sub
  4644. '++LotusScript Development Environment:2:2:Click:1:12
  4645. Sub Click(Source As Button)
  4646.      
  4647.      ViewDelete     
  4648. End Sub
  4649. Print...'++LotusScript Development Environment:2:5:(Options):0:66
  4650. '++LotusScript Development Environment:2:5:(Forward):0:1
  4651. Declare Sub Click(Source As Button)
  4652. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4653. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4654. Private Sub BindEvents(Byval Objectname_ As String)
  4655.      Static Source As BUTTON
  4656.      Set Source = Bind(Objectname_)
  4657.      On Event Click From Source Call Click
  4658. End Sub
  4659. '++LotusScript Development Environment:2:2:Click:1:12
  4660. Sub Click(Source As Button)
  4661.      
  4662.      PrintWebDocument
  4663. End Sub
  4664. _Forward
  4665. Sh_are...
  4666. '++LotusScript Development Environment:2:5:(Options):0:66
  4667. '++LotusScript Development Environment:2:5:(Forward):0:1
  4668. Declare Sub Click(Source As Button)
  4669. Declare Function GetInternetProfile
  4670. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4671. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4672. Private Sub BindEvents(Byval Objectname_ As String)
  4673.      Static Source As BUTTON
  4674.      Set Source = Bind(Objectname_)
  4675.      On Event Click From Source Call Click
  4676. End Sub
  4677. '++LotusScript Development Environment:2:2:Click:1:12
  4678. Sub Click(Source As Button)
  4679.      
  4680.      Dim docLocal As NotesDocument
  4681.      Dim webdoc As notesdocument
  4682.      Dim docCollection As NotesDocumentCollection     
  4683.      Set docCollection = db.UnprocessedDocuments
  4684.      If (docCollection.Count = 0) Then
  4685.           Msgbox "You must select a document.",16,"Error"
  4686.           Exit Sub
  4687.      End If
  4688.      Set docLocal = docCollection.GetFirstDocument
  4689.      If docLocal.hasitem("URL") Then
  4690.           docLocal.tmpWebServer  = docProfile.WebServer
  4691.           docLocal.tmpWebDb = docProfile.WebDatabase
  4692.           docLocal.Save True, True
  4693.           If (w.DialogBox("ShareWebPage", True, True, False, False, False, False, "Share Options", doclocal)) Then
  4694.                docLocal.Save True, True
  4695.                Select Case docLocal.SharedOptions(0)
  4696.                'case 1 was previously forward bookmark.  That's now done off of the forward option
  4697.                Case "2" : 'user wants to copy this to the shared web database
  4698.                     If docLocal.Form(0) = "WebBrowserForm" Then
  4699.                          CopyDocumentToSharedDatabase docLocal, browserobject.locationurl
  4700.                     Else
  4701.                          CopyDocumentToSharedDatabase docLocal, docLocal.url(0)
  4702.                     End If
  4703.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  4704.                     If docLocal.Form(0) = "WebBrowserForm" Then
  4705.                          CreateRatingDocument docLocal, browserobject.locationurl,browserobject.locationname
  4706.                     Else
  4707.                          CreateRatingDocument docLocal,docLocal.url(0),docLocal.title(0)
  4708.                     End If
  4709.                End Select
  4710.           'remove any remaining fields that don't need to be carried around
  4711.                docLocal.removeItem "ForwardTo"
  4712.                docLocal.RemoveItem "SharedOptions" 
  4713.                docLocal.RemoveItem "Rating"
  4714.                docLocal.removeItem "Content"
  4715.                docLocal.removeItem "Comments"
  4716.           End If     
  4717.           docLocal.RemoveItem "tmpWebServer"
  4718.           docLocal.RemoveItem "tmpWebDb"
  4719.           docLocal.Save True, True
  4720.      Else
  4721.           Msgbox "This document does not contain a URL."
  4722.      End If
  4723. End Sub
  4724. '++LotusScript Development Environment:2:1:GetInternetProfile:1:8
  4725. Function GetInternetProfile
  4726.          'we need to get the profile document to make sure this is feasible and to get the location of the shared db
  4727.      Set view = db.getView("(Internet Profile)")
  4728.      Set GetInternetProfile = view.GetFirstDocument
  4729. End Function
  4730. Internet Profiles
  4731. Internet Options
  4732. WebServer
  4733.     0S0E
  4734. Categori_ze
  4735. _Edit Document
  4736. Send Docu_ment
  4737. _Move to Folder...    
  4738. Move Page to Folder... 
  4739.     0S0E
  4740. _Remove from Folder...
  4741. Import Microsoft Favorites...
  4742. '++LotusScript Development Environment:2:5:(Options):0:66
  4743. '++LotusScript Development Environment:2:5:(Forward):0:1
  4744. Declare Sub Click(Source As Button)
  4745. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4746. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4747. Private Sub BindEvents(Byval Objectname_ As String)
  4748.      Static Source As BUTTON
  4749.      Set Source = Bind(Objectname_)
  4750.      On Event Click From Source Call Click
  4751. End Sub
  4752. '++LotusScript Development Environment:2:2:Click:1:12
  4753. Sub Click(Source As Button)
  4754.      
  4755.      ImportFavorites
  4756. End Sub
  4757. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  4758. '++LotusScript Development Environment:2:5:(Forward):0:1
  4759. Declare Sub Click(Source As Button)
  4760. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4761. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4762. Private Sub BindEvents(Byval Objectname_ As String)
  4763.      Static Source As BUTTON
  4764.      Set Source = Bind(Objectname_)
  4765.      On Event Click From Source Call Click
  4766. End Sub
  4767. '++LotusScript Development Environment:2:2:Click:1:12
  4768. Sub Click(Source As Button)
  4769.      ImportBookmarks
  4770.      
  4771. End Sub
  4772. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  4773. '++LotusScript Development Environment:2:5:(Forward):0:1
  4774. Declare Sub Click(Source As Button)
  4775. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4776. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4777. Private Sub BindEvents(Byval Objectname_ As String)
  4778.      Static Source As BUTTON
  4779.      Set Source = Bind(Objectname_)
  4780.      On Event Click From Source Call Click
  4781. End Sub
  4782. '++LotusScript Development Environment:2:2:Click:1:12
  4783. Sub Click(Source As Button)
  4784.      
  4785.      Dim docLocal As NotesDocument
  4786.      Dim docCollection As NotesDocumentCollection     
  4787.      Set docCollection = db.UnprocessedDocuments
  4788.      If (docCollection.Count = 0) Then
  4789.           Msgbox "You must select a document.",16,"Error"
  4790.           Exit Sub
  4791.      Else
  4792.           For j = 1 To docCollection.Count
  4793.                Set docLocal = docCollection.getnthdocument(j)               
  4794.                If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options", docLocal)) Then   
  4795.                     Select Case docLocal.ForwardOptions(0)
  4796.                     Case "1" : 'user wants to forward the URL only
  4797.                          Call CreateIELink(doclocal.url(0), doclocal.title(0))
  4798.                     Case "2" : 'user wants to send entire page
  4799.                          Call  ViewForward(docLocal)
  4800.                     End Select
  4801.           'remove any remaining fields that don't need to be carried around
  4802.                     docLocal.RemoveItem "ForwardOptions" 
  4803.                     docLocal.save True, False
  4804.                     
  4805.                End If
  4806.                Exit Sub
  4807.           Next
  4808.      End If
  4809.      Exit Sub
  4810. End Sub
  4811. '++LotusScript Development Environment:2:5:(Options):0:74
  4812. Option Public
  4813. Use "InternetFunctions"
  4814. '++LotusScript Development Environment:2:5:(Forward):0:1
  4815. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4816. '++LotusScript Development Environment:2:5:(Options):0:66
  4817. '++LotusScript Development Environment:2:5:(Forward):0:1
  4818. Declare Sub Postopen(Source As Notesuiview)
  4819. Declare Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  4820. '++LotusScript Development Environment:2:5:(Declarations):0:2
  4821. '++LotusScript Development Environment:2:2:BindEvents:1:129
  4822. Private Sub BindEvents(Byval Objectname_ As String)
  4823.      Static Source As NOTESUIVIEW
  4824.      Set Source = Bind(Objectname_)
  4825.      On Event Postopen From Source Call Postopen
  4826.      On Event Queryaddtofolder From Source Call Queryaddtofolder
  4827. End Sub
  4828. '++LotusScript Development Environment:2:2:Postopen:1:12
  4829. Sub Postopen(Source As Notesuiview)
  4830.      InstantiateObjects
  4831. End Sub
  4832. '++LotusScript Development Environment:2:2:Queryaddtofolder:1:12
  4833. Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  4834.      Call MoveToFolder(source,target,continue)
  4835. End Sub
  4836. O=Lotus Notes
  4837. O=Lotus Notes
  4838. PURSAFO
  4839. |.:#U
  4840. O=Lotus Notes
  4841. CN=Lotus Notes Template Development/O=Lotus Notes
  4842. PURSAFO
  4843. d}6G^
  4844. $SCRIPTOBJ_14
  4845. $TITLE
  4846. $Name
  4847. $Index
  4848. $Formula
  4849. $FormulaClass
  4850. $VIEWFORMAT
  4851. $FormFormula
  4852. $Comment
  4853. $ACTIONS
  4854. $SCRIPTOBJ_0
  4855. $SCRIPTOBJ_1
  4856. $SCRIPTOBJ_2
  4857. $SCRIPTOBJ_4
  4858. $SCRIPTOBJ_11
  4859. $SCRIPTOBJ_12
  4860. $SCRIPTOBJ_13
  4861. $ViewGlobalScript
  4862. $ViewGlobalScript_O
  4863. $ViewScript
  4864. $ViewScript_O
  4865. Web Bots\Web Ahead
  4866. HelpForm
  4867. Title
  4868. O=Lotus Notes
  4869. O=Lotus Notes
  4870. PURSAFO
  4871. |.:#U
  4872. O=Lotus Notes
  4873. CN=Lotus Notes Template Development/O=Lotus Notes
  4874. PURSAFO
  4875. Kb4Pa
  4876. $TITLE
  4877. $INFO
  4878. $$ScriptName
  4879. $BODY
  4880. '++LotusScript Development Environment:2:5:(Options):0:74
  4881. Option Base 1
  4882. Use "AgentFunctions"
  4883. '++LotusScript Development Environment:2:5:(Forward):0:1
  4884. Declare Sub Initialize
  4885. Declare Sub WormThePage(URLToWorm As Variant)
  4886. Declare Sub ProcessURLField
  4887. Declare Sub RetrievePages(y As Integer)
  4888. Declare Sub CheckPage(urltocheck As String, y As Integer)
  4889. Declare Function OKToRetrieve(checkurl As String, ArraySizeOK As Integer) As Integer
  4890. Declare Function OKToGetPerRobots( url As Variant ) As Integer
  4891. Declare Sub FetchRobotsFile(url As Variant, currentdomain As String)
  4892. '++LotusScript Development Environment:2:5:(Declarations):0:10
  4893. Dim LevelsToWorm As Variant
  4894. Dim WebAheadAuthentication As Variant
  4895. Dim PageToCrawl As notesdocument
  4896. Dim NextPageToCrawl As notesdocument
  4897. Dim URLTextList() As String
  4898. Dim URLListIndex As Integer
  4899. Dim pages_to_worm () As String          'list of pages that links need to be retrieved from
  4900. Dim ptw As Integer  
  4901. Dim next_pages_to_worm () As String    'list of pages to retrieve in the next level pass
  4902. Dim nptw As Integer                              
  4903. Dim pages_retrieved ()As String            'list of pages that have already been retrieved for this session
  4904. Dim pr As Integer                                  
  4905. Dim pages_wormed () As String            'list of pages that have already been processed in this session
  4906. Dim pw As Integer  
  4907. Dim CurrentPageRetrieved As notesdocument
  4908. Dim ArraySizeOK As Integer
  4909. Dim WebAheadAgent As notesagent
  4910. '++LotusScript Development Environment:2:2:Initialize:1:10
  4911. Sub Initialize
  4912.      
  4913.      '*
  4914.      '*  Initialize  Variables and declare local variables
  4915.      '*
  4916.      
  4917.      Dim InterNetProfile As Notesdocument
  4918.      Dim ProfileView As notesview
  4919.      Dim WebAheadFolder As notesview
  4920.      Dim URL As Variant
  4921.      
  4922.      '*
  4923.      '*  Initialize Variables
  4924.      '*
  4925.      ArraySizeOK = True
  4926.      pw=1
  4927.      nptw=1
  4928.      pr=1
  4929.      ptw=1
  4930.      Redim pages_to_worm(ptw)
  4931.      Redim Next_Pages_to_worm(nptw)
  4932.      Redim pages_retrieved(pr)
  4933.      Redim pages_wormed(pw)
  4934.      InstantiateAgentObjects 
  4935.      Set WebDatabase = Session.CurrentDatabase
  4936.      Set WebAheadAgent = Session.currentagent
  4937.      
  4938.       '*
  4939.      '*  Open/Create the Agent Error Log on the client.
  4940.      '*
  4941.      
  4942.      Set AgentLog = OpenLog(WebAheadAgent.name)
  4943.      
  4944.      If LogLocation = "Agent Log" Then agentLog.LogErrors = True
  4945.      
  4946.      Call logaction( "Starting Web Ahead agent.....")
  4947.      
  4948.      
  4949.      '*
  4950.      '*  First check to see if the current location settings are set for local retrievals.
  4951.      '*
  4952.      
  4953.      If WebLocationOK Then
  4954.           
  4955.           If Not ( WebDatabase Is Nothing) Then
  4956.                Set datadoc = Session.SavedData
  4957.                
  4958.                If (DataDoc Is Nothing) Then
  4959.                     Set DataDoc = New Notesdocument (WebDatabase) 
  4960.                End If
  4961.           Else
  4962.                Call  logerror(1, "Unable to open Web Database.")
  4963.                Goto cleanup
  4964.           End If
  4965.           
  4966.           If View Is Nothing Then
  4967.                Call logerror(4, "Profile View does not exist.  Please replace the design of " +WebDatabase.Title+" with Personal Web Navigator 4.6 template.")
  4968.                Goto cleanup
  4969.           End If
  4970.           
  4971.           
  4972.           If docProfile Is Nothing Then
  4973.                Call logerror(4, "No profile document, please select Actions - Internet Options and save the document. ")
  4974.                Goto cleanup
  4975.           End If
  4976.           
  4977.      '*
  4978.      '*  Retrieving pertinent values from the
  4979.      '*  Internet Profile.
  4980.      '*
  4981.           
  4982.           LevelsToWorm = docProfile.ScanAhead
  4983.           If LevelsToWorm(0) = "" Then
  4984.                'Number of levels to Web Ahead not specified, assuming 1.
  4985.                LevelsToWorm(0) = "1"
  4986.           End If
  4987.           
  4988.      '*
  4989.      '*  The following lines instantiate the WebAhead folder and 
  4990.      '*  perform the worming of the pages.
  4991.      '*
  4992.           
  4993.           Set WebAheadFolder = WebDatabase.GetView("Web Bots\Web Ahead")
  4994.           
  4995.           If (WebAheadFolder Is Nothing) Then
  4996.                Call logerror(2, "Could not find Web Ahead Folder.  Please replace the design of " +WebDatabase.Title+" with Personal Web Navigator 4.5 and rerun the Web Ahead agent.")
  4997.                Goto cleanup
  4998.           End If
  4999.           
  5000.           Set PageToCrawl = WebAheadFolder.GetfirstDocument
  5001.           
  5002.           If (PageToCrawl Is Nothing) Then
  5003.                logaction( "No documents were found to retrieve links from.  Web Ahead Agent successfully finished.")
  5004.                Goto cleanup
  5005.           Else
  5006.                
  5007.           '*
  5008.           '*  The while loop retrieves all links off  the pages in the Web Ahead folder for every level specified.
  5009.           '*
  5010.                
  5011.                While Not (PageToCrawl Is Nothing)
  5012.                     If PageToCrawl.form(0) = "HelpForm"  Goto Nextdocument
  5013.                     If PageToCrawl.hasitem("URL") Then
  5014.                          URL = PageToCrawl.URL
  5015.                          Call PageToCrawl.ReplaceItemValue("WebAheadStatus", "1")          
  5016.                          Call PageToCrawl.Save(True, False)
  5017.                          WormThePage(URL(0))
  5018.                     Else
  5019.                          Call PageToCrawl.ReplaceItemValue("WebAheadStatus", "2") 
  5020.                          Call PageToCrawl.Save(True, False)
  5021.                          Goto NextDocument
  5022.                     End If
  5023. NextDocument:
  5024.                     If PageToCrawl.WebAheadStatus(0) <> "2" Then
  5025.                          Set NextPageToCrawl = WebAheadFolder.Getnextdocument(PageToCrawl)
  5026.                          Call PageToCrawl.Removefromfolder("Web Bots\Web Ahead")
  5027.                          Set PageToCrawl = NextPageToCrawl
  5028.                     Else
  5029.                          Set PageToCrawl = WebAheadFolder.Getnextdocument(PageToCrawl)
  5030.                     End If
  5031.                Wend
  5032.                
  5033.           End If
  5034.      End If
  5035. Cleanup:
  5036.      logaction( "Web Ahead agent ending.")
  5037. End Sub
  5038. '++LotusScript Development Environment:2:2:WormThePage:1:8
  5039. Sub WormThePage(URLToWorm As Variant)
  5040.      
  5041.      '*
  5042.      '*  This routine retrieves all links on the current page for the number of levels
  5043.      '*  specified in the internet options form.
  5044.      '*
  5045.      
  5046.      Pages_To_Worm(1) = URLToWorm
  5047.      
  5048.      '*  
  5049.      '* Check to see if there is a page to retrieve links from in the array pages_to_worm
  5050.      '*
  5051.      
  5052.      For y = 1 To Cint(LevelsToWorm(0))
  5053.           If ( DebugFlag = "1" ) Then logaction( "Retrieving level " + Cstr(y))
  5054.           If pages_to_worm(1) <> "" Then
  5055.                Forall J  In pages_to_worm
  5056.                     
  5057.                     If ( DebugFlag = "1" ) Then logaction( "About to retrieve links on  " + j  )     
  5058.                     
  5059.                     '*
  5060.                     '* Before we retrieve it, make sure that it hasn't already been retrieved for this session
  5061.                     '*
  5062.                     
  5063.                     If OKToRetrieve(j, ArraySizeOK) Then
  5064.                          
  5065.                          '*
  5066.                          '*  Make sure it's okay to retrieve pages from the site per the sites robots.txt
  5067.                          '*
  5068.                          
  5069.                          If OKToGetPerRobots(j) Then
  5070.                               Set CurrentPageRetrieved = RetrieveOverInternet(j,PageToCrawl,1)
  5071.                          Else
  5072.                               If ( DebugFlag = "1" ) Then  Call logerror(10, "Not okay to retrieve links off the site per robots.txt")
  5073.                               If ( DebugFlag = "1" ) Then Call logerror(10, "Could not retrieve links off the page"+j+".")
  5074.                               Call PageToCrawl.ReplaceItemValue("WebAheadStatus", "2") 
  5075.                               Call PageToCrawl.Save(True,False)
  5076.                               Exit Sub
  5077.                          End If
  5078.                          
  5079.                     Else
  5080.                          Set CurrentPageRetrieved = WebDatabase.Getdocumentbyurl(j,0,0)
  5081.                          
  5082.                          '*
  5083.                          '*  Make sure that the page which is already in the database is not an error page.
  5084.                          '*
  5085.                          
  5086.                          If (CurrentPageRetrieved.HTTPStatus(0) = "200") Or (CurrentPageRetrieved.HTTPStatus(0) = "304" ) Then
  5087.                               Goto already_retrieved
  5088.                          Else
  5089.                               Set CurrentPageRetrieved = RetrieveOverInternet(j, CurrentPageRetrieved,1)
  5090.                          End If
  5091.                     End If
  5092.                     
  5093.                     
  5094.                     
  5095.                     If (CurrentPageRetrieved.HTTPStatus(0) = "200") Or (CurrentPageRetrieved.HTTPStatus(0) = "304") Then
  5096.                          If ( DebugFlag = "1" ) Then Call logerror(10, "Successfully retrieved " + j)
  5097.                          
  5098.                               '*
  5099.                               '* Add the page to the page retrieval array         
  5100.                               '*
  5101.                          If pr < 10000 Then
  5102.                               pages_retrieved ( pr) = j
  5103.                               pr=pr+1
  5104.                               Redim Preserve pages_retrieved(pr)
  5105.                          Else
  5106.                               ArraySizeOK = False
  5107.                          End If
  5108.                          
  5109.                              '* 
  5110.                              '* Make sure that the returned document has a URLLinks# field
  5111.                              '* since that is where all of the URLs on the page are stored.
  5112.                              '*
  5113.                          
  5114. already_retrieved:
  5115.                          
  5116.                          If CurrentPageRetrieved.hasitem("URLLinks1") Then
  5117.                               
  5118.                                '*
  5119.                                '*  Process the URLLinks# fields into one concise, singular text list of URL's
  5120.                                '*
  5121.                               
  5122.                               ProcessURLField
  5123.                               
  5124.                                '*
  5125.                                '*  Go ahead and retrieve the pages in the URLTextList
  5126.                                '*
  5127.                               
  5128.                               RetrievePages(y)     
  5129.                               If ( DebugFlag = "1" ) Then logaction "Retrieved "+Cstr(URLListIndex) + " from the site "+Cstr(urltoworm)+"."
  5130.                               If ( DebugFlag = "1" ) Then logaction( "Just retrieved all links off of "+PageToCrawl.getitemvalue("URL")(0))
  5131.                          Else
  5132.                               If ( DebugFlag = "1" ) Then logaction( "No links to retrieve on " + PageToCrawl.getitemvalue("URL")(0))
  5133.                          End If            
  5134.                          
  5135.                               '*
  5136.                               '*  Now that the links have been retrieved, add the page to the list of pages that have already been processed.
  5137.                               '*  
  5138.                          
  5139.                          pages_wormed(pw) =CurrentPageRetrieved.getitemvalue("URL")(0)
  5140.                          pw=pw+1
  5141.                          Redim Preserve pages_wormed(pw)
  5142.                          
  5143.                     Else
  5144.                          If ( DebugFlag = "1" ) Then Call logerror(9, "Error page returned for " + j)
  5145.                          If ( DebugFlag = "1" ) Then Call logerror(9, "Could not retrieve links off the page"+j+".")
  5146.                     End If
  5147.                     
  5148.                     
  5149.                End Forall     
  5150.                If ( DebugFlag = "1" ) Then logaction "Finished retrieving links for level "+Cstr(y)
  5151.                
  5152.                
  5153.                '*
  5154.                '*  Now move to the next level of pages to retrieve links from in the pages_to_worm array
  5155.                '*  Reset the pages to worm array to clear out the previous pages to worm
  5156.                '*  Note:  we only need to do this is we are retrieving links for more than one level.
  5157.                '*
  5158.                
  5159.                If LevelsToWorm(0) <> "1" Then 
  5160.                     If nptw = 1 Then Goto Done
  5161.                     Redim pages_to_worm(nptw-1) As String
  5162.                     For z = 1 To (nptw-1)
  5163.                          pages_to_worm(z) = next_pages_to_worm(z)
  5164.                     Next Z
  5165.                     ptw = nptw
  5166.                     
  5167.                     '*
  5168.                     '*  Reinitialize the next pages to worm array
  5169.                     '*
  5170.                     nptw=1
  5171.                     Redim next_pages_to_worm(nptw) As String
  5172.                Else
  5173.                '*
  5174.                '* We are done.  There are no more pages to retrieve off the page.  The page needs to be removed from the folder.
  5175.                '*
  5176. done: 
  5177.                     
  5178.                     Exit For
  5179.                End If
  5180.           End If
  5181.           If ( DebugFlag = "1" ) Then logaction( "Finished retrieving " + LevelsToWorm(0) +" for the page" +Cstr(URLToWorm)+". ")
  5182.           If ( DebugFlag = "1" ) Then logaction( "Retrieved " + Cstr(pw)+"pages.")
  5183.           
  5184.      Next Y
  5185. End Sub
  5186. '++LotusScript Development Environment:2:2:ProcessURLField:1:8
  5187. Sub ProcessURLField
  5188.      
  5189.      '*
  5190.      '*  The purpose of this subroutine is to process all of the URLLinks#
  5191.      '*  fields into one concise, non-duplicated list of URL's that only
  5192.      '*  refer to http pages.  The result is the global array URLTextList.
  5193.      '*
  5194.      
  5195.      Dim URLField As String            'the current URLLinks# field
  5196.      Dim URLNum As Integer
  5197.      Dim URLFieldNum As Integer
  5198.      Dim RawURLList As Variant
  5199.      Dim DuplicatedURLList() As String
  5200.      
  5201.      
  5202.      URLNum =1
  5203.      URLField = "URLLinks1"
  5204.      URLFieldNum = 1
  5205.      
  5206.      '*
  5207.      '*  Put all the URL's in one text array -- URLTextList
  5208.      '*
  5209.      While CurrentPageRetrieved.HasItem(URLField)
  5210.           
  5211.           RawURLList = CurrentPageRetrieved.GetItemValue(URLField)
  5212.           Redim DuplicatedURLList (Ubound(RawURLList)+1)
  5213.           Forall j In RawURLList     
  5214.                
  5215.                '*
  5216.                '*   While we are putting all of the urls into one text array we will remove 
  5217.                '*  any urls other than those that use the http protocol.
  5218.                '*
  5219.                
  5220.                If Instr(1, j, "http",1) <> 0 Then
  5221.                     DuplicatedURLList(URLNum) = j
  5222.                     URLNum = URLNum + 1
  5223.                End If
  5224.           End Forall
  5225.           
  5226.           URLFieldNum = URLFieldNum + 1
  5227.           Mid$(URLField, 5) = Cstr(URLFieldNum)
  5228.      Wend
  5229.      
  5230.      Redim Preserve DuplicatedURLList(URLNum)
  5231.      
  5232.      '*
  5233.      '*  Now all URL's to fetch are in the DuplicatedURLList array
  5234.      '*  Now duplicates need to be removed from the array to save time
  5235.      '*
  5236.      
  5237.      Redim URLTextList(URLNum) As String
  5238.      
  5239.      URLListIndex = 1
  5240.      URLTextList(1) = DuplicatedURLList(1)
  5241.      If URLNum <>1 Then
  5242.           For y = 2 To (URLNum -1)
  5243.                URLListIndex = URLListIndex + 1              
  5244.                URLTextList(URLListIndex) = DuplicatedURLList(y)
  5245.                
  5246.                For x = 1 To (URLListIndex-1) 
  5247.                     If URLTextList(x) = DuplicatedURLList(y) Then
  5248.                          URLListIndex = URLListIndex - 1
  5249.                     End If
  5250.                Next  X             
  5251.           Next Y
  5252.      Else
  5253.           URLListIndex = URLListIndex + 1
  5254.      End If
  5255.      Redim Preserve URLTextList(URLListIndex)
  5256. End Sub
  5257. '++LotusScript Development Environment:2:2:RetrievePages:1:8
  5258. Sub RetrievePages(y As Integer)
  5259.      
  5260.      '*
  5261.      '*  This routine retrieves all of the pages in the URLTextList array.
  5262.      '*
  5263.      
  5264.      Forall j In URLTextList
  5265.           CheckPage j, y
  5266.      End Forall
  5267. End Sub
  5268. '++LotusScript Development Environment:2:2:CheckPage:1:8
  5269. Sub CheckPage(urltocheck As String, y As Integer)
  5270.      
  5271.      '*
  5272.      '*  This subroutine checks the page we are about to retrieve.
  5273.      '*  It first makes sure we have not already retrieved the page in this session.
  5274.      '*  Next it makes sure that the page retrieved is valid per the status code returned.
  5275.      '*
  5276.      
  5277.      Dim webdoc As notesdocument    
  5278.      Dim dummydoc As notesdocument
  5279.      
  5280.      '*
  5281.      '*  Check to make sure we have not already retrieved the page                              
  5282.      '*
  5283.      
  5284.      
  5285.      If OKToRetrieve(urltocheck,ArraySizeOK) Then 
  5286.           If OKToGetPerRobots(urltocheck) Then
  5287.                If Cint(LevelsToWorm(0)) - y  <> 0 Then
  5288.                     Set WebDoc = RetrieveOverInternet(urltocheck,dummydoc,1)
  5289.                Else
  5290.                     Set WebDoc = RetrieveOverInternet(urltocheck,dummydoc,0) 
  5291.                End If
  5292.                
  5293.                If (webdoc.HTTPstatus(0) = "200") Or (webdoc.HTTPStatus(0) = "304") Then
  5294.                     
  5295.                          '*
  5296.                          '* Add the page to the page retrieval array         
  5297.                          '*
  5298.                     If pr < 10000 Then
  5299.                          pages_retrieved ( pr) = (urltocheck)
  5300.                          pr=pr+1
  5301.                          Redim Preserve pages_retrieved(pr)
  5302.                     Else
  5303.                          ArraySizeOK = False
  5304.                     End If
  5305.                     
  5306.                     '*
  5307.                     '*  Add the page to the list of pages to be retreived
  5308.                     '*
  5309.                     If Cint(LevelsToWorm(0)) - y  <> 0 Then    
  5310.                          next_pages_to_worm(nptw) = (urltocheck)
  5311.                          nptw = nptw+1
  5312.                          Redim Preserve next_pages_to_worm(nptw)
  5313.                     End If
  5314.                Elseif (webdoc.HTTPStatus(0) = "401") Then
  5315.                     '*  
  5316.                     '*  The page needs to be authenticated, notify the user in the error log
  5317.                     '*
  5318.                     Call logerror(8,  "Web Ahead is unable to retrieve "+urltocheck+" because it requires authentication.")
  5319.                     Call logerror(8, "Retrieve the page manually and move it into the web ahead folder.")
  5320.                     
  5321.                Else
  5322.                     Call logerror(9, "Page " + urltocheck +" returned a bad status code:  "+webdoc.status(0)+".")
  5323.                End If
  5324.           Else
  5325.                Call logerror(10, "Page " + urltocheck + " is forbidden by the robots.txt file on the server.")
  5326.           End If
  5327.      Else
  5328.           next_pages_to_worm(nptw) = (urltocheck)
  5329.           nptw = nptw+1
  5330.           Redim Preserve next_pages_to_worm(nptw)
  5331.      End If
  5332.      
  5333.      
  5334. End Sub
  5335. '++LotusScript Development Environment:2:1:OKToRetrieve:1:8
  5336. Function OKToRetrieve(checkurl As String, ArraySizeOK As Integer) As Integer
  5337.      
  5338.      '*
  5339.      '*  This function goes throught the current list of URLs which have already
  5340.      '*  been retrieved for this session.  If the page has already been retrieved,
  5341.      '*  it sets the function equal to false.
  5342.      '*
  5343.      If ArraySizeOK Then
  5344.           OKToRetrieve = True
  5345.           Forall j In pages_retrieved
  5346.                If checkurl= j Then 
  5347.                     OKToRetrieve = False
  5348.                     Exit Function
  5349.                End If
  5350.           End Forall
  5351.      End If
  5352. End Function
  5353. '++LotusScript Development Environment:2:1:OKToGetPerRobots:1:8
  5354. Function OKToGetPerRobots( url As Variant ) As Integer
  5355.      '*
  5356.      '*  The purpose of this function is to check the host robots.txt file
  5357.      '*   for the site to make sure that it is okay to retrieve pages from the site.
  5358.      '*   It returns true if the page has not been excluded from robots.txt.
  5359.      '*
  5360.      
  5361.      Dim Currentdomain As String
  5362.      
  5363.      CurrentDomain = (Left(url, (Instr(8, url, "/", 1))))
  5364.      
  5365.      
  5366.      OKToGetPerRobots = True
  5367.      
  5368.      '*
  5369.      '* Check the complete list of "Disallow:" paths to see whether we match any of them
  5370.      '*
  5371.      
  5372.      If datadoc.HasItem( currentdomain ) Then
  5373.           exclist = datadoc.GetItemValue( currentdomain )
  5374.           If exclist(0) = "None" Then
  5375.                OKToGetPerRobots = True
  5376.                Exit Function
  5377.           End If
  5378.      Else
  5379.           Call   FetchRobotsFile(url, currentdomain)
  5380.           exclist = datadoc.GetItemValue( currentdomain )
  5381.           If exclist(0) = "None" Then
  5382.                OKToGetPerRobots = True
  5383.                Exit Function
  5384.           End If
  5385.      End If
  5386.      
  5387.           '*
  5388.           '*  Check whether any in that list match the path we want
  5389.           '*
  5390.      
  5391.      
  5392.      Forall testpath In exclist
  5393.           
  5394.                '*
  5395.                '*  Note:  testpath always begins with a forward-slash.  Wildcards have been removed at this stage,
  5396.                '* so "/" means disallow all paths;  "/tmp" means "/tmp*".  Testpath is also always stored in lowercase.
  5397.                '*
  5398.           
  5399.           Dim l As Integer
  5400.           l  = Len( testpath )
  5401.           If l > 0 Then
  5402.                If Left$( path, l )=testpath Then
  5403.                     
  5404.                          '*
  5405.                          '* Hit an exclusion!  
  5406.                          '*
  5407.                     
  5408.                     OKToGetPerRobots = False
  5409.                     Exit Function
  5410.                End If
  5411.           End If
  5412.      End Forall
  5413.      
  5414. End Function
  5415. '++LotusScript Development Environment:2:2:FetchRobotsFile:1:8
  5416. Sub FetchRobotsFile(url As Variant, currentdomain As String)
  5417.      Dim exclusionpage As NotesDocument
  5418.      Dim dummypage As notesdocument
  5419.           '*
  5420.           '*  Retrieve the site's ROBOTS.TXT. 
  5421.           '*
  5422.      
  5423.      Set exclusionpage = RetrieveOverInternet(CurrentDomain+"robots.txt" , dummypage,0)     
  5424.      
  5425.           '*
  5426.           '* If that failed, we have free access to the site.
  5427.           '*
  5428.      
  5429.      If (exclusionpage.HTTPStatus(0) ="200") Or (exclusionpage.HTTPStatus(0) = "304") Then
  5430.           
  5431.                '*
  5432.                '* Got the robots.txt file - we have to parse the file now!
  5433.                '*
  5434.           
  5435.           Dim robtext As String
  5436.           Dim item As Variant
  5437.           Set item = exclusionpage.GetFirstItem("Body")
  5438.           robtext = Lcase$(item.text)
  5439.           
  5440.                '*
  5441.                '* Parse until we get a User-Agent line which matches "*" or "InterNotes" somewhere (or Mozilla)
  5442.                '* Then look thru the "Disallow" lines to see whether they match our URL path
  5443.                '*
  5444.           
  5445.           Dim begin As Integer
  5446.           Dim dbegin As Integer
  5447.           Dim uapos As Integer
  5448.           Dim dapos As Integer
  5449.           Dim danum As Integer
  5450.           Dim t As String
  5451.           Dim  tt As String
  5452.           Dim darray (0 To 50 ) As String
  5453.           begin = 1
  5454.           uapos = 1
  5455.           danum = 0
  5456.           
  5457.           While uapos>0
  5458.                uapos = Instr( begin, robtext, "user-agent:")
  5459.                If uapos>0 Then
  5460.                     uapos=uapos+11  ' skip the "user-agent:" text
  5461.                     t = Ltrim$( Mid$( robtext, uapos ) )
  5462.                     If Left$( t, 1 )="*" Or Left$( t, 7 )="mozilla" Or Left$( t, 5 )="lotus" Then
  5463.                          
  5464.                               '*
  5465.                               '*  This applies to us!!! Better respect the Disallow flags.
  5466.                               '* First, chop any further User-Agent pieces so we know what to use.
  5467.                               '*
  5468.                          
  5469.                          Dim t1 As Integer
  5470.                          t1 = Instr( t, "user-agent:" )
  5471.                          If t1>0 Then
  5472.                               tt = Rtrim$( Left$( t, t1-1 ) )
  5473.                          Else
  5474.                               tt = Rtrim$( t )
  5475.                          End If
  5476.                          
  5477.                               '*
  5478.                               '* Now parse tt for *all*  the Disallow: paths - don't check them just yet
  5479.                               '*
  5480.                          
  5481.                          dbegin = 1
  5482.                          dapos = 1
  5483.                          While dapos>0
  5484.                               dapos = Instr( dbegin, tt, "disallow:" )
  5485.                               If dapos>0 Then
  5486.                                    Dim ban As String
  5487.                                    dapos = dapos+10   ' skip the "disallow:" text
  5488.                                    dendpos = Instr( dapos, tt, "#" )
  5489.                                    If dendpos=0 Then dendpos = Instr( dapos, tt, Chr$(10) )
  5490.                                    If dendpos=0 Then dendpos = Len( tt )-1
  5491.                                    ban = Trim$( Mid$( tt, dapos, dendpos-dapos ) )
  5492.                                    If Len(ban)>0 Then
  5493.                                         If Right$(ban, 1)="/" Then ban =Left$(ban, Len(ban)-1)
  5494.                                         darray( danum ) = ban
  5495.                                         danum = danum+1                                           
  5496.                                    End If                                 
  5497.                               End If
  5498.                               dbegin = dapos
  5499.                          Wend
  5500.                          
  5501.                               '*
  5502.                               '*  Done that user-agent list.  We should keep going, in case there are more!
  5503.                               '*
  5504.                          
  5505.                     End If
  5506.                     
  5507.                          '*
  5508.                          '* Find the next User-Agent which might apply to us
  5509.                          '*
  5510.                     
  5511.                     begin = uapos
  5512.                End If
  5513.           Wend
  5514.           
  5515.                '*
  5516.                '* Store cleaned-up list of Disallow paths in the SavedData document in the field "banthisserver"
  5517.                '*
  5518.           
  5519.           If danum>0 Then
  5520.                Call datadoc.ReplaceItemValue( currentdomain, darray )
  5521.                Call datadoc.Save( True, False )
  5522.           Else
  5523.                Call datadoc.Replaceitemvalue(currentdomain, "None")
  5524.                Call datadoc.Save( True, False )
  5525.           End If
  5526.      Else
  5527.           If ( DebugFlag = "1" ) Then logaction( "Robots.txt page returned an error.  Probably doesn't exist.")
  5528.           Call datadoc.Replaceitemvalue(currentdomain, "None")
  5529.           Call datadoc.Save( True, False )
  5530.      End If
  5531.      
  5532.      
  5533. End Sub
  5534. [$    K|
  5535. O=Lotus Notes
  5536. O=Lotus Notes
  5537. PURSAFO
  5538. |.:#U
  5539. O=Lotus Notes
  5540. CN=Lotus Notes Template Development/O=Lotus Notes
  5541. PURSAFO
  5542. $TITLE
  5543. $AssistType
  5544. $AssistLastRun
  5545. $AssistDocCount
  5546. $AssistFlags
  5547. $AssistTrigger
  5548. $AssistInfo
  5549. $AssistQuery
  5550. $AssistAction
  5551. $AssistAction_Ex
  5552. '++LotusScript Development Environment:2:5:(Options):0:74
  5553. Option Public
  5554. '++LotusScript Development Environment:2:5:(Forward):0:1
  5555. Declare Sub RefreshPage
  5556. Declare Sub InstantiateObjects
  5557. Declare Sub OpenHomeURL
  5558. Declare Sub OpenSearchSite (docLocal As NotesDocument)
  5559. Declare Sub CreateNotesLink (docLocal As NotesDocument)
  5560. Declare Sub CopyDocumentToSharedDatabase (docLocal As NotesDocument, url As String) 
  5561. Declare Sub CreateRatingDocument (docLocal As NotesDocument, url As String, title As String)
  5562. Declare Sub ReduceToLink (docLocal As NotesDocument)
  5563. Declare Sub GetProfileDocument
  5564. Declare Function LocationOK As Integer
  5565. Declare Sub  ImportFavorites
  5566. Declare Sub FavoriteExtractAddress(posBegin As Integer)
  5567. Declare Sub CreateFavoriteDocument   
  5568. Declare Sub FavoriteProcessOneLine
  5569. Declare Sub ImportBookmarks
  5570. Declare Sub NavigatorExtractAddress(posBegin As Integer)
  5571. Declare Sub ShrinkFolderName
  5572. Declare Sub NavigatorProcessOneLine
  5573. Declare Sub GetFolderName(posStart As Integer)
  5574. Declare Sub CreateNavigatorDocument
  5575. Declare Sub PrintWebDocument
  5576. Declare Sub WebNavHelp
  5577. Declare Sub IENextdoc(browserobject As Variant)    
  5578. Declare Sub IEPreviousDoc(browserobject As Variant)     
  5579. Declare Sub IEStop(browserobject As Variant)  
  5580. Declare Function GetCurrentLocation As String
  5581. Declare Sub IEForwardNote (doc As notesdocument, browserobject As Variant)
  5582. Declare Sub IERefreshPage(browserobject As Variant)     
  5583. Declare Sub IEOpenHome(browserobject As Variant)
  5584. Declare Sub IESearch(browserobject As Variant)
  5585. Declare Sub CreateIELink(url As String, title As String)
  5586. Declare Sub MoveToFolder(Source As NotesUIView,Target As Variant, Continue As Variant)
  5587. Declare Function GetLocalNAB() As NotesDatabase
  5588. Declare Function GetRegValue (szKey$, szValueName$) As String
  5589. Declare Sub SetRegValue(szKey$, szValueName$, szKeyValue)
  5590. Declare Function GetLocationItem (itemname As String) As Variant
  5591. Declare Sub SetLocationItem(itemname As String, itemvalue As String)
  5592. Declare Sub CreateIEBookmark(browserobject As Variant, folder As String)
  5593. Declare Sub RemoveObjects(doc As notesdocument)
  5594. Declare Sub GetCurrentFolders
  5595. Declare Sub ViewDelete
  5596. Declare Sub Browse
  5597. Declare Sub ViewForward(docLocal As notesdocument)
  5598. Declare Function DuplicateBookmark(szURL) As Integer
  5599. Declare Sub CheckRegistrySettings
  5600. Declare Function CompareValues(IEValue As String, NotesValue As Variant) As String
  5601. Declare Function ParseFilename(szPath As String) As String
  5602. Declare Sub NotesForwardNote(doc As notesdocument)
  5603. Declare Function ParseURL(url As String) As String
  5604. '++LotusScript Development Environment:2:5:(Declarations):0:10
  5605. 'this script library is used by the views and forms for sharing various scripts -> Home, Search, Share, Import Bookmarks, and Reduce
  5606. Dim w As NotesUIWorkspace
  5607. Dim session As NotesSession
  5608. Dim db As NotesDatabase
  5609. Dim dbShared As NotesDatabase
  5610. Dim docProfile As NotesDocument
  5611. Dim note As NotesDocument
  5612. Dim bookmark As NotesDocument
  5613. Dim bookmarkfolder As NotesView
  5614. Dim firstnavigatedone As Integer
  5615. Dim view As NotesView
  5616. Dim hFile As Integer
  5617. Dim numDirectories As Integer
  5618. Dim szPath As String
  5619. Dim szEntry As String
  5620. Dim szURL As String
  5621. Dim szTitle As String
  5622. Dim szFolder As String
  5623. Dim filenamepath As String
  5624. Dim filename As String
  5625. Dim fileflag As Integer
  5626. Dim Directories() As String
  5627. %INCLUDE "lsconst.lss"
  5628. ' This declares the routines used for retrieving key values
  5629. ' from the registry on a Windows 32 client.
  5630. ' NOTE: if you are running this app on a platform other than
  5631. ' Windows 32 Intel, then it will not work.
  5632. Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (Byval hKey&, Byval szSubKey$, Byval dwOptions&, Byval SAM&, hKey&) As Long
  5633. Declare Function RegCloseKey Lib "advapi32.dll" Alias "RegCloseKey" (Byval hKey&) As Long
  5634. Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (Byval hKey&, Byval szValue$, Byval dwReserved&, dwType&, Byval szValue$, lpdwBuf&) As Long
  5635. Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (Byval hKey&, Byval szValue$, Byval dwReserved&, Byval dwType&, Byval lpData$, Byval cbData&)  As Long
  5636. Const HKEY_CURRENT_USER = &H80000001
  5637. Const KEY_READ = &H00020019
  5638. Const KEY_SET_VALUE = &H0002
  5639. Dim RetCode As Long
  5640. Dim dwType As Long
  5641. Dim hKey As Long
  5642. Dim dwSize As Long
  5643. Dim lpData As String
  5644. Dim cbData As Long
  5645. '++LotusScript Development Environment:2:2:RefreshPage:1:8
  5646. Sub RefreshPage
  5647.      
  5648.      
  5649.      Dim currenturl As String  
  5650.      Dim currentdoc As notesuidocument
  5651.      Dim urldoc As notesdocument
  5652.      Dim docCollection As NotesDocumentCollection     
  5653.      Set docCollection = db.UnprocessedDocuments
  5654.      If (docCollection.Count = 0) Then
  5655.           Msgbox "You must select a document.",16,"Error"
  5656.           Exit Sub
  5657.      End If
  5658.      Set currentdoc = w.currentdocument
  5659.      currenturl=currentdoc.fieldgettext("URL") 
  5660.      Set urldoc = db.GetDocumentByURL(currenturl, 1)
  5661.      w.EditDocument False, urldoc
  5662.      w.viewrefresh
  5663. End Sub
  5664. '++LotusScript Development Environment:2:2:InstantiateObjects:1:8
  5665. Sub InstantiateObjects
  5666.      
  5667.      Set w = New NotesUIWorkspace
  5668.      Set session = New NotesSession
  5669.      Set db = session.CurrentDatabase
  5670.      Set view = db.GetView("(Internet Profile)")
  5671.      Set docProfile = view.GetFirstDocument
  5672.      
  5673. End Sub
  5674. '++LotusScript Development Environment:2:2:OpenHomeURL:1:8
  5675. Sub OpenHomeURL
  5676.      On Error 4005 Goto LoadHomeURL
  5677.      
  5678.      Dim urldoc As NotesDocument
  5679.      
  5680.      
  5681.      
  5682.      If (docProfile Is Nothing) Then GetProfileDocument
  5683.      If (docProfile Is Nothing) Then
  5684.           Msgbox "You need to specify a home page URL to open. Choose Actions - Internet Options from the menu."
  5685.           Exit Sub 
  5686.      End If
  5687.      If (docProfile.openurl(0) <> "") Then 
  5688.           w.URLOpen docProfile.openurl(0), 2, 0, "", "", "", "", "", True
  5689.      Else
  5690.           Msgbox "You need to specify a home page URL to open. Choose Actions - Internet Options from the menu."
  5691.           Exit Sub 
  5692.      End If
  5693.      Exit Sub
  5694. LoadHomeURL:
  5695.      w.URLOpen docProfile.openurl(0), 2, 0, "", "", "", "", "", True
  5696.      Exit Sub
  5697. End Sub
  5698. '++LotusScript Development Environment:2:2:OpenSearchSite:1:8
  5699. Sub OpenSearchSite (docLocal As NotesDocument)
  5700.      
  5701.      
  5702.      Dim SearchDoc As notesdocument
  5703.      If (docProfile Is Nothing) Then GetProfileDocument
  5704.      If (docProfile Is Nothing) Then
  5705.           Msgbox "You need to specify a Search Site URL to open. Choose Actions - Internet Options from the menu."
  5706.           Exit Sub 
  5707.      End If
  5708.        'we need to determine if the current document exists or has the $Index field
  5709.      
  5710.      If (docLocal Is Nothing) Or Not (docLocal.HasItem("$Index")) Then
  5711.           w.URLOpen docProfile.SearchURL(0)   
  5712.           
  5713.      Else
  5714.           'open the url specified
  5715.           
  5716.           i = docLocal.GetItemValue("$Index")
  5717.           pos% = Instr(docLocal.URL(0),"?")
  5718.           If (pos% > 0) Then
  5719.                url$ = Right$(docLocal.URL(0),Len(docLocal.URL(0)) - pos%) & " ?"
  5720.           Else
  5721.                url$ = docLocal.URL(0) & "?"
  5722.           End If
  5723.           index$ = url$ & Inputbox$(i(0),"Search Internet Server")
  5724.           If index$<> "" Then 
  5725.                w.urlopen index$
  5726.           End If
  5727.      End If
  5728. End Sub
  5729. '++LotusScript Development Environment:2:2:CreateNotesLink:1:8
  5730. Sub CreateNotesLink (docLocal As NotesDocument)
  5731.      
  5732.      Dim docMail As NotesDocument
  5733.      Dim rtitem As NotesRichTextItem
  5734.      
  5735.      
  5736.      Set docMail = New NotesDocument(db)
  5737.      Set rtitem = New NotesRichTextItem(docMail,"Body")
  5738.      docMail.Form = "Memo"
  5739.      Call rtitem.AppendText(docLocal.url(0))
  5740.      docMail.Subject = docLocal.Title(0)          
  5741.      docMail.Send False,docLocal.ForwardTo(0)               
  5742. End Sub
  5743. '++LotusScript Development Environment:2:2:CopyDocumentToSharedDatabase:1:8
  5744. Sub CopyDocumentToSharedDatabase (docLocal As NotesDocument, url As String) 
  5745.      Dim webdoc As notesdocument
  5746.      If (docProfile Is Nothing) Then GetProfileDocument
  5747.      If (docProfile Is Nothing) Then
  5748.           Msgbox "You need to specify a Web Server and Web Database to share pages with. Choose Actions - Internet Options from the menu."
  5749.           Exit Sub 
  5750.      End If
  5751.      If  (docProfile.WebDatabase(0) = "") Then
  5752.           Msgbox "You need to specify the shared server and database. Choose Actions - Internet Options from the menu."
  5753.           Exit Sub
  5754.      End If
  5755.      Set dbShared = New NotesDatabase(docProfile.WebServer(0),docProfile.WebDatabase(0))  
  5756.      If Not (dbShared.IsOpen) Then
  5757.           Msgbox "Can't open the shared database"
  5758.           Exit Sub
  5759.      End If
  5760.      If docLocal.form(0) = "WebBrowserForm" Or docLocal.form(0) = "WebBrowser4Form" Then 
  5761.           
  5762.           Set webdoc = dbshared.getdocumentbyurl(url)
  5763.           dbShared.Close
  5764.      Else
  5765.           Set webdoc = dbshared.getdocumentbyurl(url)
  5766.           dbShared.Close
  5767.      End If
  5768. End Sub
  5769. '++LotusScript Development Environment:2:2:CreateRatingDocument:1:8
  5770. Sub CreateRatingDocument (docLocal As NotesDocument, url As String, title As String)
  5771.      Dim docRating As NotesDocument
  5772.      If (docProfile Is Nothing) Then GetProfileDocument
  5773.      If (docProfile Is Nothing) Then
  5774.           Msgbox "You need to specify a Web Server and Web Database to share pages with. Choose Actions - Internet Options from the menu."
  5775.           Exit Sub 
  5776.      End If
  5777.      If  (docProfile.WebDatabase(0) = "") Then
  5778.           Msgbox "You need to specify the shared server and database. Choose Actions - Internet Options from the menu."
  5779.           Exit Sub
  5780.      End If
  5781.      Set dbShared = New NotesDatabase(docProfile.WebServer(0),docProfile.WebDatabase(0))  
  5782.      If Not (dbShared.IsOpen) Then
  5783.           Msgbox "Can't open the shared database"
  5784.           Exit Sub
  5785.      End If
  5786.      'create the remote document and add some fields to it
  5787.      Set docRating = New NotesDocument(dbShared)
  5788.      docRating.Form = "Person Rating Form"
  5789.      docRating.Rating = docLocal.Rating
  5790.      docRating.Content = docLocal.Content
  5791.      docRating.Comments = docLocal.Comments
  5792.      docRating.Author = session.UserName
  5793.      docRating.URL = URL
  5794.      docRating.Title = Title
  5795.      docRating.Save True, True
  5796.      dbShared.Close     
  5797. End Sub
  5798. '++LotusScript Development Environment:2:2:ReduceToLink:1:8
  5799. Sub ReduceToLink (docLocal As NotesDocument)
  5800.      
  5801.      If docLocal.hasitem("Body") Then
  5802.           docLocal.RemoveItem "Body"
  5803.           docLocal.RemoveItem "HTMLSource"
  5804.           docLocal.RemoveItem "HTMLBody"
  5805.           docLocal.RemoveItem "$Background"
  5806.           docLocal.RemoveItem "$FILE"
  5807.           docLocal.RemoveItem "$OLEOBJINFO"
  5808.           docLocal.RemoveItem "URLLinks1"
  5809.           docLocal.RemoveItem "WebAheadStatus"
  5810.           docLocal.RemoveItem "WebAgentError"
  5811.           docLocal.RemoveItem "PageMinderStatus"
  5812.           docLocal.bookmark = "1"
  5813.           docLocal.Save True,True
  5814.      Else
  5815.           docLocal.RemoveItem "$Body"
  5816.           docLocal.RemoveItem "HTMLSource"
  5817.           docLocal.RemoveItem "$Background"
  5818.           docLocal.RemoveItem "$FILE"
  5819.           docLocal.RemoveItem "$OLEOBJINFO"
  5820.           docLocal.RemoveItem "URLLinks1"
  5821.           docLocal.RemoveItem "WebAheadStatus"
  5822.           docLocal.RemoveItem "WebAgentError"
  5823.           docLocal.RemoveItem "PageMinderStatus"
  5824.           docLocal.Bookmark = "1"
  5825.           docLocal.Save True,True
  5826.      End If
  5827. End Sub
  5828. '++LotusScript Development Environment:2:2:GetProfileDocument:1:8
  5829. Sub GetProfileDocument
  5830.      Dim view As NotesView
  5831.      Set view = db.GetView("Internet Profiles")
  5832.      Set docProfile = view.GetFirstDocument
  5833. End Sub
  5834. '++LotusScript Development Environment:2:1:LocationOK:1:8
  5835. Function LocationOK As Integer
  5836.      
  5837.      '*
  5838.      '*  This function verifies that the current location settings are correct for local web retrievals.
  5839.      '*
  5840.      
  5841.      LocationOK = True
  5842.      Dim currentbrowser As String
  5843.      Dim MailServer As String
  5844.      currentbrowser = GetLocationItem("WebRetriever")
  5845.      If CurrentBrowser <> "3" Or CurrentBrowser <> "1" Then
  5846.           Msgbox "Your Browser setting for Notes is not set to retrieve in Notes.  Edit your current location to change the browser setting to Notes.", 16, "Error"
  5847.           LocationOK = False
  5848.           Exit Function
  5849.      End If
  5850.      MailServer = GetLocationItem("MailServer")
  5851.      If MailServer = "" Then
  5852.           Msgbox "You do not have a mail file/server specified.  Use File Mobile Edit Current Location... to set them.", 16, "Error"
  5853.           LocationOK = False
  5854.           Exit Function
  5855.      End If
  5856.      
  5857. End Function
  5858. '++LotusScript Development Environment:2:2:ImportFavorites:1:8
  5859. Sub  ImportFavorites
  5860.      InstantiateObjects
  5861.      Set note = New NotesDocument(db)
  5862.      szFolder = "Favorites"
  5863.      numDirectories = 0
  5864.      Redim Directories(20)
  5865.      fileflag = False
  5866.      
  5867.      If(w.DialogBox("(ImportFavorite)",True,True,False,,,,"Import Favorites",note)) Then
  5868.           'get the file to open     
  5869.           szPath = note.BookMarkFile(0)
  5870.           If (szPath = "") Then 
  5871.                Exit Sub
  5872.           Elseif (Right$(szPath,3) = "url" ) Then
  5873.                'file is specified not path parse out filename and go directly to process file
  5874.                filenamepath = szPath
  5875.                fileflag = True
  5876.                Goto ProcessFile
  5877.           Elseif (Right$(szPath,1) <> "\") Then 
  5878.                szPath  = szPath & "\"
  5879.           End If        
  5880.           filename = Dir$(szPath ,ATTR_DIRECTORY)
  5881.           
  5882.           While (filename <>"")
  5883.                If (filename <> ".") And (filename <> "..") Then
  5884.                     filenamepath = szPath & filename
  5885.                     retType = Getfileattr(filenamepath)
  5886.                     If Not(retType = ATTR_DIRECTORY) Then
  5887. ProcessFile:
  5888.                          hFile = Freefile
  5889.                          
  5890. 'open the file     
  5891.                          Open filenamepath For Input As hFile
  5892.                          
  5893. 'read in a line from the file
  5894.                          Do Until Eof(hFile)
  5895.                               Line Input #hFile,szEntry
  5896.                               Call FavoriteProcessOneLine
  5897.                          Loop
  5898.                     Else
  5899. 'this is a directory
  5900.                          Directories(counter) = filename
  5901.                          counter = counter + 1
  5902.                     End If
  5903.                End If
  5904.                If fileflag Then Exit Sub
  5905.                filename = Dir()
  5906.           Wend
  5907.      End If
  5908. 'scan subdirectories if need be
  5909.      If (counter > 0) Then
  5910.           For x = 0 To (counter-1)
  5911.                szFolder = "Bookmarks\" & Directories(x)
  5912.                szSubPath = szPath & Directories(x) & "\"
  5913.                filename = Dir$(szSubPath,ATTR_DIRECTORY)
  5914.                While (filename <>"")
  5915.                     If (filename <> ".") And (filename <> "..") Then
  5916.                          retType = Getfileattr(szSubPath & filename)
  5917.                          If Not(retType = ATTR_DIRECTORY) Then
  5918.                               hFile = Freefile                              
  5919. 'open the file     
  5920.                               Open szSubPath  & filename For Input As hFile
  5921.                               
  5922. 'read in a line from the file
  5923.                               Do Until Eof(hFile)
  5924.                                    Line Input #hFile,szEntry
  5925.                                    Call FavoriteProcessOneLine
  5926.                               Loop
  5927.                          End If
  5928.                     End If
  5929.                     filename = Dir()
  5930.                Wend               
  5931.           Next
  5932.           
  5933.      End If
  5934. End Sub
  5935. '++LotusScript Development Environment:2:2:FavoriteExtractAddress:1:8
  5936. Sub FavoriteExtractAddress(posBegin As Integer)
  5937.      
  5938. 'get the position of the closing quote
  5939.      szURL = Right$(szEntry,Len(szEntry) - posBegin+1)
  5940. End Sub
  5941. '++LotusScript Development Environment:2:2:CreateFavoriteDocument:1:8
  5942. Sub CreateFavoriteDocument   
  5943.      
  5944.      'Before we create the bookmark document we need to make sure that one does not already exist
  5945.      If Not DuplicateBookmark(szURL) Then
  5946.           Dim nulldoc As notesdocument
  5947.           Dim title As String
  5948.           Set bookmark = New NotesDocument(db)
  5949.           If fileflag Then
  5950.                title = Parsefilename(szPath)
  5951.                bookmark.title = Left$(title, Len(title)-4)
  5952.           Else
  5953.                bookmark.title = Left$(filename, Len(filename)-4)
  5954.           End If
  5955.           
  5956.           bookmark.URL =  szURL
  5957.           bookmark.bookmark = "1"
  5958.           bookmark.form = "HTMLForm"
  5959.           Call bookmark.Save(True,False)
  5960.           Call bookmark.PutInFolder(szFolder)
  5961.           If docprofile.keeppage(0) = "0" Then
  5962.                If GetLocationItem("WebLocation")(0) = "1" Then
  5963.                     
  5964.                     Set nulldoc = db.getdocumentbyurl(szURL, 0,0,"","","","","",True)
  5965.                End If
  5966.           End If
  5967.      End If
  5968.      
  5969. End Sub
  5970. '++LotusScript Development Environment:2:2:FavoriteProcessOneLine:1:8
  5971. Sub FavoriteProcessOneLine
  5972. 'we have just read one line from the bookmark file
  5973. 'see if this line has one of two entries in it
  5974.      Dim pos As Integer
  5975.      
  5976. 'look for an http reference
  5977.      pos = Instr(1,szEntry,"=",5)
  5978.      If (pos > 0) Then
  5979.           FavoriteExtractAddress(pos+1)
  5980.           If (szURL <> "") Then Call CreateFavoriteDocument
  5981.           Exit Sub
  5982.      End If
  5983. End Sub
  5984. '++LotusScript Development Environment:2:2:ImportBookmarks:1:8
  5985. Sub ImportBookmarks
  5986.      InstantiateObjects
  5987.      Set note = New NotesDocument(db)
  5988.      szFolder = "Favorites and Bookmarks"
  5989.      
  5990.      If(w.DialogBox("(ImportBookmark)",True,True,False,,,,"Import Bookmark",note)) Then
  5991.           'get the file to open     
  5992.           szPath = note.BookMarkFile(0)
  5993.           If (szPath = "") Then Exit Sub
  5994.           hFile = Freefile
  5995.           
  5996. 'open the file     
  5997.           Open szPath For Input As hFile
  5998.           
  5999. 'read in a line from the file
  6000.           Do Until Eof(hFile)
  6001.                Line Input #hFile,szEntry
  6002.                Call NavigatorProcessOneLine
  6003.           Loop
  6004.      End If
  6005.      
  6006. 'we need to close the file
  6007.      Close hFile
  6008. End Sub
  6009. '++LotusScript Development Environment:2:2:NavigatorExtractAddress:1:8
  6010. Sub NavigatorExtractAddress(posBegin As Integer)
  6011.      Dim posEnd As Integer
  6012.      Dim posTITLEBegin As Integer
  6013.      Dim posTITLEEnd As Integer
  6014.      
  6015. 'get the position of the closing quote
  6016.      posEnd = Instr(posBegin,szEntry,|"|,5)
  6017.      If posEnd = 0 Then 
  6018.           szURL = ""
  6019.           Exit Sub
  6020.      End If
  6021.      szURL = Mid$(szEntry,posBegin,(posEnd-posBegin))
  6022. 'now, we need to get the title
  6023.      posTITLEBegin = Instr(posEnd,szEntry,">",5)
  6024.      If (posTITLEBegin = 0) Then
  6025.           szTitle = ""
  6026.      Else
  6027.           posTITLEEnd = Instr(posTITLEBegin,szEntry,"</a",5)
  6028.           szTitle = Mid$(szEntry,posTITLEBegin+1,(posTITLEEnd-posTITLEBegin)-1)               
  6029.      End If
  6030. End Sub
  6031. '++LotusScript Development Environment:2:2:ShrinkFolderName:1:8
  6032. Sub ShrinkFolderName
  6033.      Dim posCurrent As Integer
  6034.      Dim posHold As Integer
  6035.      
  6036. 'posCurrent is the new position of the "\" character
  6037. 'posHold keeps the most recent position of the "\" character
  6038.      
  6039.      posCurrent = Instr(1,szFolder,"\",5)
  6040.      While(posCurrent > 0)
  6041.           posHold = posCurrent
  6042.           posCurrent = Instr(posHold+1,szFolder,"\",5)
  6043.      Wend
  6044.      If (posHold > 0) Then szFolder = Left$(szFolder,posHold-1)
  6045. End Sub
  6046. '++LotusScript Development Environment:2:2:NavigatorProcessOneLine:1:8
  6047. Sub NavigatorProcessOneLine
  6048. 'we have just read one line from the bookmark file
  6049. 'see if this line has one of two entries in it
  6050.      Dim pos As Integer
  6051.      
  6052. 'first, look for the beginning of a folder
  6053.      pos = Instr(1,szEntry,"h3",5)
  6054.      If (pos > 0) Then 
  6055.           GetFolderName(pos)
  6056.           Exit Sub
  6057.      End If
  6058. 'we didn't find a folder, so look for an http reference
  6059.      pos = Instr(1,szEntry,"http",5)
  6060.      If (pos > 0) Then
  6061.           NavigatorExtractAddress(pos)
  6062.           If (szURL <> "") Then Call CreateNavigatorDocument
  6063.           Exit Sub
  6064.      End If
  6065. 'check for an ftp reference
  6066.      pos = Instr(1,szEntry,"ftp",5)
  6067.      If (pos > 0) Then
  6068.           NavigatorExtractAddress(pos)
  6069.           If(szURL <> "") Then Call CreateNavigatorDocument
  6070.           Exit Sub
  6071.      End If
  6072. 'this isn't a folder, nor is it an http ref; look for the closing of a folder
  6073.      pos = Instr(1,szEntry,"</DL>",5)
  6074.      If (pos > 0) Then Call ShrinkFolderName
  6075. End Sub
  6076. '++LotusScript Development Environment:2:2:GetFolderName:1:8
  6077. Sub GetFolderName(posStart As Integer)
  6078. 'gets the name of the folder
  6079.      Dim posFolderBegin
  6080.      Dim posFolderEnd
  6081.      
  6082.      posFolderBegin = Instr(posStart,szEntry,|">|,5)
  6083.      If (posFolderBegin > 0) Then
  6084.           posFolderEnd = Instr(posFolderBegin,szEntry,"<",5)
  6085.           szFolder = szFolder & "\" & Mid$(szEntry,posFolderBegin+2,posFolderEnd - posFolderBegin-2)
  6086.      End If
  6087. End Sub
  6088. '++LotusScript Development Environment:2:2:CreateNavigatorDocument:1:8
  6089. Sub CreateNavigatorDocument
  6090.      'Before we create the bookmark document, make sure that it doesn't already exist
  6091.      If Not DuplicateBookmark(szURL) Then
  6092.           Dim nulldoc As notesdocument
  6093.           Set bookmark = New NotesDocument(db)
  6094.           bookmark.URL =  szURL
  6095.           bookmark.Title = szTitle
  6096.           bookmark.Subject = szTitle    
  6097.           bookmark.bookmark = "1"
  6098.           bookmark.form = "HTMLForm"
  6099.           Call bookmark.Save(True,False)
  6100.           Call bookmark.PutInFolder(szFolder)
  6101.             'If keep page option is manual or retrievals are set to no retrievals, don't do the nonblocking retrieval
  6102.           If docprofile.keeppage(0) = "0" Then
  6103.                If GetLocationItem("WebLocation")(0) = "1" Then
  6104.                     
  6105.                     Set nulldoc = db.getdocumentbyurl(szURL, 0,0,"","","","","",True)
  6106.                End If
  6107.           End If
  6108.      End If
  6109. End Sub
  6110. '++LotusScript Development Environment:2:2:PrintWebDocument:1:8
  6111. Sub PrintWebDocument
  6112.      
  6113.      On Error Goto ErrorRoutine
  6114.      
  6115.      Dim docLocal As NotesDocument
  6116.      Dim uidoc As notesuidocument
  6117.      Dim docCollection As NotesDocumentCollection     
  6118.      Set docCollection = db.UnprocessedDocuments
  6119.      If (docCollection.Count = 0) Then
  6120.           Msgbox "You must select a document.",16,"Error"
  6121.           Exit Sub
  6122.      Else
  6123.           For j = 1 To docCollection.Count
  6124.                Set docLocal = docCollection.getnthdocument(j)
  6125.                Set uidoc = w.editdocument(False, docLocal)
  6126.                Call uidoc.print
  6127.                Call uidoc.close
  6128.           Next
  6129.      End If
  6130.      Exit Sub
  6131. ErrorRoutine:
  6132.      Messagebox Error & " (PrintWebDocument)"
  6133.      Exit Sub
  6134. End Sub
  6135. '++LotusScript Development Environment:2:2:WebNavHelp:1:8
  6136. Sub WebNavHelp
  6137.      On Error Goto ErrorRoutine
  6138.      
  6139.      Dim PrivateAddressBook As notesdatabase
  6140.      Dim CurrentLocation As notesdocument
  6141.      Dim LocationString As String    
  6142.      Dim helpdb As New notesdatabase("", "")
  6143.      Dim workspace As New NotesUIWorkspace
  6144.      Dim Session As New notessession
  6145.      
  6146.      Set PrivateAddressBook = New Notesdatabase("", "names.nsf")
  6147.      LocationString = Session.GetEnvironmentString ( "Location", True)
  6148.      
  6149.      If (PrivateAddressBook Is Nothing) Then
  6150.           If Helpdb.open("", "help4.nsf") Then 
  6151.                Call workspace.OpenDatabase ( "", "help4.nsf", "Web")
  6152.           Elseif Helpdb.open("", "helplt4.nsf") Then
  6153.                Call workspace.OpenDatabase ( "", "helplt4.nsf", "Web")
  6154.           Else
  6155.                Msgbox "Unable to locate the Notes Help Database", 16, "Error" 
  6156.           End If
  6157.           Exit Sub
  6158.      End If
  6159.      
  6160.      
  6161.      If LocationString <> "" Then
  6162.           Temp$ = Mid( LocationString, (Instr(1, LocationString, ",")+1))
  6163.           LocationID$ = Left(Temp$, (Instr(1,Temp$, ",")-1))
  6164.           Set CurrentLocation = PrivateAddressBook.getdocumentbyid(LocationID$)
  6165.           
  6166.           If Not (CurrentLocation Is Nothing) Then
  6167.                If CurrentLocation.MailServer(0) <> "" Then
  6168.                     If Helpdb.open("", "help4.nsf") Then 
  6169.                          Call workspace.OpenDatabase ( "", "help4.nsf", "Web")
  6170.                     Elseif Helpdb.open("", "helplt4.nsf") Then
  6171.                          Call workspace.OpenDatabase ( "", "helplt4.nsf", "Web")
  6172.                     Elseif Helpdb.open(CurrentLocation.MailServer(0), "help4.nsf") Then
  6173.                          Call workspace.OpenDatabase ( CurrentLocation.MailServer(0), "help4.nsf", "Web")
  6174.                     Elseif Helpdb.open(CurrentLocation.MailServer(0), "helplt4.nsf") Then
  6175.                          Call workspace.OpenDatabase ( CurrentLocation.MailServer(0), "helplt4.nsf", "Web")
  6176.                     Else
  6177.                          Msgbox "Unable to locate the Notes Help Database", 16, "Error" 
  6178.                     End If
  6179.                Else
  6180.                     If Helpdb.open("", "help4.nsf") Then 
  6181.                          Call workspace.OpenDatabase ( "", "help4.nsf", "Web")
  6182.                     Elseif Helpdb.open("", "helplt4.nsf") Then
  6183.                          Call workspace.OpenDatabase ( "", "helplt4.nsf", "Web")
  6184.                     Else
  6185.                          'Mail server is blank
  6186.                          Msgbox "Unable to locate the Notes Help Database", 16, "Error" 
  6187.                     End If
  6188.                End If
  6189.           Else
  6190.                If Helpdb.open("", "help4.nsf") Then 
  6191.                     Call workspace.OpenDatabase ( "", "help4.nsf", "Web")
  6192.                Elseif Helpdb.open("", "helplt4.nsf") Then
  6193.                     Call workspace.OpenDatabase ( "", "helplt4.nsf", "Web")
  6194.                Else
  6195.                     'Location document is not found
  6196.                     Msgbox "Unable to locate the Notes Help Database", 16, "Error" 
  6197.                End If
  6198.           End If
  6199.      Else
  6200.           If Helpdb.open("", "help4.nsf") Then 
  6201.                Call workspace.OpenDatabase ( "", "help4.nsf", "Web")
  6202.           Elseif Helpdb.open("", "helplt4.nsf") Then
  6203.                Call workspace.OpenDatabase ( "", "helplt4.nsf", "Web")
  6204.           Else
  6205.                'Location string in notes.ini is blank
  6206.                Msgbox "Unable to locate the Notes Help Database", 16, "Error" 
  6207.           End If
  6208.      End If
  6209.      Exit Sub
  6210. ErrorRoutine:
  6211.      Messagebox Error & " (WebNavHelp)"
  6212.      Exit Sub
  6213. End Sub
  6214. '++LotusScript Development Environment:2:2:IENextdoc:1:8
  6215. Sub IENextdoc(browserobject As Variant)    
  6216.      On Error Goto ErrorRoutine
  6217.      browserobject.GoForward
  6218.      Exit Sub
  6219. ErrorRoutine:
  6220.      Messagebox "No next entry in history list.", 16, "Internet Explorer"
  6221.      Exit Sub
  6222. End Sub
  6223. '++LotusScript Development Environment:2:2:IEPreviousDoc:1:8
  6224. Sub IEPreviousDoc(browserobject As Variant)     
  6225.      On Error Goto ErrorRoutine
  6226.      browserobject.GoBack     
  6227.      Exit Sub
  6228. ErrorRoutine:
  6229.      Messagebox "No previous entry in history list.", 16, "Internet Explorer"
  6230.      Exit Sub
  6231. End Sub
  6232. '++LotusScript Development Environment:2:2:IEStop:1:8
  6233. Sub IEStop(browserobject As Variant)  
  6234.      On Error Goto ErrorRoutine
  6235.      browserobject.Stop    
  6236.      Exit Sub
  6237. ErrorRoutine:
  6238.      Messagebox Error & " (IEStop)"
  6239.      Exit Sub
  6240. End Sub
  6241. '++LotusScript Development Environment:2:1:GetCurrentLocation:1:8
  6242. Function GetCurrentLocation As String
  6243.      On Error Goto ErrorRoutine
  6244.      Dim PrivateAddressBook As notesdatabase
  6245.      Dim CurrentLocation As notesdocument
  6246.      Dim LocationString As String     
  6247.      
  6248.      Dim result As Variant
  6249.      
  6250.      Set privateaddressbook = GetLocalNAB 
  6251.      
  6252.      If  privateaddressbook.isopen Then
  6253.           LocationString = Session.GetEnvironmentString ( "Location", True)
  6254.           If LocationString <> "" Then
  6255.                Temp$ = Mid( LocationString, (Instr(1, LocationString, ",")+1))
  6256.                LocationID$ = Left(Temp$, (Instr(1,Temp$, ",")-1))
  6257.                Set CurrentLocation = privateaddressbook.getdocumentbyid(LocationID$)
  6258.                GetCurrentLocation = CurrentLocation.WebRetriever(0)
  6259.                
  6260.           Else
  6261.                Print "Couldn't find Current Location document."
  6262.                Exit Function
  6263.           End If
  6264.      End If
  6265.      Exit Function
  6266. ErrorRoutine:
  6267.      Messagebox Error & " (GetCurrentLocation)"
  6268.      Exit Function
  6269. End Function
  6270. '++LotusScript Development Environment:2:2:IEForwardNote:1:8
  6271. Sub IEForwardNote (doc As notesdocument, browserobject As Variant)
  6272.      
  6273.      On Error Goto ErrorRoutine
  6274.      On Error 4412 Goto nomailfile
  6275.      
  6276.      If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options")) Then   
  6277.           Select Case doc.ForwardOptions(0)
  6278.           Case "1" : 'user wants to forward the URL only
  6279.                Call CreateIELink(browserobject.locationurl, browserobject.locationname)
  6280.           Case "2" : 'user wants to send entire page
  6281.                Dim url As Variant
  6282.                Dim webdoc As notesdocument
  6283.                Dim uid As notesuidocument
  6284.                Dim uid2 As notesuidocument
  6285.                Dim uid3 As notesuidocument
  6286.                Print "Creating mail memo..."
  6287.                url = browserobject.locationurl               
  6288.                Set webdoc = db.getdocumentbyurl(url)
  6289.                webdoc.forward="1"
  6290.                webdoc.save True, False
  6291.                w.viewrefresh
  6292.                w.viewrefresh
  6293.                Set uid = w.editdocument(False, webdoc)   
  6294.                Set uid2=w.currentdocument
  6295.                uid2.forward
  6296.                Set uid3 = w.currentdocument
  6297.                uid.close     
  6298.                webdoc.removeitem "Forward"
  6299.                webdoc.save True, False
  6300.           End Select
  6301.           'remove any remaining fields that don't need to be carried around
  6302.           doc.RemoveItem "ForwardOptions" 
  6303.           doc.save True, False
  6304.      End If
  6305.      Exit Sub
  6306.      
  6307. ErrorRoutine:
  6308.      Messagebox  Err & Error & " (IEForwardNote)"
  6309.      Exit Sub
  6310.      
  6311. NoMailFile:
  6312.      uid.close
  6313.      Exit Sub
  6314.      
  6315. End Sub
  6316. '++LotusScript Development Environment:2:2:IERefreshPage:1:8
  6317. Sub IERefreshPage(browserobject As Variant)     
  6318.      On Error Goto ErrorRoutine
  6319.      browserobject.Refresh
  6320.      Exit Sub
  6321. ErrorRoutine:
  6322.      Messagebox Error & " (IERefreshPage)"
  6323.      Exit Sub
  6324. End Sub
  6325. '++LotusScript Development Environment:2:2:IEOpenHome:1:8
  6326. Sub IEOpenHome(browserobject As Variant)
  6327.      On Error Goto ErrorRoutine
  6328.      browserobject.GoHome
  6329.      Exit Sub
  6330. ErrorRoutine:
  6331.      Messagebox Error & " (IEOpenHome)"
  6332.      Exit Sub
  6333.      
  6334. End Sub
  6335. '++LotusScript Development Environment:2:2:IESearch:1:8
  6336. Sub IESearch(browserobject As Variant)
  6337.      On Error Goto ErrorRoutine   
  6338.      browserobject.GoSearch
  6339.      Exit Sub
  6340. ErrorRoutine:
  6341.      Messagebox Error & " (IESearch)"
  6342.      Exit Sub
  6343.      
  6344. End Sub
  6345. '++LotusScript Development Environment:2:2:CreateIELink:1:8
  6346. Sub CreateIELink(url As String, title As String)
  6347.      
  6348.      On Error Goto ErrorRoutine
  6349.      
  6350.      Dim uimaildoc As notesuidocument
  6351.      Dim docMail As NotesDocument
  6352.      Dim maildb As New notesdatabase("", "")
  6353.      Call maildb.openmail
  6354.      If maildb.isopen Then
  6355.           Call w.composedocument(maildb.server, maildb.filepath, "memo")
  6356.           Set uimaildoc = w.currentdocument
  6357.           Set docmail = uimaildoc.document
  6358.           Call uimaildoc.fieldsettext("Body", URL)
  6359.           Call uimaildoc.fieldsettext("Subject",   Title)
  6360.           Exit Sub
  6361.      Else
  6362.           Messagebox "Unable to open the mail file that is specified in your current location."
  6363.           Exit Sub
  6364.      End If
  6365.      
  6366. ErrorRoutine:
  6367.      Messagebox Err & Error & " (CreateIELink)"
  6368.      Exit Sub
  6369.      
  6370.      
  6371. End Sub
  6372. '++LotusScript Development Environment:2:2:MoveToFolder:1:8
  6373. Sub MoveToFolder(Source As NotesUIView,Target As Variant, Continue As Variant)
  6374.      Dim note As notesdocument
  6375.      Dim doc As notesdocument
  6376.      Dim db As notesdatabase
  6377.      Dim s As New notessession
  6378.      
  6379.      On Error Goto ErrorRoutine
  6380.      
  6381.      If target = "Web Bots\Page Minder" Or Target = "Web Bots\Web Ahead" Or (Instr(1, target, "Favorites") =1) Then
  6382.           Set db = s.currentdatabase
  6383.           For j = 1 To Source.Documents.Count  
  6384.                Set doc = source.documents.getnthdocument(j)
  6385.                If doc.form(0) = "WebBrowserForm" Or doc.form(0) = "WebBrowser4Form" Then
  6386.                     Set note = db.getdocumentbyurl(doc.url(0))
  6387.                     
  6388.                     Call note.putinfolder(target)
  6389.                     Continue = False
  6390.                     Print "Moved to " + Cstr(target)
  6391.                End If
  6392.           Next
  6393.      End If
  6394.      Exit Sub
  6395.      
  6396. ErrorRoutine:
  6397.      Messagebox Error & " (MoveToFolder)"
  6398.      Exit Sub
  6399. End Sub
  6400. '++LotusScript Development Environment:2:1:GetLocalNAB:1:8
  6401. Function GetLocalNAB() As NotesDatabase
  6402.      Dim sAddressBook As String
  6403.      Dim nCommaLocation As Integer
  6404.      
  6405.      On Error Resume Next
  6406.      sAddressBook = session.GetEnvironmentString("NAMES", True)
  6407.      If sAddressBook = "" Then 
  6408.           sAddressBook = "names.nsf"
  6409.      Else
  6410.           nCommaLocation = Instr(sAddressBook, ",")
  6411.           
  6412.           If nCommaLocation > 0 Then sAddressBook = Left(sAddressBook, nCommaLocation-1)
  6413.      End If
  6414.      
  6415.      Set GetLocalNAB = New NotesDatabase("",sAddressBook)
  6416. End Function
  6417. '++LotusScript Development Environment:2:1:GetRegValue:1:8
  6418. Function GetRegValue (szKey$, szValueName$) As String
  6419.      Dim szValue As String*200
  6420.      
  6421.      hKey = 0
  6422.      RetCode = RegOpenKeyEx (HKEY_CURRENT_USER, szKey, 0, KEY_READ, hKey)
  6423.      If RetCode <> 0 Then
  6424. '          Print "RegOpenKeyEx: " & RetCode
  6425.           Exit Function
  6426.      End If
  6427.      dwType = 0
  6428.      dwSize = 200
  6429.      RetCode = RegQueryValueEx (hKey, szValueName, 0, dwType, szValue, dwSize) 
  6430.      If RetCode <> 0 Then
  6431. '          Print "RegQueryValueEx: " & RetCode
  6432.           Exit Function
  6433.      End If
  6434.      Call RegCloseKey (hKey)
  6435.      
  6436.      GetRegValue = szValue
  6437. Done:
  6438. End Function
  6439. '++LotusScript Development Environment:2:2:SetRegValue:1:8
  6440. Sub SetRegValue(szKey$, szValueName$, szKeyValue)
  6441.      
  6442.      hKey = 0
  6443.      Dim szValue As String*200
  6444.      
  6445.      hKey = 0
  6446.      RetCode = RegOpenKeyEx (HKEY_CURRENT_USER, szKey, 0, KEY_SET_VALUE, hKey)
  6447.      If RetCode <> 0 Then
  6448.           Print "RegOpenKeyEx: " & RetCode
  6449.           Exit Sub
  6450.      End If
  6451.      
  6452.      dwSize = 200
  6453.      lpData = szKeyValue
  6454.      cbData = Len(szKeyValue)
  6455.      RetCode = RegSetValueEx (hKey, szValueName, 0, 1, lpData$, cbData) 
  6456.      If RetCode <> 0 Then
  6457.           Print "RegLSetValueEx: " & RetCode
  6458.           Exit Sub
  6459.      End If
  6460.      
  6461.      
  6462.      Call RegCloseKey (hKey)
  6463.      
  6464. End Sub
  6465. '++LotusScript Development Environment:2:1:GetLocationItem:1:8
  6466. Function GetLocationItem (itemname As String) As Variant
  6467.      
  6468.      '*
  6469.      '*  This function returns a data item from the current location note
  6470.      '*
  6471.      
  6472.      InstantiateObjects
  6473.      GetLocationItem = ""
  6474.      Dim PrivateAddressBook As notesdatabase
  6475.      Dim CurrentLocation As notesdocument
  6476.      Dim LocationString As String     
  6477.      
  6478.      
  6479.      Set PrivateAddressBook = New Notesdatabase("", "names.nsf")
  6480.      
  6481.      If (PrivateAddressBook Is Nothing) Then
  6482.           Print "Warning:  Cannot open private address book."
  6483.           Exit Function
  6484.      End If
  6485.      
  6486.      LocationString = Session.GetEnvironmentString ( "Location", True)
  6487.      
  6488.      If LocationString <> "" Then
  6489.           Temp$ = Mid( LocationString, (Instr(1, LocationString, ",")+1))
  6490.           LocationID$ = Left(Temp$, (Instr(1,Temp$, ",")-1))
  6491.           Set CurrentLocation = PrivateAddressBook.getdocumentbyid(LocationID$)
  6492.           If Not (CurrentLocation Is Nothing) Then
  6493.                GetLocationItem = CurrentLocation.getitemvalue(itemname)
  6494.           Else
  6495.                Print  "Warning:  Unable to verify current location settings.  Can't find location document."
  6496.                Exit Function
  6497.           End If
  6498.      Else
  6499.           Print "Warning:  Unable to verify current location settings.  Location string is empty." 
  6500.           Exit Function
  6501.      End If     
  6502. End Function
  6503. '++LotusScript Development Environment:2:2:SetLocationItem:1:8
  6504. Sub SetLocationItem(itemname As String, itemvalue As String)
  6505.      '*
  6506.      '*  This routine sets a data item in the current location note
  6507.      '*
  6508.      InstantiateObjects
  6509.      Dim PrivateAddressBook As notesdatabase
  6510.      Dim CurrentLocation As notesdocument
  6511.      Dim LocationString As String     
  6512.      
  6513.      
  6514.      Set PrivateAddressBook = New Notesdatabase("", "names.nsf")
  6515.      
  6516.      If (PrivateAddressBook Is Nothing) Then
  6517.           Print "Warning:  Cannot open private address book."
  6518.           Exit Sub
  6519.      End If
  6520.      
  6521.      LocationString = Session.GetEnvironmentString ( "Location", True)
  6522.      
  6523.      If LocationString <> "" Then
  6524.           Temp$ = Mid( LocationString, (Instr(1, LocationString, ",")+1))
  6525.           LocationID$ = Left(Temp$, (Instr(1,Temp$, ",")-1))
  6526.           Set CurrentLocation = PrivateAddressBook.getdocumentbyid(LocationID$)
  6527.           If Not (CurrentLocation Is Nothing) Then
  6528.                Call CurrentLocation.Replaceitemvalue(itemname, itemvalue)
  6529.                Call CurrentLocation.Save(True, False)
  6530.           Else
  6531.                Print  "Warning:  Unable to verify current location settings.  Can't find location document."
  6532.                Exit Sub
  6533.           End If
  6534.      Else
  6535.           Print "Warning:  Unable to verify current location settings.  Location string is empty." 
  6536.           Exit Sub
  6537.      End If     
  6538. End Sub
  6539. '++LotusScript Development Environment:2:2:CreateIEBookmark:1:8
  6540. Sub CreateIEBookmark(browserobject As Variant, folder As String)
  6541.      Set bookmark = New NotesDocument(db)
  6542.      bookmark.URL =  browserobject.LocationURL
  6543.      bookmark.Form = "bookmark"
  6544.      bookmark.Title = browserobject.Locationname
  6545.      bookmark.Subject = browserobject.Locationname
  6546.      bookmark.Imported = True     
  6547.      bookmark.bookmark = "1"
  6548.      Call bookmark.Save(True,False)
  6549.      Call bookmark.PutInFolder(folder)
  6550.      
  6551. End Sub
  6552. '++LotusScript Development Environment:2:2:RemoveObjects:1:8
  6553. Sub RemoveObjects(doc As notesdocument)
  6554.      Dim imagepage As notesdocument
  6555.      Dim imageview As notesview
  6556.      Set imageview = db.getview("(Images)")
  6557.      If Not (imageview Is Nothing) Then
  6558.           If doc.hasitem("$ImageList") Then
  6559.                Dim images As Variant
  6560.                images  = doc.getitemvalue("$ImageList")
  6561.                Forall j In images
  6562.                     If j <> "" Then
  6563.                          Set imagepage = imageview.getdocumentbykey(j)
  6564.                          imagepage.remove True
  6565.                     End If
  6566.                End Forall
  6567.           End If
  6568.      End If
  6569.      
  6570. End Sub
  6571. '++LotusScript Development Environment:2:2:GetCurrentFolders:1:8
  6572. Sub GetCurrentFolders
  6573.      Dim allviews As Variant
  6574.      Dim allfolders() As String
  6575.      Dim x As Integer
  6576.      allviews=db.views
  6577.      Forall j In allviews
  6578.           If j.isfolder Then
  6579.                If Not (Instr(1,j.name, "Web Bots") = 1)  Then
  6580.                     Redim Preserve allfolders(x)
  6581.                     If (Instr(1, j.name, "\") <>0) Then
  6582.                          allfolders(x) = "   " & Right(j.name, Len(j.name)-(Instr(1,j.name, "\")+1)) 
  6583.                          x = x+1
  6584.                     Else
  6585.                          allfolders(x) = j.name
  6586.                          x = x+1
  6587.                     End If
  6588.                End If
  6589.           End If
  6590.      End Forall
  6591.      docprofile.folders = allfolders
  6592.      docprofile.save True, False
  6593. End Sub
  6594. '++LotusScript Development Environment:2:2:ViewDelete:1:8
  6595. Sub ViewDelete
  6596.      On Error Resume Next
  6597.      Dim doc As notesdocument
  6598.      Dim noteid As String
  6599.      noteid = ""
  6600.      Dim docCollection As NotesDocumentCollection     
  6601.      Set docCollection = db.UnprocessedDocuments
  6602.      If (docCollection.Count = 0) Then
  6603.           Msgbox "You must select a document.",16,"Error"
  6604.           Exit Sub
  6605.      End If
  6606.      Response = Msgbox ("This will permanently delete the selected page(s) from the database.  Do you want to continue?", 20, "Delete Document")
  6607.      If Response = 6 Then
  6608.           For j = 1 To docCollection.count 
  6609.                Set doc = docCollection.getnthdocument(j)
  6610.                If Instr(doc.HTTPContent_Type(0), "image") = 0 Then
  6611.                     Call RemoveObjects(doc)
  6612.                End If
  6613.                
  6614.                If doc.isuidocopen Then
  6615.                     noteid = doc.noteid
  6616.                     Delete doc
  6617.                     Set doc = db.getdocumentbyid (noteid)      
  6618.                     doc.remove True
  6619.                     w.viewrefresh 
  6620.                     w.viewrefresh
  6621.                Else
  6622.                     doc.Remove True
  6623.                     w.viewrefresh
  6624.                End If
  6625.           Next
  6626.      End If
  6627.      
  6628. End Sub
  6629. '++LotusScript Development Environment:2:2:Browse:1:8
  6630. Sub Browse
  6631.      Dim currbrowser As String
  6632.      Dim browserobjectcollection As notesdocumentcollection
  6633.      Dim browserdoc As notesdocument
  6634.      Dim iedoc As New notesdocument(db)
  6635.      Dim dt As New notesdatetime ("1/1/90")
  6636.      InstantiateObjects
  6637.      currbrowser = GetCurrentLocation
  6638.      If currbrowser = "0" Then
  6639.           OpenHomeURL
  6640.      Elseif currbrowser = "3" Then
  6641.           If docprofile.openurl(0) = "" Then
  6642.                Msgbox "You need to specify a home page URL to open. Choose Actions - Internet Options from the menu."
  6643.                Exit Sub 
  6644.           End If
  6645.           
  6646.           Set BrowserObjectCollection = db.search(("(Form = ""WebBrowserForm""|Form=""WebBrowser4Form"")& home = ""1"""), dt, 0)
  6647.           
  6648.           If BrowserObjectCollection.count <> 0 Then
  6649.                Set BrowserDoc = BrowserObjectCollection.getfirstdocument
  6650.                Call BrowserDoc.replaceitemvalue("url", docprofile.openurl(0))
  6651.                Call BrowserDoc.save(True, False)
  6652.                Call w.editdocument(False, browserdoc)                         
  6653.           Else
  6654.                If session.GetEnvironmentString("IEVersionMinor", False)="70" Then
  6655.                     Call iedoc.replaceitemvalue("Form", "WebBrowserForm")
  6656.                End If
  6657.                If Cint(session.GetEnvironmentString("IEVersionMinor", False))>70 Then
  6658.                     Call iedoc.replaceitemvalue("Form", "WebBrowser4Form")
  6659.                End If
  6660.                Call iedoc.replaceitemvalue("home", "1")
  6661.                Call iedoc.replaceitemvalue("SaveOptions", "1")
  6662.                Call ieDoc.replaceitemvalue("url", docprofile.openurl(0))
  6663.                Call ieDoc.save(True,False)
  6664.                Call w.viewrefresh
  6665.                Call w.editdocument(False, iedoc)
  6666.           End If
  6667.      End If
  6668. End Sub
  6669. '++LotusScript Development Environment:2:2:ViewForward:1:8
  6670. Sub ViewForward(docLocal As notesdocument)
  6671.      On Error Goto ErrorRoutine
  6672.      
  6673.      Dim url As Variant
  6674.      Dim webdoc As notesdocument
  6675.      Dim uid As notesuidocument
  6676.      Dim uid2 As notesuidocument
  6677.      Dim uid3 As notesuidocument
  6678.      
  6679.      url = docLocal.url
  6680.      Set webdoc = db.getdocumentbyurl(url(0))
  6681.      
  6682.      webdoc.forward="1"
  6683.      webdoc.save True, False
  6684.      Print "Webdoc is saved"
  6685.      w.viewrefresh
  6686.      w.viewrefresh
  6687.      Set uid = w.editdocument(False, webdoc)   
  6688.      Set uid2=w.currentdocument
  6689.      uid2.forward
  6690.      Set uid3 = w.currentdocument
  6691.      uid.close     
  6692.      webdoc.removeitem "Forward"
  6693.      webdoc.save True, False
  6694.      Exit Sub
  6695.      
  6696. ErrorRoutine:
  6697.      Messagebox Error & " (ViewForward)"
  6698.      Exit Sub
  6699. End Sub
  6700. '++LotusScript Development Environment:2:1:DuplicateBookmark:1:8
  6701. Function DuplicateBookmark(szURL) As Integer
  6702.      Dim bookmarkcollection As notesdocumentcollection
  6703.      Dim currentbookmark As notesdocument
  6704.      Dim dt As New NotesDateTime("1/1/90")
  6705.      DuplicateBookmark = False
  6706.      Set bookmarkcollection = db.search("bookmark=""1""",dt, 0)
  6707.      If bookmarkcollection.count <>0 Then
  6708.           For j = 1 To bookmarkcollection.count 
  6709.                Set currentbookmark = bookmarkcollection.getnthdocument(j)
  6710.                If currentbookmark.url(0) = szURL Then 
  6711.                     DuplicateBookmark = True
  6712.                     Exit For
  6713.                End If
  6714.           Next
  6715.      End If
  6716. End Function
  6717. '++LotusScript Development Environment:2:2:CheckRegistrySettings:1:8
  6718. Sub CheckRegistrySettings
  6719.      'sync Internet Options form
  6720.      Dim lpSubKey1 As String
  6721.      Dim IESearchURL As String
  6722.      Dim IEHomePageURL As String
  6723.      Dim NotesSearchURL As Variant
  6724.      Dim NotesHomePage As Variant
  6725.      Dim CompareResult As String
  6726.      
  6727.      If docProfile Is Nothing Then GetProfiledocument
  6728.      
  6729.      'Obtain values from the registry
  6730.      lpSubKey1 ="SOFTWARE\Microsoft\Internet Explorer\Main"
  6731.      IESearchURL =  GetRegValue(lpsubkey1, "Search Page" )
  6732.      IEHomePageURL = GetRegValue(lpsubkey1, "Start Page")
  6733.      
  6734.      'Obtain Notes values
  6735.      NotesSearchURL = docprofile.SearchURL
  6736.      NotesHomePage = docprofile.OpenURL
  6737.      
  6738.      'Compare Search URL values 
  6739.      
  6740.      CompareResult = CompareValues(IESearchURL, NotesSearchURL(0))
  6741.      
  6742.      Select Case CompareResult
  6743.      Case "SetRegistry"
  6744.           'Put the Notes Value in the W32 Registry
  6745.           Call SetRegValue(lpSubKey1, "Search Page", NotesSearchURL(0))
  6746.      Case "SetNotes"
  6747.           'Put the W32 Registry value in Notes
  6748.           docprofile.SearchURL = IESearchURL
  6749.           Call docprofile.save(True, False)
  6750.           
  6751.      End Select
  6752.      
  6753.      'Compare Home Page Values only if load home page on open is selected.
  6754.      
  6755.      CompareResult = CompareValues(IEHomePageURL, NotesHomePage(0))
  6756.      
  6757.      Select Case CompareResult
  6758.      Case "SetRegistry"
  6759.           'Put the Notes Value in the W32 Registry
  6760.           Call SetRegValue(lpSubKey1, "Start Page", NotesHomePage(0))
  6761.      Case "SetNotes"
  6762.           docprofile.OpenUrl = IEHomePageURL
  6763.           Call docprofile.save(True, False)
  6764.      End Select
  6765.      
  6766.      
  6767. End Sub
  6768. '++LotusScript Development Environment:2:1:CompareValues:1:8
  6769. Function CompareValues(IEValue As String, NotesValue As Variant) As String
  6770.      If IEValue = NotesValue Then
  6771.           'The values are the same, don't do anything
  6772.           ComapreValues = "0"
  6773.           Exit Function
  6774.      Elseif IEValue ="" And NotesValue <> "" Then
  6775.           CompareValues = "SetRegistry"
  6776.           Exit Function
  6777.      Elseif IEValue <>"" And NotesValue = "" Then
  6778.           CompareValues = "SetNotes"
  6779.           Exit Function
  6780.      Elseif IEValue <> "" And NotesValue <> "" Then
  6781.           CompareValues = "DoNothing"
  6782.           Exit Function
  6783.      End If
  6784. End Function
  6785. '++LotusScript Development Environment:2:1:ParseFilename:1:8
  6786. Function ParseFilename(szPath As String) As String
  6787.      'This routine pulls the filename out of a path filename combination string.
  6788.      'This is a W32 and OS2 only function
  6789.      
  6790.      Dim strlength As Integer
  6791.      Dim currpos As Integer
  6792.      strlength = Len(szPath)
  6793.      'Extract to first \
  6794.      currpos = Instr(1, szPath, "\")
  6795.      While currpos <> 0  
  6796.           'keep extracting \ until we can't find anymore
  6797.           oldpos = currpos
  6798.           currpos = Instr(currpos+1, szPath, "\")
  6799.      Wend
  6800.      parsefilename = Right$(szPath, (strlength - oldpos))
  6801. End Function
  6802. '++LotusScript Development Environment:2:2:NotesForwardNote:1:8
  6803. Sub NotesForwardNote(doc As notesdocument)
  6804.      On Error Goto ErrorRoutine
  6805.      On Error 4412 Goto nomailfile
  6806.      
  6807.      If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options")) Then   
  6808.           Select Case doc.ForwardOptions(0)
  6809.           Case "1" : 'user wants to forward the URL only
  6810.                Call CreateIELink(doc.url(0), doc.title(0))
  6811.           Case "2" : 'user wants to send entire page
  6812.                Dim uid As notesuidocument
  6813.                Dim uid2 As notesuidocument
  6814.                Dim uid3 As notesuidocument
  6815.                Print "Creating mail memo..."
  6816.                w.viewrefresh
  6817.                w.viewrefresh
  6818.                Set uid = w.editdocument(False, doc)   
  6819.                Set uid2=w.currentdocument
  6820.                uid2.forward
  6821.                Set uid3 = w.currentdocument
  6822.                uid.close     
  6823.                
  6824.           End Select
  6825.           'remove any remaining fields that don't need to be carried around
  6826.           doc.RemoveItem "ForwardOptions" 
  6827.           doc.save True, False
  6828.      End If
  6829.      Exit Sub
  6830.      
  6831. ErrorRoutine:
  6832.      Messagebox Error & " (NotesForwardNote)"
  6833.      Exit Sub
  6834.      
  6835. NoMailFile:
  6836.      uid.close
  6837.      Exit Sub
  6838.      
  6839. End Sub
  6840. '++LotusScript Development Environment:2:1:ParseURL:1:8
  6841. Function ParseURL(url As String) As String
  6842.      'This routine returns the type of URL that is being evaluated
  6843.      'first pull out the protocol
  6844.      
  6845.      ParseURL = Left$(url, Len(url) - Instr(url, "://"))
  6846. End Function
  6847. L5pDpDpDT8T8
  6848. 9P9P9
  6849. ,:,:,:
  6850. l:l:D
  6851. t=T=T=d=d=
  6852. T=t=@
  6853. >4>4>D>D>
  6854. P@P@ @0@
  6855. tAtATATAdAdA
  6856. D D D
  6857. ,F,F\F\FlFlF<F<F
  6858. !<#8    
  6859. <G<GLG\G
  6860. lGlG|G|G
  6861. 8)x*,
  6862. X)X)X
  6863. 8*8*P
  6864. X+X,D
  6865. x+8-\
  6866. x,x/0
  6867. x.X00
  6868. P1`1$
  6869. p1p1P
  6870. ?`>`>
  6871. =<&/:
  6872. 0@0@P
  6873. \G\G$;
  6874. 3-43#
  6875. ^P2K<#-X3#
  6876. 1KP2,|3}
  6877. K<#, 4#
  6878. [<#+|"$
  6879. $+L#$
  6880. $-L4#
  6881. $,p4}
  6882. 4K<$S
  6883. 4K<$S
  6884. 4K<$S|5
  6885. 6Q$7K
  6886. ^x7K,$,
  6887. ^x7K,$,
  6888. 7Q$8K
  6889. $-08#
  6890. 7Q07I 
  6891. 8}(!#
  6892. 8}@!#
  6893. 8}\!#
  6894. 8}l!#
  6895. 8}@!#
  6896. 8}\!#
  6897. 8}l!#
  6898. $,p4}$"#
  6899. %GL$#8^
  6900. [L%KL$S49
  6901. [L%GL%}t%
  6902. %GL%~H,
  6903. %GL%G
  6904. JP9~H,
  6905. ^`9J`9
  6906. 9GL%Jp9
  6907. JP9~H,
  6908. [l%G\%
  6909. 9)d [L%#
  6910. K\$Q07J
  6911. K\$Q07G
  6912. K\$,T8
  6913. G\%}x&
  6914. &GL$#8^
  6915. [L%KL$S49
  6916. G\%}P'
  6917. [l%G\%
  6918. G\%}X'
  6919. G\%}`'
  6920. [|%G\%
  6921. ^|:Jl:
  6922. G\%}$(
  6923. J|:Jl:
  6924. K\$Q07G|%
  6925. K\$Q$7G|%
  6926. K\$,T8
  6927. :-43#
  6928. :-43#
  6929. ^|;4K
  6930. :K<#,
  6931. :,P;#
  6932. ;+|"$
  6933. ;+L#$
  6934. ;,,<}
  6935. ;,\<}
  6936. ;,,<}
  6937. ;,\<}
  6938. ;,,<}
  6939. ;,\<}
  6940. ;,,<}
  6941. ;,\<}
  6942. ;,,<K
  6943. ;,\<K
  6944. ;,,<K
  6945. ;,\<K
  6946. ;,,<}
  6947. ;,\<}
  6948. ;,,<}
  6949. ;,\<}
  6950. ;,,<}
  6951. ;,\<}
  6952. ;,,<}
  6953. ;,\<}
  6954. ;,,<}
  6955. ;,\<}
  6956. ;,,<}
  6957. ;,\<}
  6958. ^d=KT=,
  6959. >QT>}
  6960. K<#, 4#
  6961. K<#, 4#
  6962. ^$>K<#,
  6963. ^4>K<#-X3#
  6964. K4>,`>#
  6965. ^D>K<#-X3#
  6966. K$>,P;#
  6967. K$>,P;#
  6968. ?, ?#
  6969. K<#,L?K
  6970. >K<#-X3#
  6971. ^P@+L#$
  6972. ^@@KP@-L4#
  6973. @#-43#
  6974. ^ @K@@,
  6975. 3K0@S
  6976. ~ 1[p1#
  6977. ^4AJ$A
  6978. ^DAJ4A
  6979. <JDA#
  6980. ^dAKTA,
  6981. KdA,T8
  6982. K\$Q07N
  6983. K\$Q$7N
  6984. K\$,T8
  6985. $,p4}T4#
  6986. ,L5}l4#8V
  6987. 5}l4#
  6988. ^`Cr`C
  6989. o`C}\5F
  6990. K<$,T8
  6991. D-43#
  6992. D-43#
  6993. C-LD#8L
  6994. C-pD#
  6995. K<#, 4#
  6996. K<#, 4#
  6997. K<#, 4#
  6998. D-43#
  6999. A}L%K<$S
  7000. A}d8}
  7001. A}d8}
  7002. A}t8}
  7003. A}L%K<$S
  7004. K<#, 4#
  7005. ^,FK<
  7006. K<FQT>}
  7007. K<F,T8
  7008. K<#, 4#
  7009. K<#, 4#
  7010. ^LFK<#,
  7011. ^\FK<#-X3#
  7012. K\F,`>#
  7013. ^lFK<#-X3#
  7014. KLF,P;#
  7015. K<F,T8
  7016. E}89J
  7017. K|F-43#
  7018. K|F-43#
  7019. FK|F,
  7020. F}h:#
  7021. FK<$P|5
  7022. GK<$P
  7023. K<$Q|5J
  7024. K<$,T8
  7025. K<$,T8
  7026. ID IT 
  7027. ^,G}T&
  7028. K<#, 4#
  7029. K<#, 4#
  7030. GK<#,
  7031. GK<#-X3#
  7032. G,`>#
  7033. GK<#-X3#
  7034. G,P;#
  7035. G,P;#
  7036. ]\"Il"
  7037. Il"}x;
  7038. O=Lotus Notes
  7039. O=Lotus Notes
  7040. PURSAFO
  7041. |.:#U
  7042. O=Lotus Notes
  7043. CN=Lotus Notes Template Development/O=Lotus Notes
  7044. PURSAFO
  7045. $ScriptLib
  7046. $ScriptLib_O
  7047. $TITLE
  7048. $Flags
  7049. $PublicAccess
  7050. Internet Options
  7051.     0S0E
  7052. O=Lotus Notes
  7053. O=Lotus Notes
  7054. PURSAFO
  7055. |.:#U
  7056. O=Lotus Notes
  7057. CN=Lotus Notes Template Development/O=Lotus Notes
  7058. PURSAFO
  7059. $TITLE
  7060. $Formula
  7061. '++LotusScript Development Environment:2:5:(Options):0:74
  7062. Use "AgentFunctions"
  7063. '++LotusScript Development Environment:2:5:(Forward):0:1
  7064. Declare Sub Initialize
  7065. Declare Function NeedToRun(Frequency As Variant) As Integer
  7066. Declare Sub MindURLs(Options As Variant)
  7067. Declare Function DocumentHasBeenRefreshed(CurrentUrl As Variant) As Integer
  7068. Declare Function AppendTitle(Title As String) As String
  7069. '++LotusScript Development Environment:2:5:(Declarations):0:10
  7070. Dim PageMinderFolder As notesview
  7071. Dim EmailAddress As Variant
  7072. Dim CurrentWebDocument As notesdocument
  7073. Dim PreviousWebdocument As notesdocument
  7074. Dim Memo As NotesDocument
  7075. Dim AgentDoc As notesdocument
  7076. Dim Frequency As Variant
  7077. Dim ResultOptions As Variant
  7078. Dim LastRun As Variant
  7079. Dim PageMinderAgent As NotesAgent
  7080. Dim NewWebDocument As notesdocument
  7081. Dim LoadURLLinks As Integer
  7082. '++LotusScript Development Environment:2:2:Initialize:1:10
  7083. Sub Initialize
  7084.      
  7085.      '*
  7086.      '*  The purpose of this agent is to monitor specific pages within the page minder folder and e-mail
  7087.      '*  either changed pages or a newsletter summary to the current user or whoever is listed
  7088.      '*  in the Internet Profile as the email address.
  7089.      '*  This agent makes extensive use of Agent Logging functions.  Please check your local copy of agentlog.nsf 
  7090.      '*  for status and error messages.
  7091.      '*
  7092.      
  7093.      '*
  7094.      '*  Initialize Variables
  7095.      '*
  7096.      On Error Goto ProcessError
  7097.      
  7098.      InstantiateAgentObjects
  7099.      Set dataDoc = Session.SavedData
  7100.      Set WebDatabase = Session.CurrentDatabase
  7101.      Set PageMinderAgent = Session.CurrentAgent
  7102.      Set dt = New NotesDateTime ("1/1/90")
  7103.      
  7104.      LoadURLLinks = False
  7105.      
  7106.      '*
  7107.      '*  Open/Create the Agent Error Log on the client.
  7108.      '*
  7109.      
  7110.      Set AgentLog = OpenLog(PageMinderAgent.name)
  7111.      
  7112.      If LogLocation = "Agent Log" Then
  7113.           agentLog.LogErrors = True     
  7114.      End If
  7115.      
  7116.      Call logaction( "Starting Page Minder agent.....")
  7117.      
  7118.      If (datadoc Is Nothing) Then
  7119.           Set datadoc = New Notesdocument (WebDatabase) 
  7120.      End If
  7121.      '*
  7122.      '*  Make sure that the location settings are correct for local retrievals
  7123.      '*
  7124.      
  7125.      If WebLocationOK Then
  7126.           
  7127.      '*
  7128.      '*  Make sure that the database variable was initialized.
  7129.      '*
  7130.           
  7131.           If  (WebDatabase Is Nothing) Then
  7132.                
  7133.                Call logerror( 1, "Web Database could not be initialized. Exiting Program without checking URL's.")
  7134.                Goto Cleanup
  7135.           End If
  7136.           
  7137.      '*
  7138.      '*  Verify that the Page Minder Folder exists in the database.
  7139.      '*  If not, exit the program.
  7140.      '*
  7141.           
  7142.           Set PageMinderFolder = WebDatabase.getview("Web Bots\Page Minder")
  7143.           
  7144.           If (PageMinderFolder Is Nothing) Then
  7145.                Call logerror(2, "Could not find Page Minder Folder.  Please recheck database design and rerun.")
  7146.                Goto Cleanup
  7147.           End If
  7148.           
  7149.      '*
  7150.      '*  Now that the Page Minder Folder exists, check to see if there are any documents
  7151.      '*  in it.  If not, exit the program.
  7152.      '*
  7153.           Set CurrentWebDocument = PageMinderFolder.GetFirstDocument
  7154.           
  7155.           If (CurrentWebDocument Is Nothing) Then
  7156.                Call logaction( "No documents were found to mind in the Page Minder Folder." )
  7157.                Goto Cleanup
  7158.           End If
  7159.           
  7160.      '*
  7161.      '*  Now that we have verified that there are documents to be checked,
  7162.      '*  we need to retrieve the pertinent fields from the Internet Profile.
  7163.      '*
  7164.           
  7165.           
  7166.           If  ( View Is Nothing ) Then
  7167.                Call logerror(3, "Could not find Internet Profile view.  Recheck database design and rerun agent.")
  7168.                Goto Cleanup
  7169.           End If
  7170.           
  7171.      '*
  7172.      '*  Make sure that an Internet profile document exists in the database.
  7173.      '*  If not, exit the program.
  7174.      '*
  7175.           
  7176.           If (docProfile Is Nothing) Then
  7177.                Call logerror(4, "Internet Options document not found.  Select Actions - Internet Options and Save the document.")
  7178.                Goto Cleanup
  7179.           End If
  7180.           
  7181.      '*
  7182.      '*  Retrieve the frequency with which we should run the agent.
  7183.      '*  If this is blank, assume daily.
  7184.      '*
  7185.           
  7186.           Frequency = docProfile.SearchFrequency
  7187.           If Frequency(0) = "" Then
  7188.                Call logaction( "No frequency specified, assuming daily.")
  7189.                Call docProfile.Replaceitemvalue("SearchFrequency", "2")
  7190.                Call docProfile.Save(True,False)
  7191.                Frequency = docProfile.SearchFrequency
  7192.           End If
  7193.           
  7194.      '*
  7195.      '*  Retrieve the SendMailTo field to determine where we send
  7196.      '*  results to.  If this is blank, sub in the current username.
  7197.      '*
  7198.           EmailAddress = docProfile.SendMailto
  7199.           If EmailAddress(0) = "" Then
  7200.                Call logaction( "No address specified to send results to.  Assuming " + session.username)
  7201.                Call docProfile.Replaceitemvalue("SendMailto", Session.Username)
  7202.                Call docProfile.Save(True,False)
  7203.                EmailAddress = docProfile.SendMailto
  7204.           End If
  7205.           
  7206.      '*
  7207.      '*  Retrieve the value of the UpdatesFoundOptions field
  7208.      '*  to determine what it is that we should do with the results 
  7209.      '*  of the Pages that have changed.  If it's blank, assume 
  7210.      '*  newsletter summary.
  7211.      '*
  7212.           ResultOptions = docProfile.UpdatesFoundOptions
  7213.           If ResultOptions(0) = "" Then
  7214.                Call logaction( "No format for results specified. Assuming newsletter summary." )
  7215.                Call docProfile.Replaceitemvalue("UpdatesFoundOptions", "1")
  7216.                Call docProfile.Save(True,False)
  7217.                ResultOptions = docProfile.UpdatesFoundOptions
  7218.           End If
  7219.           
  7220.      '*
  7221.      '*  Now determine if we have to check the pages based on the last time this
  7222.      '*  agent is run.  
  7223.      '*
  7224.           
  7225.           If PageMinderAgent.LastRun <> "" Then
  7226.                If (NeedToRun (Frequency)) Then
  7227.                     Call logaction( "Frequency indicates that we need to check the urls.")
  7228.                     MindURLs(ResultOptions(0))
  7229.                End If
  7230.           Else
  7231.                'This must be the first time we've run this so we don't need to check when it was last run.
  7232.                MindURLs(ResultOptions(0))
  7233.           End If
  7234.           
  7235.      End If
  7236.      Goto cleanup  
  7237. ProcessError:
  7238.      Call logerror(Err, Error$)
  7239.      Call logaction("The preceeding error occurred in the Initialize routine of the Purge Agent.")
  7240.      Resume Next     
  7241. Cleanup:  'Cleanup all the old memo forms created by the agent
  7242.      Set documents = db.search("form = ""Memo""", dt, 0)
  7243.      If documents.count<>0 Then
  7244.           For j = 1 To documents.count
  7245.                Set memo = documents.getnthdocument(j)
  7246.                memo.remove True
  7247.           Next
  7248.      End If
  7249.      Call logaction("Page Minder Agent finished."     )
  7250.      If LogLocation = "Agent Log" Then
  7251.           Call agentlog.close
  7252.      End If
  7253. End Sub
  7254. '++LotusScript Development Environment:2:1:NeedToRun:1:8
  7255. Function NeedToRun(Frequency As Variant) As Integer
  7256.      
  7257.      '*
  7258.      '*  This function determines if we need to run the agent
  7259.      '*  based on the frequency selection in the Internet Profile
  7260.      '*  The function returns a value of true or false depending on when the agent
  7261.      '*  was last run.
  7262.      '*
  7263.      
  7264.      On Error Goto ProcessError     
  7265.      Dim CurrentTime As New  NotesDatetime ("Now")
  7266.      Dim LastRunDate As New NotesDateTime(datadoc.LastRunTime(0))
  7267.      Dim Starttime As New NotesDateTime("1/1/70")
  7268.      NeedToRun = False
  7269.      Call CurrentTime.Setnow
  7270.      If LastRunDate.lslocaltime < Starttime.lslocaltime Then
  7271.           NeedToRun = True
  7272.           Exit Function
  7273.      End If
  7274.      
  7275.      Select Case Frequency(0) 
  7276.           
  7277.      Case  "0"
  7278.           
  7279.           If CurrentTime.timedifference(LastRunDate) > 3600  Or  Isempty(LastRunDate.LocalTime) Then
  7280.                Call logaction( "It's been more than an hour, time to mind the URL's")
  7281.                NeedToRun = True
  7282.           End If
  7283.      Case "1"
  7284.           If CurrentTime.timedifference(LastRunDate) >14400 Or  Isempty(LastRunDate.LocalTime)  Then
  7285.                Call logaction( "It's been more than 4 hours, time to mind the URL's")
  7286.                NeedToRun = True
  7287.           End If
  7288.      Case "2"
  7289.           If CurrentTime.timedifference(LastRunDate) >86400 Or  Isempty(LastRunDate.LocalTime)   Then
  7290.                Call logaction( "It's been more than a day, time to mind the URL's")
  7291.                NeedToRun = True
  7292.           End If
  7293.      Case  "3"
  7294.           If CurrentTime.timedifference(LastRunDate) > 604800 Or  Isempty(LastRunDate.LocalTime)  Then
  7295.                Call logaction( "It's been more than a week, time to mind the URL's")
  7296.                NeedToRun = True
  7297.           End If
  7298.      End Select
  7299.      Exit Function
  7300.      
  7301. ProcessError:
  7302.      Call logerror(Err, Error$)
  7303.      Call logaction("The preceeding error occurred in the NeedToRun routine of the Page Minder Agent.")
  7304.      Resume Next 
  7305.      
  7306. End Function
  7307. '++LotusScript Development Environment:2:2:MindURLs:1:8
  7308. Sub MindURLs(Options As Variant)
  7309.      
  7310.      '*
  7311.      '*  This subroutine performs the test on each document in the page minder
  7312.      '*  folder to see if the document has changed.  If it has, it sends the requested form
  7313.      '*  of e-mail to the user specified in the Internet options.
  7314.      '*
  7315.      On Error Goto ProcessError
  7316.      
  7317.      Dim url As Variant
  7318.      Dim Memo As NotesDocument
  7319.      Dim Memo1 As NotesDocument
  7320.      Dim Body As NotesrichTextItem
  7321.      Dim Body1 As NotesrichTextItem
  7322.      Dim Body2 As NotesrichTextItem
  7323.      Dim background As notesitem
  7324.      Dim papercolor As notesitem
  7325.      Dim SendMail As Integer
  7326.      Dim FirstTime As Integer
  7327.      Dim Successful As Integer
  7328.      
  7329.      If Options = "1" Then
  7330.           Set Memo = New NotesDocument(WebDatabase)
  7331.           Set Body = New NotesRichTextItem(Memo, "Body")
  7332.           Set Body1 = New NotesRichTextItem(Memo, "Body1")
  7333.           Set Body2 = New NotesRichTextItem(Memo, "Body2")
  7334.           Call Memo.ReplaceItemValue( "Subject", "Results of Page Minder Agent for "+ WebDatabase.Filename )
  7335.           Call Memo.ReplaceItemValue( "Form", "Memo" )
  7336.           Call Memo.Save(True,False)
  7337.           SendMail = False
  7338.           FirstTime = True
  7339.           Successful = True
  7340.      Elseif Options = "0" Then
  7341.           Sendmail = False
  7342.           FirstTime = True
  7343.      End If
  7344.      
  7345.      While Not (CurrentWebDocument Is Nothing) 
  7346.           If CurrentWebdocument.form(0) = "HelpForm"  Then Goto nextdocument
  7347.           If CurrentWebDocument.hasitem("url") Then
  7348.                url = CurrentWebDocument.url(0)
  7349.                
  7350.                If url = "" Then
  7351.                     Call logerror(7,  "URL field is empty.  Remove the page from the Page Minder Folder.")
  7352.                     Call CurrentWebDocument.ReplaceItemValue("PageMinderStatus", "2")
  7353.                     Call CurrentWebDocument.Save(True, False)
  7354.                     Goto NextDocument
  7355.                End If
  7356.                
  7357.                If (CurrentWebDocument.HTTPStatus(0) <> "200") Or (CurrentWebDocument.HTTPStatus(0) <> "304") Then
  7358.                     Goto Continue  
  7359.                End If
  7360.                
  7361.                If CurrentWebDocument.HTTPLast_Modified(0) = "" Then
  7362. NoLastModified:
  7363.                     If Options = "1"  And FirstTime Then
  7364.                          Call Body1.AddNewLine(1)
  7365.                          Call Body1.AppendText("The following pages are on HTTP servers which do not support the Last-Modified command:")
  7366.                          Call Body1.AddNewLine(2)
  7367.                          Call Body1.AppendText(AppendTitle(CurrentWebDocument.Title(0)))
  7368.                          Call Body1.AddTab(2)
  7369.                          Call Body1.AppendText(CurrentWebdocument.url(0))
  7370.                          Call Body1.AddNewLine(1)
  7371.                          Call Memo.Save(True, False)
  7372.                          FirstTime = False
  7373.                          SendMail = True
  7374.                     Elseif Options = "1" Then
  7375.                          Call Body1.AppendText(AppendTitle(CurrentWebDocument.Title(0)))
  7376.                          Call Body1.AddTab(2)
  7377.                          Call Body1.AppendText(CurrentWebdocument.url(0))
  7378.                          Call Body1.AddNewLine(1)
  7379.                          Call Memo.Save(True, False)
  7380.                          SendMail = True
  7381.                     Elseif Options = "0" And FirstTime Then
  7382.                          Set Memo1 = New NotesDocument(WebDatabase)
  7383.                          Set Body1 = New NotesRichTextItem(Memo1, "Body")  
  7384.                          Call Memo1.ReplaceItemValue( "Subject", "Results of Page Minder Agent for "+WebDatabase.Filename  )
  7385.                          Call Memo1.ReplaceItemValue( "Form", "Memo" )
  7386.                          Call Body1.AppendText("The following pages are on HTTP servers which do not support the Last-Modified command:")
  7387.                          Call Body1.AddNewLine(2)
  7388.                          Call Body1.AppendText(AppendTitle(CurrentWebDocument.Title(0)))
  7389.                          Call Body1.AddTab(2)
  7390.                          Call Body1.AppendText(CurrentWebdocument.url(0))
  7391.                          Call Body1.AddNewLine(1)
  7392.                          Call Memo1.Save(True, False)
  7393.                          FirstTime = False
  7394.                          SendMail = True
  7395.                     Elseif Options = "0" Then
  7396.                          Call Body1.AppendText(AppendTitle(CurrentWebDocument.Title(0)))
  7397.                          Call Body1.AddTab(2)
  7398.                          Call Body1.AppendText(CurrentWebdocument.url(0))
  7399.                          Call Body1.AddNewLine(1)
  7400.                          Call Memo1.Save(True, False)
  7401.                          SendMail = True
  7402.                     End If
  7403.                     Call CurrentWebDocument.ReplaceItemValue("PageMinderStatus", "1")
  7404.                     Call CurrentWebDocument.Save(True, False)
  7405.                     Goto NextDocument
  7406.                End If
  7407.                
  7408. Continue:
  7409.                Set NewWebDocument = RetrieveOverInternet(url,CurrentWebDocument,LoadURLLinks) 
  7410.                If NewWebDocument.HTTPStatus(0) = "401" Then Goto AuthenticationFailed
  7411.                If NewWebDocument.HTTPLast_Modified(0) = "" Then  Goto NoLastModified    
  7412.                If  DocumentHasBeenRefreshed(url) Then
  7413.                     If (NewWebDocument.HTTPStatus(0) = "200") Or (NewWebdocument.HTTPStatus(0) = "304")  Then
  7414.                          Call agentlog.logaction( "Successfully retrieved " +NewWebDocument.URL(0)+" page")
  7415.                          Call NewWebDocument.ReplaceItemValue("PageMinderStatus", "0")
  7416.                          Call NewWebdocument.Save(True,False)
  7417.                          Call NewWebdocument.PutInFolder("Web Bots\Page Minder")
  7418.                          
  7419.                          If Options = "0" Then
  7420.                               Set Memo = New NotesDocument(WebDatabase)
  7421.                               Call Memo.ReplaceItemValue( "Subject", "Results of Page Minder Agent for " + NewWebDocument.url(0)+ " in the file "+WebDatabase.Filename)
  7422.                               Call Memo.Replaceitemvalue("Form", "Memo")
  7423.                               If NewWebdocument.hasitem("$Background") Then
  7424.                                    Set background = NewWebdocument.getfirstitem("$Background")
  7425.                                    Call memo.copyitem(background, "$Background")
  7426.                               End If
  7427.                               If NewWebdocument.hasitem("$PaperColor") Then
  7428.                                    Set papercolor = NewWebdocument.getfirstitem("$PaperColor")
  7429.                                    Call memo.copyitem(papercolor, "$PaperColor")
  7430.                               End If
  7431.                               Set Body = New NotesRichTextItem(Memo, "Body")  
  7432.                               Call NewWebDocument.Rendertortitem(Body)
  7433.                               Call Memo.save(True,False)
  7434.                               Call Memo.send(False, EMailAddress)
  7435.                          Elseif Options ="1" And Successful Then
  7436.                               Call Body2.AddNewLine(1)
  7437.                               Call Body2.AppendText("The following pages have changed as of "+Cstr(Today)+":")   
  7438.                               Call Body2.AddNewLine(2)
  7439.                               Call Body2.AppendText(AppendTitle(NewWebDocument.Title(0)))
  7440.                               Call Body2.AddTab(2)
  7441.                               Call Body2.AppendText(NewWebDocument.url(0))
  7442.                               Call Body2.AddNewLine(1)
  7443.                               Call Memo.Save(True, False)
  7444.                               Successful = False
  7445.                               SendMail = True
  7446.                          Elseif Options = "1" Then
  7447.                               Call Body2.AppendText(AppendTitle(NewWebDocument.Title(0)))
  7448.                               Call Body2.AddTab(2)
  7449.                               Call Body2.AppendText(NewWebDocument.url(0))
  7450.                               Call Body2.AddNewLine(1)
  7451.                               Call Memo.Save (True, False)
  7452.                               SendMail = True
  7453.                          End If
  7454.                     Elseif NewWebDocument.HTTPStatus(0) = "401" Then
  7455. AuthenticationFailed:
  7456.                          Call logerror(8,"Page Minder does not have required authentication information for "+NewWebDocument.url(0)+".  Page was not retrieved correctly.")
  7457.                          Call NewWebDocument.ReplaceItemValue("PageMinderStatus", "2")
  7458.                          Call NewWebDocument.Save(True, False)
  7459.                          Call NewWebdocument.removefromfolder("Web Bots\Page Minder")
  7460.                          If GetLocationItem("WebRetriever")(0) <> "3" Then
  7461.                               Dim AuthenticationMemo As New Notesdocument(WebDatabase)
  7462.                               Set Body = New NotesRichTextItem(AuthenticationMemo, "Body")
  7463.                               Call AuthenticationMemo.ReplaceItemValue( "Subject", "Page Minder Requires Authentication Information ")
  7464.                               Call AuthenticationMemo.ReplaceItemValue( "Form", "Memo" )
  7465.                               Call Body.AddNewLine(1)
  7466.                               Call Body.Appendtext("The following page requires authentication information.  Please retreive the page manually and move it to the Page Minder folder again.")
  7467.                               Call Body.AddNewLine(2)
  7468.                               Call Body.AppendDocLink(NewWebDocument, NewWebDocument.url(0))
  7469.                               Call Body.AddTab(2)
  7470.                               Call Body.AppendText(NewWebDocument.Title(0))
  7471.                               Call Body.AddNewLine(1)
  7472.                               Call AuthenticationMemo.Save (True, False)
  7473.                               Call AuthenticationMemo.send(False, EMailAddress)
  7474.                          Else
  7475.                               Call agentlog.Logaction("Page Minder does not support authenticated pages when using the Notes with Internet Explorer setting.")
  7476.                          End If
  7477.                     Else
  7478.                          Call logerror(9, "Page Minder received a bad status code of " + Cstr(NewWebDocument.HttpStatus(0)) +".  Page " + Cstr(NewWebDocument.url(0))+" was not retrieved correctly.")
  7479.                          Call NewWebDocument.ReplaceItemValue("PageMinderStatus", "2")
  7480.                          Call NewWebDocument.Save(True, False)
  7481.                     End If
  7482.                Else
  7483.                     Call CurrentWebDocument.ReplaceItemValue("PageMinderStatus", "3")
  7484.                     Call CurrentWebDocument.Save(True, False)
  7485.                End If
  7486.           Else
  7487.                Call logerror(7, "URL field is not present on the note.  Remove from Page Minder Folder.")
  7488.                Call CurrentWebDocument.ReplaceItemValue("PageMinderStatus", "2")
  7489.                Call CurrentWebDocument.Save(True, False)
  7490.           End If      
  7491. NextDocument:
  7492.           
  7493.           Set CurrentWebDocument=PageMinderFolder.GetNextDocument(CurrentWebDocument)
  7494.           
  7495.      Wend
  7496.      
  7497.      If SendMail Then
  7498.      '*
  7499.      '* Now that we're done checking the pages, if the user
  7500.      '* requested a newsletter summary of the results, let's mail it.
  7501.      '*
  7502.           If Options = "1" Then
  7503.                Set Body = New NotesRichTextItem(Memo, "Body")  
  7504.                If Body2.Type = RICHTEXT Then
  7505.                     Call Body.Appendrtitem(Body2)
  7506.                End If
  7507.                If Not (Body1 Is Nothing) Then
  7508.                     If Body1.Type = RICHTEXT Then
  7509.                          Call Body.Appendrtitem( Body1)
  7510.                     End If
  7511.                End If
  7512.                Call Memo.Save(True, False)
  7513.                Call Memo.Send(False, EMailAddress)
  7514.           Elseif Options = "0" And Not (Memo1 Is Nothing) Then
  7515.                If Body1.Type  =  RICHTEXT Then
  7516.                     Call Memo1.send(False,EMailAddress)
  7517.                End If
  7518.           End If
  7519.      End If
  7520.      Goto EndSub
  7521.      
  7522. ProcessError:
  7523.      Call logerror(Err, Error$)
  7524.      Call logaction("The preceeding error occurred in the MindURLs routine of the Page Minder agent.")
  7525.      Resume Next     
  7526. EndSub:
  7527.      Call datadoc.Replaceitemvalue("LastRunTime", Now)
  7528.      Call datadoc.Save(True,False)
  7529. End Sub
  7530. '++LotusScript Development Environment:2:1:DocumentHasBeenRefreshed:1:8
  7531. Function DocumentHasBeenRefreshed(CurrentUrl As Variant) As Integer
  7532.      
  7533.      '*
  7534.      '*  The purpose of this function is to determine if the web page
  7535.      '*  that we are monitoring has changed.  If it has, the function
  7536.      '*  returns true.
  7537.      '*
  7538.      Dim LastRunDate As New NotesDateTime(datadoc.LastRunTime(0))
  7539.      DocumentHasBeenRefreshed = False     
  7540.      
  7541.      '*
  7542.      '*  Get the date that the document was last refreshed and
  7543.      '*  save it for future comparisons.
  7544.      '*
  7545.      
  7546.      
  7547.      Dim DateLastModified As New NotesDateTime(NewWebDocument.HTTPLast_modified(0))
  7548.      If (DebugFlag = "1") Then
  7549.           Call logaction( "Date Last Modified (GMT): " + Cdat(DateLastModified.LSGMTTime))
  7550.      End If
  7551.      
  7552.      
  7553.      
  7554.      If Cdat(DateLastModified.LSGMTTime) > Cdat(LastRunDate.LSGMTTime) Or Isempty(LastRunDate.LocalTime) Then
  7555.           DocumentHasBeenRefreshed = True
  7556.      End If
  7557.      
  7558.      
  7559. End Function
  7560. '++LotusScript Development Environment:2:1:AppendTitle:1:8
  7561. Function AppendTitle(Title As String) As String
  7562.      Dim titlelength As Integer
  7563.      titlelength = Len(title)
  7564.      If titlelength<40 Then
  7565.           NewTitle = "                                        "
  7566.           Lset NewTitle = title
  7567.           AppendTitle = NewTitle
  7568.      Elseif titlelength >40 Then
  7569.           AppendTitle = Left$(title, 40)
  7570.      End If
  7571. End Function
  7572. Lotus Product)\    V0.0
  7573. O=Lotus Notes
  7574. O=Lotus Notes
  7575. PURSAFO
  7576. |.:#U
  7577. O=Lotus Notes
  7578. CN=Lotus Notes Template Development/O=Lotus Notes
  7579. PURSAFO
  7580. $TITLE
  7581. $AssistType
  7582. $AssistLastRun
  7583. $AssistDocCount
  7584. $AssistFlags
  7585. $AssistTrigger
  7586. $AssistInfo
  7587. $AssistQuery
  7588. $AssistAction
  7589. $AssistAction_Ex
  7590. '++LotusScript Development Environment:2:5:(Options):0:74
  7591. Option Public
  7592. '++LotusScript Development Environment:2:5:(Forward):0:1
  7593. Declare Sub InstantiateAgentObjects
  7594. Declare Function OpenLog(AgentName As String) As NotesLog
  7595. Declare Function RetrieveOverInternet (CurrentURL As Variant, Doc As Notesdocument,  LoadURLLinks) As Notesdocument
  7596. Declare Function WebLocationOK As Integer
  7597. Declare Function GetLocalNAB() As NotesDatabase
  7598. Declare Sub Terminate
  7599. Declare Sub RemoveObjects(doc As notesdocument)
  7600. Declare Sub LogAction (Action As String)
  7601. Declare Sub LogError (ErrorCode As Long, ErrorText As String)
  7602. Declare Function GetLocationItem (itemname As String) As Variant
  7603. '++LotusScript Development Environment:2:5:(Declarations):0:10
  7604. Dim Session As notessession
  7605. Dim  DebugFlag As String
  7606. Dim agentlog As noteslog
  7607. Dim CurrentAgent As NotesAgent
  7608. Dim WebDatabase As NotesDatabase
  7609. Dim datadoc As notesdocument
  7610. Dim db As notesdatabase
  7611. Dim view As notesview
  7612. Dim docprofile As notesdocument
  7613. Dim loglocation As String
  7614. Dim dt As notesdatetime
  7615. '++LotusScript Development Environment:2:2:InstantiateAgentObjects:1:8
  7616. Sub InstantiateAgentObjects
  7617.      Set session = New NotesSession
  7618.      Set db = session.CurrentDatabase
  7619.      Set view = db.GetView("(Internet Profile)")
  7620.      Set docProfile = view.GetFirstDocument
  7621. End Sub
  7622. '++LotusScript Development Environment:2:1:OpenLog:1:8
  7623. Function OpenLog(AgentName As String) As NotesLog
  7624.      
  7625.      '*
  7626.      '*  The purpose of this subroutine is to find and/or create the Notes Agent Log
  7627.      '*  for the local client using the StdR4AgentLog template.
  7628.      '*
  7629.      
  7630.      Dim directory As notesdbdirectory
  7631.      Dim db As notesdatabase
  7632.      Dim done As Variant
  7633.      
  7634.      On Error Goto errorroutine
  7635.      
  7636.      Set directory = New notesdbdirectory("")
  7637.      Set db = directory.getfirstdatabase(DATABASE)
  7638.      done = False
  7639.      
  7640.      While Not (db Is Nothing) And Not done
  7641.           Call db.open("", "")
  7642.           If (db.designtemplatename = "StdR4AgentLog") Then
  7643.                done = True
  7644.           Elseif db.filename = "agentlog.nsf" Then
  7645.                done = True
  7646.           Else
  7647.                Set db = directory.getnextdatabase
  7648.           End If
  7649.      Wend
  7650.      
  7651.      If done Then
  7652.           Set AgentLog = New noteslog ("Log for " & AgentName)
  7653.           Call AgentLog.opennoteslog (db.server, db.filepath)
  7654.           LogLocation = "Agent Log"
  7655.      Else     
  7656.           Dim alogdb As New notesdatabase("", "ALOG4.NTF")      
  7657.           Dim logdb As notesdatabase
  7658.           If alogdb.isopen Then               
  7659.                Set logdb = alogdb.createfromtemplate("", "agentlog", True)
  7660.                Set agentlog = New noteslog ("Log for " & AgentName)
  7661.                Call agentlog.opennoteslog ("", "agentlog.nsf")
  7662.                LogLocation = "Agent Log"
  7663.           Else
  7664.               'Agent log template not found, using print statements to log to the Notes log
  7665.                loglocation = "Notes Log"
  7666.                Exit Function               
  7667.           End If
  7668.      End If
  7669.      Set  OpenLog = Agentlog    
  7670.      Exit Function
  7671.      
  7672. ErrorRoutine:
  7673.      Messagebox Error & " (OpenLog)"
  7674.      Exit Function
  7675. End Function
  7676. '++LotusScript Development Environment:2:1:RetrieveOverInternet:1:8
  7677. Function RetrieveOverInternet (CurrentURL As Variant, Doc As Notesdocument,  LoadURLLinks) As Notesdocument
  7678.      
  7679.      '*
  7680.      '*  The purpose of this subroutine is to retrieve a web page over the net.
  7681.      '*  Various checks in here are present to determine if the user 
  7682.      '*  is trying to access an authenticated page or access via a proxy.  
  7683.      '*
  7684.      
  7685.      Dim authinfo As Variant
  7686.      Dim username As String
  7687.      Dim password As String
  7688.      Dim proxyinfo As Variant
  7689.      Dim proxyusername As String
  7690.      Dim proxypassword As String
  7691.      Dim Currentdomain As String
  7692.      
  7693.      If Doc Is Nothing Then
  7694.           
  7695.          '*
  7696.          '*  If no document was passed in then we are just dealing with a url.
  7697.           '*  Just in case the url may be from an authenticated site, we need
  7698.           '* to check the data note for the authentication information
  7699.           '*
  7700.           
  7701.           CurrentDomain = (Left(Currenturl, (Instr(8, Currenturl, "/", 1))))
  7702.           If datadoc.hasitem(currentdomain+"auth") And datadoc.hasitem(currentdomain+"proxy") Then
  7703.                authinfo =datadoc.getitemvalue(currentdomain+"auth")
  7704.                username = Left(authinfo(0),  (Instr(authinfo(0), ":")-1))
  7705.                password = Right(authinfo(0), (Len(authinfo(0))-Instr(authinfo(0), ":")))
  7706.                proxyinfo = datadoc.getitemvalue(currentdomain+"proxy")
  7707.                proxyusername = Left(proxyinfo(0), (Instr(proxyinfo(0), ":")-1))
  7708.                proxypassword = Right(proxyinfo(0), Len(proxyinfo(0))-(Instr(proxyinfo(0), ":"))) 
  7709.                If LoadURLLinks Then
  7710.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"",username,password,proxyusername,proxypassword)  
  7711.                Else
  7712.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0,"",username,password,proxyusername,proxypassword)  
  7713.                End If
  7714.                Exit Function
  7715.           Elseif datadoc.hasitem(currentdomain+"auth") And Not datadoc.hasitem(currentdomain+"proxy") Then
  7716.                authinfo = datadoc.getitemvalue(currentdomain+"auth")
  7717.                username = Left(authinfo(0),  (Instr(authinfo(0), ":")-1))
  7718.                password = Right(authinfo(0), (Len(authinfo(0))-Instr(authinfo(0), ":")))
  7719.                If LoadURLLinks Then
  7720.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"",username,password)
  7721.                Else
  7722.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0,"",username,password)
  7723.                End If
  7724.                Exit Function
  7725.           Elseif datadoc.hasitem(currentdomain+"proxy") And Not datadoc.hasitem(currentdomain+"auth") Then
  7726.                proxyinfo = datadoc.getitemvalue(currentdomain+"proxy")
  7727.                proxyusername = Left(proxyinfo(0), (Instr(proxyinfo(0), ":")-1))
  7728.                proxypassword = Right(proxyinfo(0), (Len(proxyinfo(0))-Instr(proxyinfo(0), ":")))
  7729.                If LoadURLLinks Then
  7730.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"", "", "", proxyusername, proxypassword)
  7731.                Else
  7732.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0,"", "", "", proxyusername, proxypassword)
  7733.                End If
  7734.                Exit Function
  7735.           Else
  7736.                If LoadURLLinks Then
  7737.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1)  
  7738.                Else
  7739.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0)
  7740.                End If
  7741.                Exit Function
  7742.           End If
  7743.           
  7744.           '*
  7745.           '*  If a document did get passed in as an argument, check to see if authentication information exists on it
  7746.           '*  If the information does exist, store it on the data note for the agent.
  7747.           '*
  7748.      Else 
  7749.           If Doc.hasitem("$User_Authentication") And Doc.hasitem("$Proxy_Authentication") Then
  7750.                authinfo = Doc.getitemvalue("$User_Authentication")
  7751.                username = Left(authinfo(0),  (Instr(authinfo(0), ":")-1))
  7752.                password = Right(authinfo(0), (Len(authinfo(0))-Instr(authinfo(0), ":")))
  7753.                proxyinfo = Doc.getitemvalue("$Proxy_Authentication")
  7754.                proxyusername = Left(proxyinfo(0), (Instr(proxyinfo(0), ":")-1))
  7755.                proxypassword = Right(proxyinfo(0), (Len(proxyinfo(0)) -Instr(proxyinfo(0), ":"))) 
  7756.                CurrentDomain = (Left(Currenturl, (Instr(8, currenturl, "/", 1))))
  7757.                If datadoc.hasitem(currentdomain+"auth") And datadoc.hasitem(currentdomain+"proxy") Then
  7758.                     If LoadURLLinks Then
  7759.                          Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"",username,password,proxyusername,proxypassword)  
  7760.                     Else
  7761.                          Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0,"",username,password,proxyusername,proxypassword)  
  7762.                     End If
  7763.                     Exit Function
  7764.                Else
  7765.                     Call datadoc.replaceitemvalue(currentdomain+"auth", authinfo)
  7766.                     Call datadoc.replaceitemvalue(currentdomain+"proxy",proxyinfo)
  7767.                     Call datadoc.save(True, False)
  7768.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"",username,password,proxyusername,proxypassword)  
  7769.                End If
  7770.           Elseif Doc.hasitem("$User_Authentication") And Not Doc.hasitem("$Proxy_Authentication") Then
  7771.                authinfo = Doc.getitemvalue("$User_Authentication")
  7772.                username = Left(authinfo(0),  (Instr(authinfo(0), ":")-1))
  7773.                password = Right(authinfo(0), (Len(authinfo(0))-Instr(authinfo(0), ":")))
  7774.                CurrentDomain = (Left(currenturl, (Instr(8, currenturl, "/", 1))))
  7775.                If datadoc.hasitem(currentdomain+"auth") Then
  7776.                     If LoadURLLinks Then
  7777.                          Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"",username,password)
  7778.                     Else
  7779.                          Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0,"",username,password)
  7780.                     End If
  7781.                     Exit Function
  7782.                Else
  7783.                     Call datadoc.replaceitemvalue(currentdomain+"auth", authinfo)
  7784.                     Call datadoc.save(True,False)
  7785.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"",username,password)
  7786.                End If
  7787.                
  7788.           Elseif Doc.hasitem("$Proxy_Authentication") And Not Doc.hasitem("$User_Authentication") Then
  7789.                proxyinfo = Doc.getitemvalue("$Proxy_Authentication")
  7790.                proxyusername = Left(proxyinfo(0), (Instr(proxyinfo(0), ":")-1))
  7791.                proxypassword = Right(proxyinfo(0), (Len(proxyinfo(0)) - Instr(proxyinfo(0), ":")))
  7792.                CurrentDomain = (Left(Currenturl, (Instr(8, currenturl, "/", 1))))
  7793.                If datadoc.hasitem(currentdomain+"proxy") Then
  7794.                     If LoadURLLinks Then
  7795.                          Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"", "", "", proxyusername, proxypassword)
  7796.                     Else
  7797.                          Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0,"", "", "", proxyusername, proxypassword)
  7798.                     End If
  7799.                     Exit Function
  7800.                Else
  7801.                     Call datadoc.replaceitemvalue(currentdomain+"proxy", proxyinfo)
  7802.                     Call datadoc.save(True,False)
  7803.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"", "", "", proxyusername, proxypassword)
  7804.                End If
  7805.                Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1,"", "", "", proxyusername, proxypassword)
  7806.           Else
  7807.                If LoadURLLinks Then
  7808.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,1)  
  7809.                Else
  7810.                     Set RetrieveOverInternet = WebDatabase.GetDocumentByURL(currentURL, 2,0)
  7811.                End If
  7812.           End If
  7813.      End If
  7814. End Function
  7815. '++LotusScript Development Environment:2:1:WebLocationOK:1:8
  7816. Function WebLocationOK As Integer
  7817.      
  7818.      '*
  7819.      '*  This function verifies that the current location settings are correct for local web retrievals.
  7820.      '*
  7821.      
  7822.      WebLocationOK = True
  7823.      Dim PrivateAddressBook As notesdatabase
  7824.      Dim CurrentLocation As notesdocument
  7825.      Dim LocationString As String     
  7826.      
  7827.      
  7828.      Set PrivateAddressBook = GetLocalNAB
  7829.      
  7830.      If (PrivateAddressBook Is Nothing) Then
  7831.           Call agentlog.logaction( "Cannot verify current location settings.  Unable to open private address book.  Proceeding with  agent") 
  7832.           Exit Function
  7833.      End If
  7834.      
  7835.      LocationString = Session.GetEnvironmentString ( "Location", True)
  7836.      
  7837.      If LocationString <> "" Then
  7838.           Temp$ = Mid( LocationString, (Instr(1, LocationString, ",")+1))
  7839.           LocationID$ = Left(Temp$, (Instr(1,Temp$, ",")-1))
  7840.           Set CurrentLocation = PrivateAddressBook.getdocumentbyid(LocationID$)
  7841.           If Not (CurrentLocation Is Nothing) Then
  7842.                If CurrentLocation.WebLogLevel(0) <> "0" Then
  7843.                     DebugFlag = "1"
  7844.                End If
  7845.                If CurrentLocation.WebRetriever(0) = "0" Or CurrentLocation.WebRetriever(0) = "3" Then
  7846.                     Goto CheckLocation
  7847.                Else
  7848.                     Call agentlog.logerror(5, "Your current location indicates that Notes is not specified as your Web Retriever.")
  7849.                     WebLocationOK = False
  7850.                     Exit Function
  7851.                End If
  7852. CheckLocation:
  7853.                If CurrentLocation.WebLocation(0) <> "1" Then
  7854.                     Call agentlog.logerror(6, "Your current location indicates that you are not setup for Local Web retrievals.")
  7855.                     WebLocationOK = False
  7856.                     Exit Function
  7857.                End If
  7858.           Else
  7859.                Call agentlog.logaction( "Warning:  Unable to verify current location settings.  Can't find location document.")
  7860.                Exit Function
  7861.           End If
  7862.      Else
  7863.           Call agentlog.logaction( "Warning:  Unable to verify current location settings.  Location string is empty." )
  7864.           Exit Function
  7865.      End If     
  7866. End Function
  7867. '++LotusScript Development Environment:2:1:GetLocalNAB:1:8
  7868. Function GetLocalNAB() As NotesDatabase
  7869.      Dim sAddressBook As String
  7870.      Dim nCommaLocation As Integer
  7871.      
  7872.      On Error Resume Next
  7873.      sAddressBook = session.GetEnvironmentString("NAMES", True)
  7874.      nCommaLocation = Instr(sAddressBook, ",")
  7875.      If nCommaLocation > 0 Then sAddressBook = Left(sAddressBook, nCommaLocation-1)
  7876.      
  7877.      Set GetLocalNAB = New NotesDatabase("",sAddressBook)
  7878. End Function
  7879. '++LotusScript Development Environment:2:2:Terminate:1:10
  7880. Sub Terminate
  7881.      
  7882. End Sub
  7883. '++LotusScript Development Environment:2:2:RemoveObjects:1:8
  7884. Sub RemoveObjects(doc As notesdocument)
  7885.      Dim imagepage As notesdocument
  7886.      If doc.hasitem("$ImageList") Then
  7887.           Dim images As Variant
  7888.           images  = doc.getitemvalue("$ImageList")
  7889.           Forall j In images
  7890.                If j <> "" Then
  7891.                     Set imagepage = db.getdocumentbyurl(j)
  7892.                     imagepage.remove True
  7893.                End If
  7894.           End Forall
  7895.      End If
  7896. End Sub
  7897. '++LotusScript Development Environment:2:2:LogAction:1:8
  7898. Sub LogAction (Action As String)
  7899.      If LogLocation = "Agent Log" Then
  7900.           Call agentlog.logaction(Action)
  7901.      Elseif LogLocation = "Notes Log" Then
  7902.           Print Action
  7903.      End If
  7904. End Sub
  7905. '++LotusScript Development Environment:2:2:LogError:1:8
  7906. Sub LogError (ErrorCode As Long, ErrorText As String)
  7907.      If LogLocation = "Agent Log" Then
  7908.           Call agentlog.logerror(ErrorCode, ErrorText)
  7909.      Else
  7910.           Print Error & ErrorText
  7911.      End If
  7912. End Sub
  7913. '++LotusScript Development Environment:2:1:GetLocationItem:1:8
  7914. Function GetLocationItem (itemname As String) As Variant
  7915.      
  7916.      '*
  7917.      '*  This function returns a data item from the current location note
  7918.      '*
  7919.      
  7920.      InstantiateAgentObjects
  7921.      GetLocationItem = ""
  7922.      Dim PrivateAddressBook As notesdatabase
  7923.      Dim CurrentLocation As notesdocument
  7924.      Dim LocationString As String     
  7925.      
  7926.      
  7927.      Set PrivateAddressBook = GetLocalNAB
  7928.      
  7929.      If (PrivateAddressBook Is Nothing) Then
  7930.           Print "Warning:  Cannot open private address book."
  7931.           Exit Function
  7932.      End If
  7933.      
  7934.      LocationString = Session.GetEnvironmentString ( "Location", True)
  7935.      
  7936.      If LocationString <> "" Then
  7937.           Temp$ = Mid( LocationString, (Instr(1, LocationString, ",")+1))
  7938.           LocationID$ = Left(Temp$, (Instr(1,Temp$, ",")-1))
  7939.           Set CurrentLocation = PrivateAddressBook.getdocumentbyid(LocationID$)
  7940.           If Not (CurrentLocation Is Nothing) Then
  7941.                GetLocationItem = CurrentLocation.getitemvalue(itemname)
  7942.           Else
  7943.                Call agentlog.logaction("Warning:  Unable to verify current location settings.  Can't find location document.") 
  7944.                Exit Function
  7945.           End If
  7946.      Else
  7947.           Call agentlog.logaction( "Warning:  Unable to verify current location settings.  Location string is empty." )
  7948.           Exit Function
  7949.      End If     
  7950. End Function
  7951.     +(    $
  7952. O=Lotus Notes
  7953. O=Lotus Notes
  7954. PURSAFO
  7955. |.:#U
  7956. O=Lotus Notes
  7957. CN=Lotus Notes Template Development/O=Lotus Notes
  7958. PURSAFO
  7959. $ScriptLib
  7960. $ScriptLib_O
  7961. $TITLE
  7962. $Flags
  7963. $PublicAccess
  7964. Browse'++LotusScript Development Environment:2:5:(Options):0:66
  7965. '++LotusScript Development Environment:2:5:(Forward):0:1
  7966. Declare Sub Click(Source As Button)
  7967. '++LotusScript Development Environment:2:5:(Declarations):0:2
  7968. '++LotusScript Development Environment:2:2:BindEvents:1:129
  7969. Private Sub BindEvents(Byval Objectname_ As String)
  7970.      Static Source As BUTTON
  7971.      Set Source = Bind(Objectname_)
  7972.      On Event Click From Source Call Click
  7973. End Sub
  7974. '++LotusScript Development Environment:2:2:Click:1:12
  7975. Sub Click(Source As Button)
  7976.      Browse
  7977.      
  7978. End Sub
  7979. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  7980. '++LotusScript Development Environment:2:5:(Forward):0:1
  7981. Declare Sub Click(Source As Button)
  7982. '++LotusScript Development Environment:2:5:(Declarations):0:2
  7983. '++LotusScript Development Environment:2:2:BindEvents:1:129
  7984. Private Sub BindEvents(Byval Objectname_ As String)
  7985.      Static Source As BUTTON
  7986.      Set Source = Bind(Objectname_)
  7987.      On Event Click From Source Call Click
  7988. End Sub
  7989. '++LotusScript Development Environment:2:2:Click:1:12
  7990. Sub Click(Source As Button)
  7991.      ViewDelete     
  7992.      
  7993. End Sub
  7994. Print...'++LotusScript Development Environment:2:5:(Options):0:66
  7995. '++LotusScript Development Environment:2:5:(Forward):0:1
  7996. Declare Sub Click(Source As Button)
  7997. '++LotusScript Development Environment:2:5:(Declarations):0:2
  7998. '++LotusScript Development Environment:2:2:BindEvents:1:129
  7999. Private Sub BindEvents(Byval Objectname_ As String)
  8000.      Static Source As BUTTON
  8001.      Set Source = Bind(Objectname_)
  8002.      On Event Click From Source Call Click
  8003. End Sub
  8004. '++LotusScript Development Environment:2:2:Click:1:12
  8005. Sub Click(Source As Button)
  8006.      PrintWebDocument
  8007.      
  8008. End Sub
  8009. _Search
  8010. '++LotusScript Development Environment:2:5:(Options):0:66
  8011. '++LotusScript Development Environment:2:5:(Forward):0:1
  8012. Declare Sub Click(Source As Button)
  8013. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8014. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8015. Private Sub BindEvents(Byval Objectname_ As String)
  8016.      Static Source As BUTTON
  8017.      Set Source = Bind(Objectname_)
  8018.      On Event Click From Source Call Click
  8019. End Sub
  8020. '++LotusScript Development Environment:2:2:Click:1:12
  8021. Sub Click(Source As Button)
  8022.      
  8023.      Dim docLocal As NotesDocument
  8024.      Dim docCollection As NotesDocumentCollection     
  8025.      Set docCollection = db.UnprocessedDocuments
  8026.      If (docCollection.Count = 0) Then
  8027.           Msgbox "You must select a document.",16,"Error"
  8028.           Exit Sub
  8029.      End If
  8030.      Set docLocal = docCollection.GetFirstDocument
  8031.      OpenSearchSite docLocal
  8032. End Sub
  8033. $IndexY
  8034.     0S0E
  8035. _Forward
  8036. Sh_are... '++LotusScript Development Environment:2:5:(Options):0:66
  8037. '++LotusScript Development Environment:2:5:(Forward):0:1
  8038. Declare Sub Click(Source As Button)
  8039. Declare Function GetInternetProfile
  8040. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8041. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8042. Private Sub BindEvents(Byval Objectname_ As String)
  8043.      Static Source As BUTTON
  8044.      Set Source = Bind(Objectname_)
  8045.      On Event Click From Source Call Click
  8046. End Sub
  8047. '++LotusScript Development Environment:2:2:Click:1:12
  8048. Sub Click(Source As Button)
  8049.      
  8050.      Dim docLocal As NotesDocument
  8051.      Dim webdoc As notesdocument
  8052.      Dim docCollection As NotesDocumentCollection     
  8053.      Set docCollection = db.UnprocessedDocuments
  8054.      If (docCollection.Count = 0) Then
  8055.           Msgbox "You must select a document.",16,"Error"
  8056.           Exit Sub
  8057.      End If
  8058.      Set docLocal = docCollection.GetFirstDocument
  8059.      If docLocal.hasitem("URL") Then
  8060.           docLocal.tmpWebServer  = docProfile.WebServer
  8061.           docLocal.tmpWebDb = docProfile.WebDatabase
  8062.           docLocal.Save True, True
  8063.           If (w.DialogBox("ShareWebPage", True, True, False, False, False, False, "Share Options", doclocal)) Then
  8064.                docLocal.Save True, True
  8065.                Select Case docLocal.SharedOptions(0)
  8066.                'case 1 was previously forward bookmark.  That's now done off of the forward option
  8067.                Case "2" : 'user wants to copy this to the shared web database
  8068.                     If docLocal.Form(0) = "WebBrowserForm" Then
  8069.                          CopyDocumentToSharedDatabase docLocal, browserobject.locationurl
  8070.                     Else
  8071.                          CopyDocumentToSharedDatabase docLocal, docLocal.url(0)
  8072.                     End If
  8073.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  8074.                     If docLocal.Form(0) = "WebBrowserForm" Then
  8075.                          CreateRatingDocument docLocal, browserobject.locationurl,browserobject.locationname
  8076.                     Else
  8077.                          CreateRatingDocument docLocal,docLocal.url(0),docLocal.title(0)
  8078.                     End If
  8079.                End Select
  8080.           'remove any remaining fields that don't need to be carried around
  8081.                docLocal.removeItem "ForwardTo"
  8082.                docLocal.RemoveItem "SharedOptions" 
  8083.                docLocal.RemoveItem "Rating"
  8084.                docLocal.removeItem "Content"
  8085.                docLocal.removeItem "Comments"
  8086.           End If     
  8087.           docLocal.RemoveItem "tmpWebServer"
  8088.           docLocal.RemoveItem "tmpWebDb"
  8089.           docLocal.Save True, True
  8090.      Else
  8091.           Msgbox "This document does not contain a URL."
  8092.      End If
  8093. End Sub
  8094. '++LotusScript Development Environment:2:1:GetInternetProfile:1:8
  8095. Function GetInternetProfile
  8096.          'we need to get the profile document to make sure this is feasible and to get the location of the shared db
  8097.      Set view = db.getView("(Internet Profile)")
  8098.      Set GetInternetProfile = view.GetFirstDocument
  8099. End Function
  8100. Internet Profiles
  8101. Internet Options
  8102. WebServer
  8103.     0S0E
  8104. Categori_zes
  8105. _Edit Document
  8106. Send Docu_ment    
  8107. _Move to Folder...
  8108. Move Page to Folder... 
  8109.     0S0E
  8110. _Remove from Folder...
  8111. _Reduce to Bookmarku'++LotusScript Development Environment:2:5:(Options):0:66
  8112. '++LotusScript Development Environment:2:5:(Forward):0:1
  8113. Declare Sub Click(Source As Button)
  8114. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8115. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8116. Private Sub BindEvents(Byval Objectname_ As String)
  8117.      Static Source As BUTTON
  8118.      Set Source = Bind(Objectname_)
  8119.      On Event Click From Source Call Click
  8120. End Sub
  8121. '++LotusScript Development Environment:2:2:Click:1:12
  8122. Sub Click(Source As Button)
  8123.      
  8124.      Dim docCollection As NotesDocumentCollection
  8125.      Dim docLocal As NotesDocument
  8126.      
  8127.      Set docCollection = db.UnprocessedDocuments
  8128.      If (docCollection.Count = 0) Then
  8129.           Msgbox "You must select a document.",16,"Error"
  8130.           Exit Sub
  8131.      End If
  8132.      Set docLocal = docCollection.GetFirstDocument
  8133.      While Not (docLocal Is Nothing)
  8134.           RemoveObjects docLocal
  8135.           ReduceToLink docLocal
  8136.           Set docLocal = docCollection.GetNextDocument(docLocal)
  8137.      Wend
  8138. End Sub
  8139. Import Microsoft Favorites...s'++LotusScript Development Environment:2:5:(Options):0:66
  8140. '++LotusScript Development Environment:2:5:(Forward):0:1
  8141. Declare Sub Click(Source As Button)
  8142. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8143. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8144. Private Sub BindEvents(Byval Objectname_ As String)
  8145.      Static Source As BUTTON
  8146.      Set Source = Bind(Objectname_)
  8147.      On Event Click From Source Call Click
  8148. End Sub
  8149. '++LotusScript Development Environment:2:2:Click:1:12
  8150. Sub Click(Source As Button)
  8151.      
  8152.      ImportFavorites
  8153. End Sub
  8154. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  8155. '++LotusScript Development Environment:2:5:(Forward):0:1
  8156. Declare Sub Click(Source As Button)
  8157. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8158. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8159. Private Sub BindEvents(Byval Objectname_ As String)
  8160.      Static Source As BUTTON
  8161.      Set Source = Bind(Objectname_)
  8162.      On Event Click From Source Call Click
  8163. End Sub
  8164. '++LotusScript Development Environment:2:2:Click:1:12
  8165. Sub Click(Source As Button)
  8166.      
  8167.      ImportBookmarks
  8168. End Sub
  8169. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  8170. '++LotusScript Development Environment:2:5:(Forward):0:1
  8171. Declare Sub Click(Source As Button)
  8172. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8173. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8174. Private Sub BindEvents(Byval Objectname_ As String)
  8175.      Static Source As BUTTON
  8176.      Set Source = Bind(Objectname_)
  8177.      On Event Click From Source Call Click
  8178. End Sub
  8179. '++LotusScript Development Environment:2:2:Click:1:12
  8180. Sub Click(Source As Button)
  8181.      
  8182.      Dim docLocal As NotesDocument
  8183.      Dim docCollection As NotesDocumentCollection     
  8184.      Set docCollection = db.UnprocessedDocuments
  8185.      If (docCollection.Count = 0) Then
  8186.           Msgbox "You must select a document.",16,"Error"
  8187.           Exit Sub
  8188.      Else
  8189.           For j = 1 To docCollection.Count
  8190.                Set docLocal = docCollection.getnthdocument(j)               
  8191.                If (w.dialogbox ("Forward", True, True, False, False, False, False, " Forward Options", docLocal)) Then   
  8192.                     Select Case docLocal.ForwardOptions(0)
  8193.                     Case "1" : 'user wants to forward the URL only
  8194.                          Call CreateIELink(doclocal.url(0), doclocal.title(0))
  8195.                     Case "2" : 'user wants to send entire page
  8196.                          Call  ViewForward(docLocal)
  8197.                     End Select
  8198.           'remove any remaining fields that don't need to be carried around
  8199.                     docLocal.RemoveItem "ForwardOptions" 
  8200.                     docLocal.save True, False
  8201.                     
  8202.                End If
  8203.                Exit Sub
  8204.           Next
  8205.      End If
  8206.      Exit Sub
  8207. End Sub
  8208. '++LotusScript Development Environment:2:5:(Options):0:74
  8209. Option Public
  8210. Use "InternetFunctions"
  8211. '++LotusScript Development Environment:2:5:(Forward):0:1
  8212. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8213. '++LotusScript Development Environment:2:5:(Options):0:66
  8214. '++LotusScript Development Environment:2:5:(Forward):0:1
  8215. Declare Sub Postopen(Source As Notesuiview)
  8216. Declare Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  8217. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8218. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8219. Private Sub BindEvents(Byval Objectname_ As String)
  8220.      Static Source As NOTESUIVIEW
  8221.      Set Source = Bind(Objectname_)
  8222.      On Event Postopen From Source Call Postopen
  8223.      On Event Queryaddtofolder From Source Call Queryaddtofolder
  8224. End Sub
  8225. '++LotusScript Development Environment:2:2:Postopen:1:12
  8226. Sub Postopen(Source As Notesuiview)
  8227.      InstantiateObjects
  8228. End Sub
  8229. '++LotusScript Development Environment:2:2:Queryaddtofolder:1:12
  8230. Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
  8231.      Call MoveToFolder(source,target,continue)
  8232. End Sub
  8233. O=Lotus Notes
  8234. O=Lotus Notes
  8235. PURSAFO
  8236. |.:#U
  8237. O=Lotus Notes
  8238. CN=Lotus Notes Template Development/O=Lotus Notes
  8239. PURSAFO
  8240. "n.8%'D^
  8241. $TITLE
  8242. $Index
  8243. $Formula
  8244. $FormulaClass
  8245. $VIEWFORMAT
  8246. $FormFormula
  8247. $Comment
  8248. $ACTIONS
  8249. $ViewGlobalScript
  8250. $ViewScript
  8251. Using Page Minder: Keeping track of changes to Web pages (Personal Web Navigator)
  8252.     You can run a background agent called Page Minder that closely watches a particular Web page and notifies you when the contents of that page change.
  8253.     Note
  8254.       Page Minder only runs while your Notes workstation is running.
  8255.     Enabling the Page Minder agent
  8256.     To enable the Page Minder agent (you only need to do this once):
  8257.       1.    Choose File - Tools - User Preferences and select "Enable scheduled local agents."
  8258.       2.    Open the Personal Web Navigator database and choose Actions - Internet Options.
  8259.       3.    Click the Enable Page Minder button next to the agent. 
  8260.       4.    In the "Choose Server To Run On" dialog box, choose Local and click OK. (This dialog box only appears if you have not yet enabled the agent in this database.)
  8261.     Running the Page Minder agent
  8262.     To run Page Minder on a Web page:
  8263.       1.    Choose Actions - Internet Options.
  8264.       2.    In the Page Minder agent preferences section, fill out these fields:
  8265.     Search for updates every -- Choose how often you want the agent to check to see if the page contents have changed.  You can choose Hour, 4 Hours, Day, or Week.
  8266.     When updates are found -- Specify how you want to be alerted that the page changed.  Choose "Send me a summary" to send a message notifying you that the page has changed.  Choose "Send me the actual page" to send the newly updated Web page.
  8267.     Send to -- Specify the name of the person to alert when the page content changes.
  8268.       3.    Exit and save your changes.
  8269.       4.    Select any Web page and drag it into the Page Minder folder.
  8270.     The Page Minder agent runs based on the times you selected in the Internet Options document.
  8271.     Note
  8272.       You can run the Page Minder agent on pages from authenticated servers where you are required to supply a username and password before you can gain access to the page. Similarly, you can run the agent through an authenticated proxy server where you have to supply a username and password to gain access to the Internet. As long as you have successfully retrieved the page during your current Notes session, Notes stores your username and password in a field on the Web page and pulls it from there when it runs the agent.  For security purposes, if you run this agent on authenticated servers or through authenticated proxy servers, you should encrypt your database so that the field is not visible to others.
  8273. Using Web Ahead: Automatically following links on Web pages (Personal Web Navigator)
  8274.     Web pages usually contain URLs that point to other Web pages. You can run a background agent called Web Ahead that retrieves all the Web pages specified by the URLs on a particular Web page and saves all the resulting Web pages in your database for you to read later. You can set the agent to retrieve the URLs several levels down from the page you specify. 
  8275.     Note
  8276.       Web Ahead only runs while your Notes workstation is running.
  8277.     Enabling the Web Ahead agent
  8278.     To enable the Web Ahead agent (you only need to do this once):
  8279.       1.    Choose File - Tools - User Preferences and select "Enable scheduled local agents."
  8280.       2.    Open the Personal Web Navigator database and choose Actions - Internet Options.
  8281.       3.    Click the Enable Web Ahead button next to the agent. 
  8282.       4.    In the "Choose Server To Run On" dialog box, choose Local and click OK. (This dialog box only appears if you have not yet enabled the agent in this database.)
  8283.     Running the Web Ahead agent
  8284.     To run Web Ahead on a Web page:
  8285.       1.    Choose Actions - Internet Options.
  8286.       2.    In the Web Ahead agent preferences section, enter the number of levels of pages you want the agent to retrieve.
  8287.       3.    Exit and save your changes.
  8288.       4.    Select any Web page and drag it into the Web Ahead folder.
  8289.     The Web Ahead agent runs every half hour.
  8290.     Note
  8291.       You can run the Web Ahead agent on pages from authenticated servers where you are required to supply a username and password before you can gain access to the page. Similarly, you can run the agent through an authenticated proxy server where you have to supply a username and password to gain access to the Internet. As long as you have successfully retrieved the page during your current Notes session, Notes stores your username and password in a field on the Web page and pulls it from there when it runs the agent.  For security purposes, if you run this agent on authenticated servers or through authenticated proxy servers, you should encrypt your database so that the field is not visible to others.
  8292. $UpdatedBy$ACLDigest$Signature$Name$DesignVersion$Version$Formula$FormulaClass$Collation$TITLE$INFO$FlagsURLDoclink$FIELDS$BODY$Fonts$TemplateModTime$TemplateServerName$TemplateFileName$DefaultNavigator$FlagsNoRefreshIconBitmap$SCRIPTOBJ_12$SCRIPTOBJ_11$Index$Collation1$Collation2$Collation3$VIEWFORMAT$FormFormula$Comment$ACTIONS$SCRIPTOBJ_6$SCRIPTOBJ_7$SCRIPTOBJ_8$SCRIPTOBJ_9$SCRIPTOBJ_10$ViewGlobalScript$ViewGlobalScript_O$ViewScript$ViewScript_O$WINDOWTITLE$Script$$Script_O$$ScriptName$$FormScript$$$FormScript_O$$StartUpOptions$StartUpOptions_O$$OpenURL$OpenURL_O$$ScanAhead$ScanAhead_O$$PreferredSearchEngine$PreferredSearchEngine_O$$$Script1$$Script1_OStartUpOptionsOpenURLReduceNumDaysReduceNumMBWebDatabaseAnchor_styleBodyFixedPlainAddressListingSearchFrequencyUpdatesFoundOptionsSendMailToScanAheadPreferredSearchEngineSearchURLReduceDaysReduceSizeWebServerKeepPageSaveHTML$Script1$V5ACTIONS$Collation4$Totals$DBScript$DBScript_O$PublicAccessTitleURLContentCommentsSharedOptionstmpWebServertmpWebDbRatingbookmarkfileCounter$Hotspot0_OCreatedExpirationPrivacy_flagsOriginal_DateLast_Modified$$XMB_2$$XMB_3$SCRIPTOBJ_21$SCRIPTOBJ_20$SCRIPTOBJ_16$SCRIPTOBJ_17HTTPStatusTypeHostFileNameSaveOptionsSubject$SCRIPTOBJ_0$SCRIPTOBJ_2$SCRIPTOBJ_4$SCRIPTOBJ_19$SCRIPTOBJ_18$SCRIPTOBJ_1$SCRIPTOBJ_3$SCRIPTOBJ_5$SCRIPTOBJ_13$SCRIPTOBJ_14$SCRIPTOBJ_15$FolderObject$FolderIDTableForwardOptions$FILE$SCRIPTOBJ_26$SCRIPTOBJ_22$SCRIPTOBJ_23$SCRIPTOBJ_24$SCRIPTOBJ_25$OLEOBJINFO$OLEPreviewActivate$$XMB$Licensee$AssistType$AssistLastRun$AssistDocCount$AssistFlags$AssistTrigger$AssistInfo$AssistQuery$AssistAction$AssistAction_Ex$AssistRunInfo$AssistVersion$ScriptLib$ScriptLib_O$Type$Operation$Scan$LeftToDoFORMbookmark$Revisionshome
  8293. '++LotusScript Development Environment:2:5:(Options):0:66
  8294. '++LotusScript Development Environment:2:5:(Forward):0:1
  8295. Declare Sub Initialize
  8296. Declare Sub Beforenavigate2(Source As Webbrowser, Pdisp As Variant, Url As Variant, Flags As Variant, Targetframename As Variant, Postdata As Variant, Headers As Variant, Cancel As Integer)
  8297. Declare Sub Statustextchange(Source As Webbrowser, Text As String)
  8298. Declare Sub Progresschange(Source As Webbrowser, Progress As Long, Progressmax As Long)
  8299. Declare Sub Downloadbegin(Source As Webbrowser)
  8300. Declare Sub Downloadcomplete(Source As Webbrowser)
  8301. Declare Sub Titlechange(Source As Webbrowser, Text As String)
  8302. Declare Sub Navigatecomplete2(Source As Webbrowser, Pdisp As Variant, Url As Variant)
  8303. Declare Sub Newwindow2(Source As Webbrowser, Ppdisp As Variant, Cancel As Integer)
  8304. '++LotusScript Development Environment:2:5:(Declarations):0:10
  8305. Dim WebDatabase As notesdatabase
  8306. Dim datadoc As notesdocument
  8307. Dim Session As notessession
  8308. Dim DocNoteID As notesdocument
  8309. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8310. Private Sub BindEvents(Byval Objectname_ As String)
  8311.      Static Source As WEBBROWSER
  8312.      Set Source = Bind(Objectname_)
  8313.      On Event Beforenavigate2 From Source Call Beforenavigate2
  8314.      On Event Statustextchange From Source Call Statustextchange
  8315.      On Event Progresschange From Source Call Progresschange
  8316.      On Event Downloadbegin From Source Call Downloadbegin
  8317.      On Event Downloadcomplete From Source Call Downloadcomplete
  8318.      On Event Titlechange From Source Call Titlechange
  8319.      On Event Navigatecomplete2 From Source Call Navigatecomplete2
  8320.      On Event Newwindow2 From Source Call Newwindow2
  8321. End Sub
  8322. '++LotusScript Development Environment:2:2:Initialize:1:10
  8323. Sub Initialize
  8324.      '*
  8325.      '*  Initialize  Variables and declare local variables
  8326.      '*
  8327.      Dim InterNetProfile As Notesdocument
  8328.      Dim ProfileView As notesview
  8329.      Dim URL As Variant
  8330.      
  8331.      Set Session = New NotesSession
  8332.      Set WebDatabase = Session.CurrentDatabase
  8333. End Sub
  8334. '++LotusScript Development Environment:2:2:Beforenavigate2:1:12
  8335. Sub Beforenavigate2(Source As Webbrowser, Pdisp As Variant, Url As Variant, Flags As Variant, Targetframename As Variant, Postdata As Variant, Headers As Variant, Cancel As Integer)
  8336.         '    A navigation has requested a new window be opened
  8337.      ' we'll take care of everything and tell the caller we opened a new window
  8338.      ' otherwise the IE application starts up in a new window
  8339.      
  8340.      On Error 213 Resume Next
  8341.      
  8342.      If uidoc.inpreviewpane And firstnavigatedone Then
  8343.           If Instr(parseURL(url(0)), "mailto") =0 Then
  8344.                Dim iedoc As New notesdocument(db)
  8345.                Dim newuidoc As NotesUIDocument
  8346.                Call iedoc.replaceitemvalue("Form", "WebBrowser4Form")
  8347.                Call iedoc.replaceitemvalue("SaveOptions", "1")
  8348.                Call iedoc.replaceitemvalue("$ShowNavigationBar", "1")
  8349.                Call iedoc.replaceitemvalue("$NavigateToURL", Url)
  8350.                Call ieDoc.save(True,False)
  8351.                Call w.viewrefresh
  8352.                Call w.editdocument(False, iedoc) 
  8353.                Set newuidoc = w.currentdocument        
  8354.                Set browserobject=newuidoc.GetObject("Browser")
  8355.                browserobject.Navigate2 (Url), (Flags), (Targetframename), (Postdata), (Headers) 
  8356.                Cancel = True
  8357.           Else
  8358.                browserobject.Navigate2 (Url), (Flags), (Targetframename), (Postdata), (Headers)
  8359.           End If
  8360.      End If       
  8361. End Sub
  8362. '++LotusScript Development Environment:2:2:Statustextchange:1:12
  8363. Sub Statustextchange(Source As Webbrowser, Text As String)
  8364.      Print "   " & Text 
  8365. End Sub
  8366. '++LotusScript Development Environment:2:2:Progresschange:1:12
  8367. Sub Progresschange(Source As Webbrowser, Progress As Long, Progressmax As Long)
  8368.      Dim percent As Long
  8369.      If progress = -1 Then
  8370.           Print "   Done"
  8371.      Else  
  8372.           If ProgressMax > 0 Then
  8373.                percent = (Progress * 100) / Progressmax
  8374.                If percent > 0 Then
  8375.                     Print "   " & percent & " %  complete"
  8376.                End If
  8377.           Else
  8378.                If progress >0 Then 
  8379.                     Print "   " & progress & " bytes read"
  8380.                End If 
  8381.           End If
  8382.      End If
  8383. End Sub
  8384. '++LotusScript Development Environment:2:2:Downloadbegin:1:12
  8385. Sub Downloadbegin(Source As Webbrowser)
  8386.       '   Start Animation...
  8387.      uidoc.Navbarspinnerstart
  8388. End Sub
  8389. '++LotusScript Development Environment:2:2:Downloadcomplete:1:12
  8390. Sub Downloadcomplete(Source As Webbrowser)
  8391.        '   Stop Animation...
  8392.      uidoc.Navbarspinnerstop
  8393.      
  8394. End Sub
  8395. '++LotusScript Development Environment:2:2:Titlechange:1:12
  8396. Sub Titlechange(Source As Webbrowser, Text As String)
  8397.      Dim NavBarURL As String
  8398. '    Ask the browser object for the current URL     
  8399.      NavBarURL = browserobject.LocationURL     
  8400. '    Set the Text in the Nav bar and the window title
  8401.      uidoc.NavBarSetText NavBarURL, Text
  8402. End Sub
  8403. '++LotusScript Development Environment:2:2:Navigatecomplete2:1:12
  8404. Sub Navigatecomplete2(Source As Webbrowser, Pdisp As Variant, Url As Variant)
  8405.      Dim nulldoc As notesdocument
  8406.      'Error 213 is OLEException Error in lserr.lss
  8407.      On Error 213 Goto ErrorRoutine
  8408.      
  8409.      If url <>"" Then
  8410.      ' Set the URL in the Navigation Bar URL field
  8411.           uidoc.NavBarSetText Url
  8412.           If docprofile Is Nothing Then 
  8413.                'This will happen if the user is opening the database for the first time therefore the dbopen script has not been
  8414.                'executed.  Go ahead and retrieve the document because keeppage is on automatically.
  8415.                Set   nulldoc = db.getdocumentbyurl (url, True, False, Empty$, Empty$, Empty$, Empty$,Empty$, True)
  8416.                Exit Sub
  8417.           End If
  8418.           If docprofile.keeppage(0) = "0" Then
  8419.                 ' Request the URL to be retrieved but don't wait for it to come in
  8420.               ' Print "(DEBUG) - Queue request for: " + url
  8421.                Set   nulldoc = db.getdocumentbyurl (url, True, False, Empty$, Empty$, Empty$, Empty$,Empty$, True)
  8422.           End If
  8423.           
  8424.      End If
  8425.      
  8426.      Exit Sub
  8427. ErrorRoutine:
  8428.      Print "Error:  Accessing web browser control ErrOLEException("& Err & ")"
  8429.      Resume Next
  8430. End Sub
  8431. '++LotusScript Development Environment:2:2:Newwindow2:1:12
  8432. Sub Newwindow2(Source As Webbrowser, Ppdisp As Variant, Cancel As Integer)
  8433.      
  8434. End Sub
  8435. Lotus Product
  8436. Notes Web Browsing with IE 4
  8437.     0S0E
  8438. '++LotusScript Development Environment:2:5:(Options):0:74
  8439. Option Public
  8440. Use "InternetFunctions"
  8441. '++LotusScript Development Environment:2:5:(Forward):0:1
  8442. Declare Sub InstantiateWebBrowserFormObjects
  8443. '++LotusScript Development Environment:2:5:(Declarations):0:10
  8444. 'Global Form Variables
  8445. Dim uidoc As notesuidocument
  8446. Dim doc As notesdocument
  8447. Dim browserobject As Variant
  8448. '++LotusScript Development Environment:2:2:InstantiateWebBrowserFormObjects:1:8
  8449. Sub InstantiateWebBrowserFormObjects
  8450.     InstantiateObjects
  8451. End Sub
  8452. Lotus Product
  8453. WebBrowser4Form'++LotusScript Development Environment:2:5:(Options):0:66
  8454. '++LotusScript Development Environment:2:5:(Forward):0:1
  8455. Declare Sub Postopen(Source As Notesuidocument)
  8456. Declare Sub Queryclose(Source As Notesuidocument, Continue As Variant)
  8457. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8458. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8459. Private Sub BindEvents(Byval Objectname_ As String)
  8460.     Static Source As NOTESUIDOCUMENT
  8461.     Set Source = Bind(Objectname_)
  8462.     On Event Postopen From Source Call Postopen
  8463.     On Event Queryclose From Source Call Queryclose
  8464. End Sub
  8465. '++LotusScript Development Environment:2:2:Postopen:1:12
  8466. Sub Postopen(Source As Notesuidocument)
  8467.     InstantiateWebBrowserFormObjects
  8468.     Set uidoc = source 
  8469.     Set doc = uidoc.Document     
  8470.     Set browserobject=uidoc.GetObject("Browser")
  8471.     If docprofile Is Nothing Then
  8472.         Set docprofile = New NotesDocument(db)
  8473.         docprofile.Form = "Admin"
  8474.         docprofile.StartUpOptions = "1"
  8475.         docprofile.OpenURL = "http://notes.net/welcome.nsf"
  8476.         docprofile.PreferredSearchEngine = "4"
  8477.         docprofile.SearchURL="http://www.search.com/"
  8478.         docprofile.ScanAhead = "1"
  8479.         docprofile.SearchFrequency = "2"
  8480.         docprofile.UpdatesFoundOptions = "1"
  8481.         docprofile.SendMailTo = session.UserName
  8482.         docprofile.ReduceDays = "2"
  8483.         docprofile.KeepPage = "0"
  8484.         docprofile.Save True, True
  8485.     End If
  8486.     uidoc.refreshhideformulas
  8487.            ' Make sure there is a URL field and it's not empty before we try to
  8488.           ' navigate there
  8489.     If doc.hasitem("URL")   And doc.URL(0) <> "" Then
  8490.               ' Print "Postopen Navigating to " + doc.URL(0)
  8491.         browserobject.navigate2 (doc.url(0))
  8492.         If source.inpreviewpane Then
  8493.             firstnavigatedone = True
  8494.         End If
  8495.     End If    
  8496. End Sub
  8497. '++LotusScript Development Environment:2:2:Queryclose:1:12
  8498. Sub Queryclose(Source As Notesuidocument, Continue As Variant)
  8499.     FirstNavigateDone = False
  8500. End Sub
  8501. Lotus Product
  8502. OBJECT
  8503. EXT11761Shell.Explorer.2
  8504. $OLEPreviewActivate
  8505. SaveOptions
  8506. '++LotusScript Development Environment:2:5:(Options):0:66
  8507. '++LotusScript Development Environment:2:5:(Forward):0:1
  8508. Declare Sub Click(Source As Button)
  8509. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8510. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8511. Private Sub BindEvents(Byval Objectname_ As String)
  8512.      Static Source As BUTTON
  8513.      Set Source = Bind(Objectname_)
  8514.      On Event Click From Source Call Click
  8515. End Sub
  8516. '++LotusScript Development Environment:2:2:Click:1:12
  8517. Sub Click(Source As Button)
  8518.      
  8519.      InstantiateWebBrowserFormObjects
  8520.      If docprofile.OpenURL(0) <> "" Then
  8521.           browserobject.GoHome
  8522.      Else
  8523.           Msgbox "Home page is not specified in your Internet Options.  "  _
  8524.           + "Please select Actions - Internet Options to specify a home page. " , 16,"Open Home Page"    
  8525.      End If
  8526. End Sub
  8527. _ReloadK'++LotusScript Development Environment:2:5:(Options):0:66
  8528. '++LotusScript Development Environment:2:5:(Forward):0:1
  8529. Declare Sub Click(Source As Button)
  8530. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8531. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8532. Private Sub BindEvents(Byval Objectname_ As String)
  8533.      Static Source As BUTTON
  8534.      Set Source = Bind(Objectname_)
  8535.      On Event Click From Source Call Click
  8536. End Sub
  8537. '++LotusScript Development Environment:2:2:Click:1:12
  8538. Sub Click(Source As Button)
  8539.      
  8540.      InstantiateWebBrowserFormObjects
  8541.      browserobject.Refresh2
  8542. End Sub
  8543. Bookmark...K'++LotusScript Development Environment:2:5:(Options):0:66
  8544. '++LotusScript Development Environment:2:5:(Forward):0:1
  8545. Declare Sub Click(Source As Button)
  8546. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8547. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8548. Private Sub BindEvents(Byval Objectname_ As String)
  8549.      Static Source As BUTTON
  8550.      Set Source = Bind(Objectname_)
  8551.      On Event Click From Source Call Click
  8552. End Sub
  8553. '++LotusScript Development Environment:2:2:Click:1:12
  8554. Sub Click(Source As Button)
  8555.      
  8556.      If w.dialogbox("BookmarkSelect", True, True, False, False, False, False, "Select a Folder") Then
  8557.           InstantiateWebBrowserFormObjects
  8558.           Dim bookmark As New notesdocument(db)
  8559.           Dim folder As String
  8560.           Dim webdoc As notesdocument
  8561.           Set webdoc = db.getdocumentbyurl(browserobject.locationurl)
  8562.           If doc.hasitem("Folders") And doc.hasitem("NewFolderName") Then
  8563.                If doc.newfoldername(0) <>"" Then
  8564.                     bookmark.bookmark = "1"
  8565.                     bookmark.title = webdoc.title(0)
  8566.                     bookmark.url = webdoc.url(0)
  8567.                     bookmark.save True, False
  8568.                     bookmark.putinfolder(doc.folders(0)&"\"&doc.newfoldername(0))
  8569.                Else
  8570.                     bookmark.bookmark = "1"
  8571.                     bookmark.title = webdoc.title(0)
  8572.                     bookmark.url = webdoc.url(0)
  8573.                     bookmark.save True, False
  8574.                     bookmark.putinfolder(doc.folders(0))
  8575.                End If
  8576.           End If          
  8577.           'Cleanup the fields put on by dialogbox
  8578.           doc.removeitem("folders")
  8579.           doc.removeitem("newfoldername")
  8580.           doc.save True, False
  8581.      End If
  8582. End Sub
  8583. Keep Page
  8584. '++LotusScript Development Environment:2:5:(Options):0:66
  8585. '++LotusScript Development Environment:2:5:(Forward):0:1
  8586. Declare Sub Click(Source As Button)
  8587. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8588. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8589. Private Sub BindEvents(Byval Objectname_ As String)
  8590.      Static Source As BUTTON
  8591.      Set Source = Bind(Objectname_)
  8592.      On Event Click From Source Call Click
  8593. End Sub
  8594. '++LotusScript Development Environment:2:2:Click:1:12
  8595. Sub Click(Source As Button)
  8596.      
  8597.      On Error Resume Next
  8598.      InstantiateWebBrowserFormObjects
  8599.      Dim nulldoc As notesdocument
  8600.      Dim url As String
  8601.      url = browserobject.locationURL
  8602.      If  url <>"" Then
  8603.           ' Request the URL to be retrieved but don't wait for it to come in
  8604.           Print "(DEBUG) - Queue request for: " + url
  8605.           Set   nulldoc = db.getdocumentbyurl (url, True, False, Empty$, Empty$, Empty$, Empty$,Empty$, True)
  8606.      End If
  8607.      uidoc.refreshhideformulas
  8608. End Sub
  8609. (Internet Profile)
  8610. Internet Options
  8611. keeppage
  8612.     0S0E
  8613. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  8614. '++LotusScript Development Environment:2:5:(Forward):0:1
  8615. Declare Sub Click(Source As Button)
  8616. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8617. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8618. Private Sub BindEvents(Byval Objectname_ As String)
  8619.      Static Source As BUTTON
  8620.      Set Source = Bind(Objectname_)
  8621.      On Event Click From Source Call Click
  8622. End Sub
  8623. '++LotusScript Development Environment:2:2:Click:1:12
  8624. Sub Click(Source As Button)
  8625.      
  8626.      InstantiateWebBrowserFormObjects
  8627.      Call IEForwardNote(doc,Browserobject)
  8628. End Sub
  8629. Print... 
  8630.     0S0E
  8631. Share...'++LotusScript Development Environment:2:5:(Options):0:66
  8632. '++LotusScript Development Environment:2:5:(Forward):0:1
  8633. Declare Sub Click(Source As Button)
  8634. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8635. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8636. Private Sub BindEvents(Byval Objectname_ As String)
  8637.      Static Source As BUTTON
  8638.      Set Source = Bind(Objectname_)
  8639.      On Event Click From Source Call Click
  8640. End Sub
  8641. '++LotusScript Development Environment:2:2:Click:1:12
  8642. Sub Click(Source As Button)
  8643.      
  8644.      InstantiateWebBrowserFormObjects
  8645.      If doc.form(0) <> "HelpForm" Then
  8646.           
  8647.           doc.url=browserobject.locationurl
  8648.           doc.title=browserobject.locationname
  8649.           
  8650.           If (docProfile Is Nothing) Then
  8651.                Msgbox "You need to specify a Web Server and Web Database to share pages with. Choose Actions - Internet Options from the menu."
  8652.                Exit Sub 
  8653.           End If
  8654.           doc.tmpWebServer  = docProfile.WebServer
  8655.           doc.tmpWebDb = docProfile.WebDatabase
  8656.       'first, display a prompt to get user input
  8657.           If (w.DialogBox("ShareWebPage",True,True,"Share Options")) Then
  8658.               'determine which action we need to take
  8659.                Select Case doc.SharedOptions(0)
  8660.                     
  8661.                Case "2" : 'user wants to copy this to the shared web database
  8662.                     If getcurrentlocation="3" Then
  8663.                          CopyDocumentToSharedDatabase doc, browserobject.locationurl
  8664.                     Else
  8665.                          CopyDocumentToSharedDatabase doc, doc.url(0)
  8666.                     End If
  8667.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  8668.                     If getcurrentlocation="3" Then
  8669.                          CreateRatingDocument doc, browserobject.locationurl, browserobject.Locationname
  8670.                     Else
  8671.                          CreateRatingDocument doc,doc.url(0), doc.title(0)
  8672.                     End If
  8673.                End Select
  8674.           'remove any remaining fields that don't need to be carried around
  8675.                doc.removeItem "ForwardTo"
  8676.                doc.RemoveItem "SharedOptions" 
  8677.                doc.removeItem "ForwardTo"
  8678.                doc.RemoveItem "SharedOptions" 
  8679.                doc.RemoveItem "Rating"
  8680.                doc.removeItem "Content"
  8681.                doc.removeItem "Comments"
  8682.                doc.RemoveItem "tmpWebServer"
  8683.                doc.RemoveItem "tmpWebDb"
  8684.                doc.Save True,True          
  8685.           End If
  8686.      Else
  8687.           Msgbox "This document is a help document."
  8688.      End If
  8689. End Sub
  8690. Internet Profiles
  8691. Internet Options
  8692. webserver
  8693.     12S13S
  8694. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  8695. '++LotusScript Development Environment:2:5:(Forward):0:1
  8696. Declare Sub Click(Source As Button)
  8697. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8698. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8699. Private Sub BindEvents(Byval Objectname_ As String)
  8700.      Static Source As BUTTON
  8701.      Set Source = Bind(Objectname_)
  8702.      On Event Click From Source Call Click
  8703. End Sub
  8704. '++LotusScript Development Environment:2:2:Click:1:12
  8705. Sub Click(Source As Button)
  8706.      
  8707.      InstantiateWebBrowserFormObjects
  8708.      Dim webdoc As notesdocument
  8709.      Dim noteid As String
  8710.      noteid = ""
  8711.      
  8712.      Response = Msgbox ("This will permanently delete the selected page from the database.  Do you want to continue?", 20, "Delete Document")
  8713.      If Response = 6 Then    
  8714.           uidoc.close
  8715.           Set webdoc=db.getdocumentbyurl(doc.url(0))
  8716.           Call RemoveObjects(webdoc)
  8717.          ' webdoc.Remove True
  8718.           
  8719.           If doc.isuidocopen Then
  8720.                noteid = doc.noteid             
  8721.                Delete doc
  8722.                Set doc = db.getdocumentbyid (noteid) 
  8723.                doc.remove True
  8724.                w.viewrefresh  
  8725.                w.viewrefresh
  8726.           Else
  8727.                doc.Remove True 
  8728.           End If
  8729.           
  8730.           w.viewrefresh
  8731.           
  8732.           
  8733.           
  8734.      End If
  8735.      
  8736. End Sub
  8737. $ControlURLNavigateK'++LotusScript Development Environment:2:5:(Options):0:66
  8738. '++LotusScript Development Environment:2:5:(Forward):0:1
  8739. Declare Sub Click(Source As Button)
  8740. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8741. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8742. Private Sub BindEvents(Byval Objectname_ As String)
  8743.      Static Source As BUTTON
  8744.      Set Source = Bind(Objectname_)
  8745.      On Event Click From Source Call Click
  8746. End Sub
  8747. '++LotusScript Development Environment:2:2:Click:1:12
  8748. Sub Click(Source As Button)
  8749.      
  8750.      InstantiateWebBrowserFormObjects
  8751.      Dim URL As Variant
  8752.      Dim Reload As Variant
  8753.      Dim Flags As Integer
  8754.      Dim TmpUrl As String
  8755.      
  8756.      URL = doc.GetitemValue("$NavigateToURL")
  8757.      Reload = doc.GetItemValue("$ReloadRefresh")
  8758.      Flags =Val (Reload(0))
  8759.      On Error 213  Resume Next
  8760.      
  8761.      TmpUrl=browserobject.LocationURL
  8762.      
  8763.      If Flags = 1 Then
  8764.           Flags = 4
  8765.      End If
  8766.      
  8767.      
  8768.      If URL(0) <> "" Then
  8769.           If URL(0) = TmpUrl Then
  8770.               ' Print "Refreshing " + Url(0)
  8771.                browserobject.Refresh     
  8772.           Else
  8773.              '  Print "Attempting " + URL(0) + " Flags = "+ Str(Flags)
  8774.                browserobject.Navigate2 (URL(0)), (Flags)
  8775.                
  8776.           ' Once navigation is done delete the item form the form
  8777.                doc.REMOVEITEM("$NavigateToURL")
  8778.                doc.RemoveItem("$ReloadRefresh")
  8779.                Call doc.Save( True, False )
  8780.           End If
  8781.      Else
  8782.           Messagebox "No URL specified.", 0, "ErrorNavigating"
  8783.      End If     
  8784. End Sub
  8785. Open History FolderK
  8786. Import Microsoft Favorites...
  8787. '++LotusScript Development Environment:2:5:(Options):0:66
  8788. '++LotusScript Development Environment:2:5:(Forward):0:1
  8789. Declare Sub Click(Source As Button)
  8790. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8791. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8792. Private Sub BindEvents(Byval Objectname_ As String)
  8793.      Static Source As BUTTON
  8794.      Set Source = Bind(Objectname_)
  8795.      On Event Click From Source Call Click
  8796. End Sub
  8797. '++LotusScript Development Environment:2:2:Click:1:12
  8798. Sub Click(Source As Button)
  8799.      
  8800.      ImportFavorites
  8801. End Sub
  8802. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  8803. '++LotusScript Development Environment:2:5:(Forward):0:1
  8804. Declare Sub Click(Source As Button)
  8805. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8806. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8807. Private Sub BindEvents(Byval Objectname_ As String)
  8808.      Static Source As BUTTON
  8809.      Set Source = Bind(Objectname_)
  8810.      On Event Click From Source Call Click
  8811. End Sub
  8812. '++LotusScript Development Environment:2:2:Click:1:12
  8813. Sub Click(Source As Button)
  8814.      
  8815.      ImportBookmarks
  8816. End Sub
  8817. Internet Properties...'++LotusScript Development Environment:2:5:(Options):0:66
  8818. '++LotusScript Development Environment:2:5:(Forward):0:1
  8819. Declare Sub Click(Source As Button)
  8820. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8821. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8822. Private Sub BindEvents(Byval Objectname_ As String)
  8823.      Static Source As BUTTON
  8824.      Set Source = Bind(Objectname_)
  8825.      On Event Click From Source Call Click
  8826. End Sub
  8827. '++LotusScript Development Environment:2:2:Click:1:12
  8828. Sub Click(Source As Button)
  8829.      
  8830.      Dim iret As Integer
  8831.      iret=Shell("rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl", 1)
  8832. End Sub
  8833.     0S0E
  8834. Add Bookmark...K'++LotusScript Development Environment:2:5:(Options):0:66
  8835. '++LotusScript Development Environment:2:5:(Forward):0:1
  8836. Declare Sub Click(Source As Button)
  8837. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8838. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8839. Private Sub BindEvents(Byval Objectname_ As String)
  8840.      Static Source As BUTTON
  8841.      Set Source = Bind(Objectname_)
  8842.      On Event Click From Source Call Click
  8843. End Sub
  8844. '++LotusScript Development Environment:2:2:Click:1:12
  8845. Sub Click(Source As Button)
  8846.      
  8847.      InstantiateWebBrowserFormObjects
  8848.      Dim bookmarkinfo As Variant
  8849.      Dim bookmark As New notesdocument(db)
  8850.      Dim folder As String
  8851.      Dim webdoc As notesdocument
  8852.      
  8853.      BookmarkInfo = w.addbookmark(browserobject.Locationname)
  8854.      If Isarray(bookmarkinfo) Then
  8855.           If bookmarkinfo(0) = "0" Then
  8856.                'Create a bookmark only.  Do not retrieve the page
  8857.                bookmark.bookmark = "1"
  8858.                bookmark.title = bookmarkinfo(1)
  8859.                bookmark.url = browserobject.locationurl
  8860.                bookmark.save True, False
  8861.                bookmark.putinfolder(bookmarkinfo(2))
  8862.           Elseif bookmarkinfo(0) = "1" Then
  8863.                'create copy of page 
  8864.                Set webdoc = db.getdocumentbyurl(browserobject.locationurl)                 
  8865.                webdoc.title = bookmarkinfo(1)
  8866.                webdoc.save True, False
  8867.                webdoc.putinfolder(bookmarkinfo(2))
  8868.           End If
  8869.           
  8870.      End If
  8871. End Sub
  8872. Go to BookmarksK'++LotusScript Development Environment:2:5:(Options):0:66
  8873. '++LotusScript Development Environment:2:5:(Forward):0:1
  8874. Declare Sub Click(Source As Button)
  8875. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8876. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8877. Private Sub BindEvents(Byval Objectname_ As String)
  8878.      Static Source As BUTTON
  8879.      Set Source = Bind(Objectname_)
  8880.      On Event Click From Source Call Click
  8881. End Sub
  8882. '++LotusScript Development Environment:2:2:Click:1:12
  8883. Sub Click(Source As Button)
  8884.      InstantiateWebBrowserFormObjects
  8885.      Call w.opendatabase(db.server, db.filepath, "Favorites and Bookmarks", "",False)
  8886. End Sub
  8887. Send Docu_ment
  8888. Categori_zeK
  8889. _Forward
  8890. _Move To Folder...
  8891. _Remove From FolderK
  8892. _Edit Document
  8893. '++LotusScript Development Environment:2:5:(Options):0:66
  8894. '++LotusScript Development Environment:2:5:(Forward):0:1
  8895. Declare Sub Click(Source As Button)
  8896. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8897. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8898. Private Sub BindEvents(Byval Objectname_ As String)
  8899.      Static Source As BUTTON
  8900.      Set Source = Bind(Objectname_)
  8901.      On Event Click From Source Call Click
  8902. End Sub
  8903. '++LotusScript Development Environment:2:2:Click:1:12
  8904. Sub Click(Source As Button)
  8905.      
  8906.      InstantiateWebBrowserFormObjects
  8907.      If docprofile.OpenURL(0) <> "" Then
  8908.           browserobject.GoHome
  8909.      Else
  8910.           Msgbox "Home page is not specified in your Internet Options.  "  _
  8911.           + "Please select Actions - Internet Options to specify a home page. " , 16,"Open Home Page"    
  8912.      End If
  8913. End Sub
  8914. _ReloadK'++LotusScript Development Environment:2:5:(Options):0:66
  8915. '++LotusScript Development Environment:2:5:(Forward):0:1
  8916. Declare Sub Click(Source As Button)
  8917. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8918. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8919. Private Sub BindEvents(Byval Objectname_ As String)
  8920.      Static Source As BUTTON
  8921.      Set Source = Bind(Objectname_)
  8922.      On Event Click From Source Call Click
  8923. End Sub
  8924. '++LotusScript Development Environment:2:2:Click:1:12
  8925. Sub Click(Source As Button)
  8926.      
  8927.      InstantiateWebBrowserFormObjects
  8928.      browserobject.Refresh2
  8929. End Sub
  8930. Bookmark...K'++LotusScript Development Environment:2:5:(Options):0:66
  8931. '++LotusScript Development Environment:2:5:(Forward):0:1
  8932. Declare Sub Click(Source As Button)
  8933. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8934. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8935. Private Sub BindEvents(Byval Objectname_ As String)
  8936.      Static Source As BUTTON
  8937.      Set Source = Bind(Objectname_)
  8938.      On Event Click From Source Call Click
  8939. End Sub
  8940. '++LotusScript Development Environment:2:2:Click:1:12
  8941. Sub Click(Source As Button)
  8942.      
  8943.      If w.dialogbox("BookmarkSelect", True, True, False, False, False, False, "Select a Folder") Then
  8944.           InstantiateWebBrowserFormObjects
  8945.           Dim bookmark As New notesdocument(db)
  8946.           Dim folder As String
  8947.           Dim webdoc As notesdocument
  8948.           Set webdoc = db.getdocumentbyurl(browserobject.locationurl)
  8949.           If doc.hasitem("Folders") And doc.hasitem("NewFolderName") Then
  8950.                If doc.newfoldername(0) <>"" Then
  8951.                     bookmark.bookmark = "1"
  8952.                     bookmark.title = webdoc.title(0)
  8953.                     bookmark.url = webdoc.url(0)
  8954.                     bookmark.save True, False
  8955.                     bookmark.putinfolder(doc.folders(0)&"\"&doc.newfoldername(0))
  8956.                Else
  8957.                     bookmark.bookmark = "1"
  8958.                     bookmark.title = webdoc.title(0)
  8959.                     bookmark.url = webdoc.url(0)
  8960.                     bookmark.save True, False
  8961.                     bookmark.putinfolder(doc.folders(0))
  8962.                End If
  8963.           End If          
  8964.           'Cleanup the fields put on by dialogbox
  8965.           doc.removeitem("folders")
  8966.           doc.removeitem("newfoldername")
  8967.           doc.save True, False
  8968.      End If
  8969. End Sub
  8970. Keep Page
  8971. '++LotusScript Development Environment:2:5:(Options):0:66
  8972. '++LotusScript Development Environment:2:5:(Forward):0:1
  8973. Declare Sub Click(Source As Button)
  8974. '++LotusScript Development Environment:2:5:(Declarations):0:2
  8975. '++LotusScript Development Environment:2:2:BindEvents:1:129
  8976. Private Sub BindEvents(Byval Objectname_ As String)
  8977.      Static Source As BUTTON
  8978.      Set Source = Bind(Objectname_)
  8979.      On Event Click From Source Call Click
  8980. End Sub
  8981. '++LotusScript Development Environment:2:2:Click:1:12
  8982. Sub Click(Source As Button)
  8983.      
  8984.      On Error Resume Next
  8985.      InstantiateWebBrowserFormObjects
  8986.      Dim nulldoc As notesdocument
  8987.      Dim url As String
  8988.      url = browserobject.locationURL
  8989.      If  url <>"" Then
  8990.           ' Request the URL to be retrieved but don't wait for it to come in
  8991.           Print "(DEBUG) - Queue request for: " + url
  8992.           Set   nulldoc = db.getdocumentbyurl (url, True, False, Empty$, Empty$, Empty$, Empty$,Empty$, True)
  8993.      End If
  8994.      uidoc.refreshhideformulas
  8995. End Sub
  8996. (Internet Profile)
  8997. Internet Options
  8998. keeppage
  8999.     0S0E
  9000. Forward...'++LotusScript Development Environment:2:5:(Options):0:66
  9001. '++LotusScript Development Environment:2:5:(Forward):0:1
  9002. Declare Sub Click(Source As Button)
  9003. '++LotusScript Development Environment:2:5:(Declarations):0:2
  9004. '++LotusScript Development Environment:2:2:BindEvents:1:129
  9005. Private Sub BindEvents(Byval Objectname_ As String)
  9006.      Static Source As BUTTON
  9007.      Set Source = Bind(Objectname_)
  9008.      On Event Click From Source Call Click
  9009. End Sub
  9010. '++LotusScript Development Environment:2:2:Click:1:12
  9011. Sub Click(Source As Button)
  9012.      
  9013.      InstantiateWebBrowserFormObjects
  9014.      Call IEForwardNote(doc,Browserobject)
  9015. End Sub
  9016. Print... 
  9017.     0S0E
  9018. Share...'++LotusScript Development Environment:2:5:(Options):0:66
  9019. '++LotusScript Development Environment:2:5:(Forward):0:1
  9020. Declare Sub Click(Source As Button)
  9021. '++LotusScript Development Environment:2:5:(Declarations):0:2
  9022. '++LotusScript Development Environment:2:2:BindEvents:1:129
  9023. Private Sub BindEvents(Byval Objectname_ As String)
  9024.      Static Source As BUTTON
  9025.      Set Source = Bind(Objectname_)
  9026.      On Event Click From Source Call Click
  9027. End Sub
  9028. '++LotusScript Development Environment:2:2:Click:1:12
  9029. Sub Click(Source As Button)
  9030.      
  9031.      InstantiateWebBrowserFormObjects
  9032.      If doc.form(0) <> "HelpForm" Then
  9033.           
  9034.           doc.url=browserobject.locationurl
  9035.           doc.title=browserobject.locationname
  9036.           
  9037.           If (docProfile Is Nothing) Then
  9038.                Msgbox "You need to specify a Web Server and Web Database to share pages with. Choose Actions - Internet Options from the menu."
  9039.                Exit Sub 
  9040.           End If
  9041.           doc.tmpWebServer  = docProfile.WebServer
  9042.           doc.tmpWebDb = docProfile.WebDatabase
  9043.       'first, display a prompt to get user input
  9044.           If (w.DialogBox("ShareWebPage",True,True,"Share Options")) Then
  9045.               'determine which action we need to take
  9046.                Select Case doc.SharedOptions(0)
  9047.                     
  9048.                Case "2" : 'user wants to copy this to the shared web database
  9049.                     If getcurrentlocation="3" Then
  9050.                          CopyDocumentToSharedDatabase doc, browserobject.locationurl
  9051.                     Else
  9052.                          CopyDocumentToSharedDatabase doc, doc.url(0)
  9053.                     End If
  9054.                Case "3" : 'user wants to rate this and copy the rating to the shared database
  9055.                     If getcurrentlocation="3" Then
  9056.                          CreateRatingDocument doc, browserobject.locationurl, browserobject.Locationname
  9057.                     Else
  9058.                          CreateRatingDocument doc,doc.url(0), doc.title(0)
  9059.                     End If
  9060.                End Select
  9061.           'remove any remaining fields that don't need to be carried around
  9062.                doc.removeItem "ForwardTo"
  9063.                doc.RemoveItem "SharedOptions" 
  9064.                doc.removeItem "ForwardTo"
  9065.                doc.RemoveItem "SharedOptions" 
  9066.                doc.RemoveItem "Rating"
  9067.                doc.removeItem "Content"
  9068.                doc.removeItem "Comments"
  9069.                doc.RemoveItem "tmpWebServer"
  9070.                doc.RemoveItem "tmpWebDb"
  9071.                doc.Save True,True          
  9072.           End If
  9073.      Else
  9074.           Msgbox "This document is a help document."
  9075.      End If
  9076. End Sub
  9077. Internet Profiles
  9078. Internet Options
  9079. webserver
  9080.     12S13S
  9081. Delete'++LotusScript Development Environment:2:5:(Options):0:66
  9082. '++LotusScript Development Environment:2:5:(Forward):0:1
  9083. Declare Sub Click(Source As Button)
  9084. '++LotusScript Development Environment:2:5:(Declarations):0:2
  9085. '++LotusScript Development Environment:2:2:BindEvents:1:129
  9086. Private Sub BindEvents(Byval Objectname_ As String)
  9087.      Static Source As BUTTON
  9088.      Set Source = Bind(Objectname_)
  9089.      On Event Click From Source Call Click
  9090. End Sub
  9091. '++LotusScript Development Environment:2:2:Click:1:12
  9092. Sub Click(Source As Button)
  9093.      
  9094.      InstantiateWebBrowserFormObjects
  9095.      Dim webdoc As notesdocument
  9096.      Dim noteid As String
  9097.      noteid = ""
  9098.      
  9099.      Response = Msgbox ("This will permanently delete the selected page from the database.  Do you want to continue?", 20, "Delete Document")
  9100.      If Response = 6 Then    
  9101.           uidoc.close
  9102.           Set webdoc=db.getdocumentbyurl(doc.url(0))
  9103.           Call RemoveObjects(webdoc)
  9104.          ' webdoc.Remove True
  9105.           
  9106.           If doc.isuidocopen Then
  9107.                noteid = doc.noteid             
  9108.                Delete doc
  9109.                Set doc = db.getdocumentbyid (noteid) 
  9110.                doc.remove True
  9111.                w.viewrefresh  
  9112.                w.viewrefresh
  9113.           Else
  9114.                doc.Remove True 
  9115.           End If
  9116.           
  9117.           w.viewrefresh
  9118.           
  9119.           
  9120.           
  9121.      End If
  9122.      
  9123. End Sub
  9124. $ControlURLNavigateK'++LotusScript Development Environment:2:5:(Options):0:66
  9125. '++LotusScript Development Environment:2:5:(Forward):0:1
  9126. Declare Sub Click(Source As Button)
  9127. '++LotusScript Development Environment:2:5:(Declarations):0:2
  9128. '++LotusScript Development Environment:2:2:BindEvents:1:129
  9129. Private Sub BindEvents(Byval Objectname_ As String)
  9130.      Static Source As BUTTON
  9131.      Set Source = Bind(Objectname_)
  9132.      On Event Click From Source Call Click
  9133. End Sub
  9134. '++LotusScript Development Environment:2:2:Click:1:12
  9135. Sub Click(Source As Button)
  9136.      
  9137.      InstantiateWebBrowserFormObjects
  9138.      Dim URL As Variant
  9139.      Dim Reload As Variant
  9140.      Dim Flags As Integer
  9141.      Dim TmpUrl As String
  9142.      
  9143.      URL = doc.GetitemValue("$NavigateToURL")
  9144.      Reload = doc.GetItemValue("$ReloadRefresh")
  9145.      Flags =Val (Reload(0))
  9146.      On Error 213  Resume Next
  9147.      
  9148.      TmpUrl=browserobject.LocationURL
  9149.      
  9150.      If Flags = 1 Then
  9151.           Flags = 4
  9152.      End If
  9153.      
  9154.      
  9155.      If URL(0) <> "" Then
  9156.           If URL(0) = TmpUrl Then
  9157.               ' Print "Refreshing " + Url(0)
  9158.                browserobject.Refresh     
  9159.           Else
  9160.              '  Print "Attempting " + URL(0) + " Flags = "+ Str(Flags)
  9161.                browserobject.Navigate2 (URL(0)), (Flags)
  9162.                
  9163.           ' Once navigation is done delete the item form the form
  9164.                doc.REMOVEITEM("$NavigateToURL")
  9165.                doc.RemoveItem("$ReloadRefresh")
  9166.                Call doc.Save( True, False )
  9167.           End If
  9168.      Else
  9169.           Messagebox "No URL specified.", 0, "ErrorNavigating"
  9170.      End If     
  9171. End Sub
  9172. Open History FolderK
  9173. Import Microsoft Favorites...
  9174. '++LotusScript Development Environment:2:5:(Options):0:66
  9175. '++LotusScript Development Environment:2:5:(Forward):0:1
  9176. Declare Sub Click(Source As Button)
  9177. '++LotusScript Development Environment:2:5:(Declarations):0:2
  9178. '++LotusScript Development Environment:2:2:BindEvents:1:129
  9179. Private Sub BindEvents(Byval Objectname_ As String)
  9180.      Static Source As BUTTON
  9181.      Set Source = Bind(Objectname_)
  9182.      On Event Click From Source Call Click
  9183. End Sub
  9184. '++LotusScript Development Environment:2:2:Click:1:12
  9185. Sub Click(Source As Button)
  9186.      
  9187.      ImportFavorites
  9188. End Sub
  9189. Import Netscape Bookmarks...'++LotusScript Development Environment:2:5:(Options):0:66
  9190. '++LotusScript Development Environment:2:5:(Forward):0:1
  9191. Declare Sub Click(Source As Button)
  9192. '++LotusScript Development Environment:2:5:(Declarations):0:2
  9193. '++LotusScript Development Environment:2:2:BindEvents:1:129
  9194. Private Sub BindEvents(Byval Objectname_ As String)
  9195.      Static Source As BUTTON
  9196.      Set Source = Bind(Objectname_)
  9197.      On Event Click From Source Call Click
  9198. End Sub
  9199. '++LotusScript Development Environment:2:2:Click:1:12
  9200. Sub Click(Source As Button)
  9201.      
  9202.      ImportBookmarks
  9203. End Sub
  9204. Internet Properties...'++LotusScript Development Environment:2:5:(Options):0:66
  9205. '++LotusScript Development Environment:2:5:(Forward):0:1
  9206. Declare Sub Click(Source As Button)
  9207. '++LotusScript Development Environment:2:5:(Declarations):0:2
  9208. '++LotusScript Development Environment:2:2:BindEvents:1:129
  9209. Private Sub BindEvents(Byval Objectname_ As String)
  9210.      Static Source As BUTTON
  9211.      Set Source = Bind(Objectname_)
  9212.      On Event Click From Source Call Click
  9213. End Sub
  9214. '++LotusScript Development Environment:2:2:Click:1:12
  9215. Sub Click(Source As Button)
  9216.      
  9217.      Dim iret As Integer
  9218.      iret=Shell("rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl", 1)
  9219. End Sub
  9220.     0S0E
  9221. Add Bookmark...K'++LotusScript Development Environment:2:5:(Options):0:66
  9222. '++LotusScript Development Environment:2:5:(Forward):0:1
  9223. Declare Sub Click(Source As Button)
  9224. '++LotusScript Development Environment:2:5:(Declarations):0:2
  9225. '++LotusScript Development Environment:2:2:BindEvents:1:129
  9226. Private Sub BindEvents(Byval Objectname_ As String)
  9227.      Static Source As BUTTON
  9228.      Set Source = Bind(Objectname_)
  9229.      On Event Click From Source Call Click
  9230. End Sub
  9231. '++LotusScript Development Environment:2:2:Click:1:12
  9232. Sub Click(Source As Button)
  9233.      
  9234.      InstantiateWebBrowserFormObjects
  9235.      Dim bookmarkinfo As Variant
  9236.      Dim bookmark As New notesdocument(db)
  9237.      Dim folder As String
  9238.      Dim webdoc As notesdocument
  9239.      
  9240.      BookmarkInfo = w.addbookmark(browserobject.Locationname)
  9241.      If Isarray(bookmarkinfo) Then
  9242.           If bookmarkinfo(0) = "0" Then
  9243.                'Create a bookmark only.  Do not retrieve the page
  9244.                bookmark.bookmark = "1"
  9245.                bookmark.title = bookmarkinfo(1)
  9246.                bookmark.url = browserobject.locationurl
  9247.                bookmark.save True, False
  9248.                bookmark.putinfolder(bookmarkinfo(2))
  9249.           Elseif bookmarkinfo(0) = "1" Then
  9250.                'create copy of page 
  9251.                Set webdoc = db.getdocumentbyurl(browserobject.locationurl)                 
  9252.                webdoc.title = bookmarkinfo(1)
  9253.                webdoc.save True, False
  9254.                webdoc.putinfolder(bookmarkinfo(2))
  9255.           End If
  9256.           
  9257.      End If
  9258. End Sub
  9259. Go to BookmarksK'++LotusScript Development Environment:2:5:(Options):0:66
  9260. '++LotusScript Development Environment:2:5:(Forward):0:1
  9261. Declare Sub Click(Source As Button)
  9262. '++LotusScript Development Environment:2:5:(Declarations):0:2
  9263. '++LotusScript Development Environment:2:2:BindEvents:1:129
  9264. Private Sub BindEvents(Byval Objectname_ As String)
  9265.      Static Source As BUTTON
  9266.      Set Source = Bind(Objectname_)
  9267.      On Event Click From Source Call Click
  9268. End Sub
  9269. '++LotusScript Development Environment:2:2:Click:1:12
  9270. Sub Click(Source As Button)
  9271.      InstantiateWebBrowserFormObjects
  9272.      Call w.opendatabase(db.server, db.filepath, "Favorites and Bookmarks", "",False)
  9273. End Sub
  9274. Send Docu_ment
  9275. Categori_zeK
  9276. _Forward
  9277. _Move To Folder...
  9278. _Remove From FolderK
  9279. _Edit Document
  9280. Lotus Product
  9281. OBJECT
  9282. Lotus Product
  9283. OBJECT
  9284. Lotus Product
  9285. OBJECT
  9286. Lotus Product
  9287. OBJECT
  9288. Lotus Product
  9289. OBJECT
  9290. Lotus Product
  9291. OBJECT
  9292. Lotus Product
  9293. OBJECT
  9294. Lotus Product
  9295. OBJECT
  9296. Lotus Product
  9297. OBJECT
  9298. Lotus Product
  9299. OBJECT
  9300. Lotus Product
  9301. OBJECT
  9302. Lotus Product
  9303. OBJECT
  9304. Lotus Product
  9305. OBJECT
  9306. O=Lotus Notes
  9307. O=Lotus Notes
  9308. PURSAFO
  9309. |.:#U
  9310. O=Lotus Notes
  9311. CN=Lotus Notes Template Development/O=Lotus Notes
  9312. PURSAFO
  9313. $FILE
  9314. STG16257
  9315. $FILE
  9316. EXT11761
  9317. $OLEOBJINFO
  9318. $INFO
  9319. $WINDOWTITLE
  9320. $Script
  9321. $$Script_O
  9322. $$ScriptName
  9323. $$FormScript
  9324. $$$FormScript_O
  9325. $FILE
  9326. EXT11761.lss
  9327. $FILE
  9328. EXT11761.lso
  9329. $BODY
  9330. $V5ACTIONS
  9331. $ACTIONS
  9332. $SCRIPTOBJ_0
  9333. $SCRIPTOBJ_1
  9334. $SCRIPTOBJ_2
  9335. $SCRIPTOBJ_3
  9336. $SCRIPTOBJ_4
  9337. $SCRIPTOBJ_6
  9338. $SCRIPTOBJ_7
  9339. $SCRIPTOBJ_8
  9340. $SCRIPTOBJ_10
  9341. $SCRIPTOBJ_11
  9342. $SCRIPTOBJ_12
  9343. $SCRIPTOBJ_13
  9344. $SCRIPTOBJ_14
  9345.