As it stands right now, after many tries the script is a little messy, but it appears to work if I display the results in a message box. So, I think the error has to be in the second Non-Modal Box. Also, the error message I was getting said it was with the round function; however that appears to be because it is not getting a value from the first Non-Modal box. Any ideas?
Code: Select all
Dialog>Dialog1
Caption=PDF Filer ROI Caculator
Width=326
Height=428
Top=CENTER
Left=CENTER
Max=0
Min=0
Close=1
Resize=0
Image=C:\Documents and Settings\Keith Passaur\Desktop\plaincaculatormenu2.bmp,0,0,321,401
Edit=minutes,72,80,30,
Edit=volume,72,124,30,
Edit=profit,72,196,30,
Edit=employees,72,160,30,
Label=Time in minutes an employee wastes per,113,76,true
Label=Average number of Loans closed,113,122,true
Label=Average Gross Profit per Loan,113,200,true
Button=Caculate,99,264,75,25,1
Button=Exit,173,264,75,25,2
Label=Number of Loan Officers,113,166,true
Label=Copyright© eDocFile Inc. 2004-2007,66,376,true
Label= day searching for Documents.,113,88,true
Label=per month by Loan Officer,113,136,true
EndDialog>Dialog1
Dialog>Dialog2
Caption=PDF Filer ROI Caculator
Width=326
Height=428
Top=CENTER
Left=CENTER
Max=0
Min=0
Close=1
Resize=0
Image=C:\Documents and Settings\Keith Passaur\Desktop\plaincaculatormenu2.bmp,0,0,321,401
Button=Repeat,99,264,75,25,1
Button=Exit,173,264,75,25,2
Label=Copyright© eDocFile Inc. 2004-2007,66,376,true
Memo=msMemo1,80,56,185,201,%ResultCaculated%
EndDialog>Dialog2
Label>Showthemenu
Show>Dialog1
Label>Dialog1loop
GetDialogAction>Dialog1,r
If>r=1,Caculate
If>r=2,EOF
Goto>Dialog1loop
Label>Caculate
CloseDialog>Dialog1
Let>minutes=%Dialog1.minutes%
Let>profit=%Dialog1.profit%
Let>volume=%Dialog1.volume%
Let>profitpermonth=%profit%*%volume%
Let>profitperweek=%profitpermonth%/4.16
Let>profitperday=%profitperweek%/5
Let>profitperminute=%profitperday%/480
Let>expense=%profitperminute%*%minutes%
Let>paybackdays=249.95/%expense%
Let>paybackmonths=%paybackdays%/20
Let>savingsperyear=250*%expense%
Let>grosssavingsperyear=%savingsperyear%*%Dialog1.employees%
Let>firstyearsavings=%grosssavingsperyear%-249.95
Position>.,%expense%,1,decimal
Add>decimal,2
MidStr>%expense%,1,decimal,expense
Let>paybackdays={round(%paybackdays%)}
Position>.,%grosssavingsperyear%,1,decimal2
Add>decimal2,2
MidStr>%grosssavingsperyear%,1,decimal2,grosssavingsperyear
Position>.,%firstyearsavings%,1,decimal3
Add>decimal3,2
MidStr>%firstyearsavings%,1,decimal3,firstyearsavings
Let>ResultCaculated=It is currently costing you %expense% per day per employee for employees to search for records.%CRLF%%CRLF%PDF Filer will pay for itself in %paybackdays% days. %CRLF%%CRLF%With %Dialog1.employees% employees: You will save %firstyearsavings% your first year and %grosssavingsperyear% each year thereafter.
MDL>%ResultCaculated%
/*
Let>%Dialog1.employees%=
Let>%Dialog1.minutes%=
Let>%Dialog1.profit%=
Let>%Dialog1.volume%=
ResetDialogAction>Dialog1
Show>Dialog2,result
Label>Dialog2loop
If>result=1,Repeat
If>result=2,EOF
Wait>.25
Goto>Dialog2loop
Label>Repeat
CloseDialog>Dialog2
Let>%Dialog2.msMemo1%=
ResetDialogAction>Dialog2
*/
Goto>Showthemenu
Label>EOF