Case study:
A secretary using Corel WordPerfect 7 is often required to carry out calculations and insert the values into invoices or other documents.
She does this by entering calculations into either a real calculator and transcribing the answer, or the Microsoft calculator and copying then pasting the result into the document. Doing this affects her productivity as this process increases the time taken to complete work and wastes time in correcting inevitable errors that occur.
Proposal:
A secretary has asked for software to be written which enables her to do calculations and, if required, convert standard numbers to values of currency as a simple operation within Corel WordPerfect 7.
Feasibility study:
Having analysed the problem outlined above this operation is ideally suited for automation. A solution based on a macro would be advisable to the existing methods in place. The saving in time and increased productivity makes the proposed system a practical and effective alternative to the current manual system.
User Requirements:
The user needs to enter calculations into a new or existing document at different stages throughout the creation of the text. The user also requires that the macro does not change the formatting of the document in any way.
The user requires the ability to select the following options for formatting the output: 1) Displaying a sum in standard numbers or currency.
2) Displaying a sum using a minus sign or brackets to show negative figures.
3) Optional use of commas where required.
Specification:
Applications software to be used: Corel WordPerfect 7.
Purposes of using macro: Calculate the sum of any numerical data specified by the user.
Data to be embedded in macro: Any numerical data entered by the user.
Use of macro: Accelerate processing of data therefore increasing productivity, by cutting out the additional keystrokes needed to run the calculation manually.
Solution:
A macro that uses the table feature in Corel WordPerfect 7 to carry out the required mathematical operations then insert the result in place of a calculation entered as a formula. This solution will take between one to three seconds to complete any operation, running on a correctly configured and fully operational system of the description specified below.
Design of the system
Taking into consideration the needs of the user and the resources available in the execution of the macro in this environment. I have derived an algorithm that meets all the requirements outlined above. The specification for the stand alone programmable system needed is as follows:
Typical configurations required:
16 Megabytes of RAM.
Microsoft compatible mouse.
Corel WordPerfect 7.
The macro file.
155 MHZ Pentium processor.
1 Gbyte hard disk capacity or Windows 98.
Microsoft compatible keyboard.
DOS 6.0 or better.
Windows 95
Method of input:
Keyboard, numerical characters or key pad. Capture method: Transfer to clipboard. Input data: Any numerical data entered by the user. Output data: The sum of a calculation in numerical form.
Method of output: To VDU at the point of input data.
Using this specification I have written an algorithm that makes effective use of the resources available in Corel WordPerfect 7.
Algorithm for applications software macro:
[1] Check for input.
[a] Exit if none found.
[2] Select formula.
[3] Create a one cell table.
[4] Insert an equals sign before the formula.
[5] Calculate the table.
[6] Verify that result is not invade.
[a] Exit if error found (=5+6e).
[7] Request user input (formatting).
[a] Exit at user request (presses cancel).
[b] Revert operations & clean up.
[8] Format the output:
[a] Standard numeric.
[b] Currency.
[c] Use commas.
[d] Use negative format.
[8] Delete the table leaving the solution in place of the originally entered formula.Software development
The solution to the algorithm stated above in the form of a macro that meets all the requirements identified in the analysis is as follows:
Macro script:
// Macro: Automath.wcm // Written in: Perfect Script // Purpose: Calculate the sum of numerical data // Compiled: 5/09/04 // © 1998 Michael Hart //================================================= // Identify compiler, application to use Application (A1; "WordPerfect"; Default; "UK")
If (?DocBlank) Condition executed if document blank // Go to subroutine oninput go(oninput) endif
// Select data block left of insertion point Selectwordprevious () // Condition executed if no data found If (?SelectedText="") // Go to subroutine error go(error) endif // Convert selected data block to a table Tableconvertfrom (type: tabularcolumns!) // Set default table style TableCellNumberFormat (FormatType: General!) // Turn off Update associated charts option Tableupdateassociatedcharts (state: off!) // Insert an equal sign left of data block Type (text: "=") Tablecalculate () // Calculate formula values in the table
// If formula syntax is invalid go to else If(?CellFormula) // Display menu dialog box DialogShow(5001;"WordPerfect") // Condition executed if user presses cancel If(MacroDialogResult = 2) // Revert the last operations Undo(1) // Move insertion point to end of data bock PosWordNext () // Go to subroutine end Go(end) Endif
// Condition executed if currency is defined If(currency) // Specify format data as currency [£00.00] TableCellNumberFormat (FormatType: Currency!) TableCellNumberNegativeNumber (NegDisplayType: Minus!) Endif
// Condition executed if negatives defined If(negatives) // Specify negative format [(9)] Tablecellnumbernegativenumber (negdisplaytype: parentheses!) Endif
// Specify commas are not used TableCellNumberUseCommas (State: No!)
// Condition executed if commas defined If(commas) // Specify format data using commas [2,000] TableCellNumberUseCommas (State: Yes!) Endif
// Select the table. Tableselecton (selectionmode: table!) // Select all cells in the current table Selecttable () // Delete table convert contents to document Tabledeletetable (delwhat: converttotabs!) // Move insertion point to end of data bock PosWordNext () // Go to subroutine end Go(end) // If formula syntax is invalid then Else endif
// Identify the subroutine error Label(error) // Display error message box in event of invalid formula MessageBox (; "AUTOMATH UNABLE TO COMPLY"; "Invalid data exists in formula. Sequence terminated."; IconStop!) // Delete table convert contents to document Tabledeletetable (delwhat: converttotabs!) // Delete character right of the insertion point DeleteCharNext () // Go to subroutine end Go(end)
// Identify subroutine oninput. Label(oninput) // Display error message box in event of blank document MessageBox (; "AUTOMATH UNABLE TO COMPLY"; "No input provided! Sequence terminated."; IconStop!)
// Identify the subroutine end Label (end) // End macro Quit //====================================================
Implementation:
Preliminary diagnostics: After running the macro on a system of the same specification to that of the system it is intended to be implemented, the preliminary diagnostic tests show the operational time to remain within the range predicted during the analysis.
The following tests were performed to confirm that the macro meets all of the requirements under real conditions.
Tests to be applied: Test # one of basic macro: 1) Find an individual that knows nothing about this macro.
2) Observation of this individual doing the following:
[a] Easily using the instructions.
[b] Load Corel WordPerfect 7.
[c] Enter valid numerical data.
[d] Access the macro file.
[e] Run the macro.
[f] Repeat steps [c] to [e] using all possible combinations of the options. Ideally, the individual should be able to do the above with no assistance.
3) Observation of the macro running as intended in all conditions.
Basic test conditions: Valid Input: Output: Invalid Input: output: [a] 5-5 0 [a][nothing] Error [b] 2+2 4 [b] qwerty Error [c] 2-4 -2 [c] 2gh+32 Error [d] 100*200 20000 [d] !"£$% Error [e] 50/1 50 [e] 1+4-1$ Error [f] 1+2-3*4/5 0.6 [f] one*two Error [g] 12345 £12,345.00 [g] a1-d3 Error (??)
Test # two of debugged version:
1) Release the software on the LINK bulletin board system (run by Legalease) for evaluation by it's users. (the LINK is a special network for lawyers who often need maths functions in written work).
2) Collect commentary from the people willing to help.
3) Investigate and implement any changes or revisions necessary.
Maintenance:
Commas appear in values of currency regardless of the settings. This bug has been successfully corrected.
I am the website administrator of the Wandle industrial museum (http://www.wandle.org). Established in 1983 by local people to ensure that the history of the valley was no longer neglected but enhanced awareness its heritage for the use and benefits of the community.
If someone entered your home, uninvited and installed numerous cameras... Read More
IntroductionSurprised, by the title? well, this is a tour of... Read More
If you have Microsoft Great Plains and support it... Read More
Spyware, what it is and what it does. Basically, spyware... Read More
Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More
DBxtra is a powerful query and reporting tool that hides... Read More
Corporate ERP/MRP selection might be tough one, especially considering very... Read More
Microsoft CRM customization techniques are very diversified and based on... Read More
Following tips help you to learn a software in lesser... Read More
So, why should you use any O/R mapping tool? I... Read More
MSN messenger is a pretty cool invention. I mean I'm... Read More
As of now - Great Plains Dynamics/eEnterprise is transformed/renamed into... Read More
Microsoft Great Plains is main Microsoft Business Solutions accounting package... Read More
Some companies that are in need of fleet management may... Read More
If you use Microsoft Outlook (or similar applications) for e-mailing,... Read More
Microsoft Great Plains is now targeting large and midsize businesses... Read More
Microsoft CRM has built-in conversion tool, however you should probably... Read More
This short paper will expand on two key reasons to... Read More
Adobe Photoshop is one of the world's leading graphics editing... Read More
Microsoft Business Solutions Great Plains has I'd say end user... Read More
The title of "software engineer" has got to be among... Read More
Remember nice and prosperous Clinton era? When you implemented innovative... Read More
Disclaimer: All the thoughts expressed are my views only! Your... Read More
If there still are few unprotected computers left, I haven't... Read More
Hi, Guys,I believe a lot of programmers are trying to... Read More
Sometimes your PC will start acting strange for no apparent... Read More
I provide, here clear explanations and a count of function... Read More
Microsoft Business Solutions Great Plains, Navision, Axapta, Solomon and CRM... Read More
How would you like to prevent spyware and adware from... Read More
If you company is small or mid-size special products or... Read More
We will base our prognosis on our Microsoft Business Solutions... Read More
Microsoft Great Plains, former Great Plains Software Dynamics, eEnterprise has... Read More
Our hosted solution allow you to run your own search... Read More
Microsoft Great Plains ? ERM from Microsoft Business Solutions and... Read More
The Microsoft system preparation utility for Windows 2000 is a... Read More
Currently Microsoft Business Solutions is on the way of creating... Read More
The Internet is reshaping every form of communications medium, and... Read More
Research bears that less than 70 percent of development projects... Read More
What is Spyware?Spyware monitors your surfing habits and sends the... Read More
The intentions of this short tutorial are not to teach... Read More
Do you remember that frustrating feeling when you find an... Read More
Google Inc. has launched a new software package that allows... Read More
Corporate ERP/MRP selection might be tough one, especially considering very... Read More
DBxtra is a powerful query and reporting tool that hides... Read More
We've all seen the ads on TV for Netzero 3G.... Read More
Microsoft Business Solutions Navision is main ERP application for European,... Read More
In our small article we'll consider Microsoft Business Solutions Great... Read More
Words we choose to describe things and phenomena often show... Read More
Upgrading. Downtime. Maintenance. Hardware obsolescence. Implementation issues. The litany of... Read More
Customer Relationship Management, abbreviated "CRM," is the term for a... Read More
Microsoft Business Solutions Great Plains is very good fit for... Read More
According to a survey conducted by InfoTrends/CAP Ventures entitled "Content-Centric... Read More
Looks like Microsoft Great Plains becomes more and more popular,... Read More
It is possible that if one avoided all sources of... Read More
Current Microsoft Business Solutions Great Plains has more that 10... Read More
Microsoft Office program is a programming tool called Visual Basic... Read More
Need software to record your voice, streaming audio or musical... Read More
The intuitive algorithm.Roger Penrose considered it impossible. Thinking could never... Read More
This short paper will expand on two key reasons to... Read More
Most people don't use Photoshop to its fullest capabilities. Here... Read More
Are you a whiz at calculating financial information? Not the... Read More
1. Replace Dexterity cursor with SQL Stored Procedure Dexterity... Read More
IntroductionDuring the early years of our modern computer era, very... Read More
You might think you don't need a firewall... Read More
Microsoft Great Plains and Microsoft CRM become more and more... Read More
Microsoft Great Plains has full-featured Manufacturing suite of modules: Capacity... Read More
Software |