Here's a little trick I use in these scenarios.
If I'm trying to test for a particular variable that may occur at a different time or on a differently configured machine, I'll drop a line in my script so I can manually insert the variable I want to test for. Then when I'm done testing I comment or delete the line.
In Kirby's example I'd insert a line just after "x = last day of month"
z = 0
x = last day of month
x = AskLine ("New Last Day", "Change Date", x,0) ; Then comment or delete when finished testing
loop
if x is a weekday
z = z + 1
if z == 2 then break
endif
x = subtract one day from x
endloop
For me it saves a boatload of time when I'm testing various scenarios and I've used it to test multiple variables at once.
Standard disclaimer - This may or may not be worth two cents and
YMMV!
