Example 3: Create and send a report

Top  Previous  Next

The following example checks all bookmarks. Afterwards it creates a report and opens it in the internal browser.

 

Optionally you can send it to two different e-mail addresses, the script will ask before sending an e-mail.

 

// Ask if the script should be executed
QuestionBox "Run the script ?" /ContinueOnYes /beep
 
// Check all bookmarks
CheckBookmarks /all
 
// Create a report and open it in the internal browser
CreateReport /template="{programdir}examples\report_template_changes.htm" (+)
             /output="c:\report.htm" (+)
             /bookmarks=changed
OpenWithInternalBrowser "c:\report.htm"
 
// Ask if an e-mail should be sent
// If the user does not abort the script, then send the e-mail
QuestionBox "Send the report by e-mail?" /ContinueOnYes /beep
SendMail /recipient="support@domain.com,info@domain2.com" (+)
         /subject="WSW-Report" (+)
         /body="Attached a WSW report" (+)
         /attachfile="c:\report.htm"
MessageBox "Done." /beep




Translate document: