MoneyWorks Manual
Edit
ProgressStopped()
Result type: Boolean
Definition: Calling this function in a loop will cause any script progress window to enable its Stop button for regular users (ie. users who do not have the scripting privilege). The function will return TRUE (1) if the Stop button is clicked. If the function retuns TRUE you MUSt break out of the loop and stop the operation.
Example:
foreach n in name CreateSelection("name", "*")
let recip = n.GetContactForRole(rolename)
SetProgressMessage("Sending mail to " + recip)
if ProgressStopped() // stop sending email messages if the Stop button is clicked
break
endif
Mail(recip, InsertVars(params["subject"]), CreateArray("text", InsertVars(params["text"]), "html", InsertVars(params["html"])))
endfor
Availability: available within MWScript handlers in v9.2.3 and later
See Also: