Hey ya'll. Here I am again. I'm going through and doing some testing with the systems and I got another problem I may need help with. (Using the script below for testing) After I bring up the new service order I'v got it to where it will get the correct dates into the right variables i.e. 02 14 07 02 into N10 14 into N11 and 07 into N12. But after the calculations I can't seem to get it to append to a .txt file. Before I started incorporating the other stuff into the macro date calculation it worked fine. I don't see that I changed any variables just added a few more. Here's what I have: The basics of what I'm trying for are.
Pull new service order from access DB. Bring up CIS (program) and service order.
Then if it is X or C with T3 (SO#) log it as xxxx (<--Works)
If it's I with T3 and OPN 1 and J TAKEN BY do date calculation, append to correct .txt and repeat (<-- Doesn't work)
If it's I with T3 and REPO and J TAKEN BY do date calculation, append to correct .txt and repeat (<-- Doesn't work)
If it's I with T3 and KLOS and J TAKEN BY do date calculation, append to correct .txt and repeat (<-- Doesn't work)
If none of conditions exist I'm wanting it to log xxxxx. (<-- Works Kinda, I think it repeats just that one section @ end)
Repeat Start (Repeat 1000 times)
If Window Title "Oops..." is on top
Activate Window: "Oops..."
Text Type: <ENTER>
Wait Text Playback
Text Type: <ALTD>l<ALTU>
Wait Text Playback
Text Type: <ENTER><ENTER>
End If
Activate Window: "Work Assignment Database"
Text Type: <SHIFTD><SPACE><SPACE><SHIFTU><TAB>
Wait Text Playback
Clipboard Copy
Variable Set String %T3% from Prompt
Wait Text Playback
Activate Window: "TXUMDC"
Wait Text Playback
Text Type: <F12>
Wait Text Playback
Clipboard Paste
Text Type: <ENTER>
Wait Text Playback
Wait Time Elapse: 0 Minutes 1 Seconds
Text Type: <ALTD>e
Wait Text Playback
Text Type: y<ALTU>
Wait Text Playback
If Clipboard Contains "R E M I - PERMANENT CUSTOMER ACCOUNT REMARKS INQUIRY"
Text Type: <ENTER>
Wait Text Playback
End If
Text Type: <ALTD>e
Wait Text Playback
Text Type: y<ALTU>
Variable Set String %T2% from Clipboard
Wait Text Playback
If Clipboard Contains "%T3%"
If Clipboard Contains "STAT C HOLD RSN"
OR
If Clipboard Contains "STAT X HOLD RSN"
Activate Window: "Work Assignment Database"
Text Type: <ALTD>f<ALTU>a<ALTD>c<ALTU><ENTER>
Wait Text Playback
Else
If Clipboard Contains "STAT I HOLD RSN"
AND
If Clipboard Contains "R E P O -"
AND
If Clipboard Contains "J TAKEN BY"
Variable Modify String: Save %T2% to Clipboard
Pause: Basic
Variable Modify String: Copy Part of %T2% to %T10%
Variable Modify String: Copy Part of %T2% to %T11%
Variable Modify String: Copy Part of %T2% to %T12%
Variable Modify String: Convert %T10% to integer %N10%
Variable Modify String: Convert %T11% to integer %N11%
Variable Modify String: Convert %T12% to integer %N12%
Variable Modify String: Convert %T10% to integer %N10%
Variable Modify String: Convert %T11% to integer %N11%
Variable Modify String: Convert %T12% to integer %N12%
Variable Modify Integer: %N12% = 2000 + %N12%
If Variable %N10% = 1
Variable Modify Integer: %N51% = %N11% + 0
End If
If Variable %N10% = 2
Variable Modify Integer: %N51% = %N11% + 31
End If
If Variable %N10% = 3
Variable Modify Integer: %N51% = %N11% + 61
End If
If Variable %N10% = 4
Variable Modify Integer: %N51% = %N11% + 92
End If
If Variable %N10% = 5
Variable Modify Integer: %N51% = %N11% + 122
End If
If Variable %N10% = 6
Variable Modify Integer: %N51% = %N11% + 153
End If
If Variable %N10% = 7
Variable Modify Integer: %N51% = %N11% + 183
End If
If Variable %N10% = 8
Variable Modify Integer: %N51% = %N11% + 214
End If
If Variable %N10% = 9
Variable Modify Integer: %N51% = %N11% + 245
End If
If Variable %N10% = 10
Variable Modify Integer: %N51% = %N11% + 275
End If
If Variable %N10% = 11
Variable Modify Integer: %N51% = %N11% + 306
End If
If Variable %N10% = 12
Variable Modify Integer: %N51% = %N11% + 336
End If
Variable Modify Integer: %N12% = %N12% - 2006
Variable Modify Integer: %N57% = %N12% * 365
Variable Modify Integer: %N51% = %N51% + %N57%
If Variable %N1% = 1
Variable Modify Integer: %N50% = %N2% + 0
End If
If Variable %N1% = 2
Variable Modify Integer: %N50% = %N2% + 31
End If
If Variable %N1% = 3
Variable Modify Integer: %N50% = %N2% + 61
End If
If Variable %N1% = 4
Variable Modify Integer: %N50% = %N2% + 92
End If
If Variable %N1% = 5
Variable Modify Integer: %N50% = %N2% + 122
End If
If Variable %N1% = 6
Variable Modify Integer: %N50% = %N2% + 153
End If
If Variable %N1% = 7
Variable Modify Integer: %N50% = %N2% + 183
End If
If Variable %N1% = 8
Variable Modify Integer: %N50% = %N2% + 214
End If
If Variable %N1% = 9
Variable Modify Integer: %N50% = %N2% + 245
End If
If Variable %N1% = 10
Variable Modify Integer: %N50% = %N2% + 275
End If
If Variable %N1% = 11
Variable Modify Integer: %N50% = %N2% + 306
End If
If Variable %N1% = 12
Variable Modify Integer: %N50% = %N2% + 336
End If
Variable Modify Integer: %N3% = %N3% - 2006
Variable Modify Integer: %N57% = %N3% * 365
Variable Modify Integer: %N50% = %N50% + %N57%
Variable Modify Integer: %N99% = %N50% - %N51%
If Variable %N99% >= 93
Variable Modify String: Save %T3% to Clipboard
Clipboard Append Text: "Overdue 93.txt"
End If
If Variable %N99% >= 62
Variable Modify String: Save %T3% to Clipboard
Clipboard Append Text: "Overdue 62.txt"
End If
If Variable %N99% >= 31
Variable Modify String: Save %T3% to Clipboard
Clipboard Append Text: "Overdue 31.txt"
End If
End If
If Clipboard Contains "STAT I HOLD RSN"
AND
If Clipboard Contains "O P N 1 -"
AND
If Clipboard Contains "J TAKEN BY"
Variable Modify String: Save %T2% to Clipboard
Variable Modify String: Copy Part of %T2% to %T10%
Variable Modify String: Copy Part of %T2% to %T11%
Variable Modify String: Copy Part of %T2% to %T12%
Variable Modify String: Convert %T10% to integer %N10%
Variable Modify String: Convert %T11% to integer %N11%
Variable Modify String: Convert %T12% to integer %N12%
Variable Modify String: Convert %T10% to integer %N10%
Variable Modify String: Convert %T11% to integer %N11%
Variable Modify String: Convert %T12% to integer %N12%
Variable Modify Integer: %N12% = 2000 + %N12%
If Variable %N10% = 1
Variable Modify Integer: %N51% = %N11% + 0
End If
If Variable %N10% = 2
Variable Modify Integer: %N51% = %N11% + 31
End If
If Variable %N10% = 3
Variable Modify Integer: %N51% = %N11% + 61
End If
If Variable %N10% = 4
Variable Modify Integer: %N51% = %N11% + 92
End If
If Variable %N10% = 5
Variable Modify Integer: %N51% = %N11% + 122
End If
If Variable %N10% = 6
Variable Modify Integer: %N51% = %N11% + 153
End If
If Variable %N10% = 7
Variable Modify Integer: %N51% = %N11% + 183
End If
If Variable %N10% = 8
Variable Modify Integer: %N51% = %N11% + 214
End If
If Variable %N10% = 9
Variable Modify Integer: %N51% = %N11% + 245
End If
If Variable %N10% = 10
Variable Modify Integer: %N51% = %N11% + 275
End If
If Variable %N10% = 11
Variable Modify Integer: %N51% = %N11% + 306
End If
If Variable %N10% = 12
Variable Modify Integer: %N51% = %N11% + 336
End If
Variable Modify Integer: %N12% = %N12% - 2006
Variable Modify Integer: %N57% = %N12% * 365
Variable Modify Integer: %N51% = %N51% + %N57%
If Variable %N1% = 1
Variable Modify Integer: %N50% = %N2% + 0
End If
If Variable %N1% = 2
Variable Modify Integer: %N50% = %N2% + 31
End If
If Variable %N1% = 3
Variable Modify Integer: %N50% = %N2% + 61
End If
If Variable %N1% = 4
Variable Modify Integer: %N50% = %N2% + 92
End If
If Variable %N1% = 5
Variable Modify Integer: %N50% = %N2% + 122
End If
If Variable %N1% = 6
Variable Modify Integer: %N50% = %N2% + 153
End If
If Variable %N1% = 7
Variable Modify Integer: %N50% = %N2% + 183
End If
If Variable %N1% = 8
Variable Modify Integer: %N50% = %N2% + 214
End If
If Variable %N1% = 9
Variable Modify Integer: %N50% = %N2% + 245
End If
If Variable %N1% = 10
Variable Modify Integer: %N50% = %N2% + 275
End If
If Variable %N1% = 11
Variable Modify Integer: %N50% = %N2% + 306
End If
If Variable %N1% = 12
Variable Modify Integer: %N50% = %N2% + 336
End If
Variable Modify Integer: %N3% = %N3% - 2006
Variable Modify Integer: %N57% = %N3% * 365
Variable Modify Integer: %N50% = %N50% + %N57%
Variable Modify Integer: %N99% = %N50% - %N51%
If Variable %N99% >= 93
Variable Modify String: Save %T3% to Clipboard
Clipboard Append Text: "Overdue 93.txt"
Wait Text Playback
End If
If Variable %N99% >= 62
Variable Modify String: Save %T3% to Clipboard
Clipboard Append Text: "Overdue 62.txt"
Wait Text Playback
End If
If Variable %N99% >= 31
Variable Modify String: Save %T3% to Clipboard
Clipboard Append Text: "Overdue 31.txt"
Wait Text Playback
End If
Pause: Basic
End If
If Clipboard Contains "STAT I HOLD RSN"
AND
If Clipboard Contains "K L O S -"
AND
If Clipboard Contains "J TAKEN BY"
Variable Modify String: Save %T2% to Clipboard
Pause: Basic
Variable Modify String: Copy Part of %T2% to %T10%
Variable Modify String: Copy Part of %T2% to %T11%
Variable Modify String: Copy Part of %T2% to %T12%
Variable Modify String: Convert %T10% to integer %N10%
Variable Modify String: Convert %T11% to integer %N11%
Variable Modify String: Convert %T12% to integer %N12%
Variable Modify String: Convert %T10% to integer %N10%
Variable Modify String: Convert %T11% to integer %N11%
Variable Modify String: Convert %T12% to integer %N12%
Variable Modify Integer: %N12% = 2000 + %N12%
If Variable %N10% = 1
Variable Modify Integer: %N51% = %N11% + 0
End If
If Variable %N10% = 2
Variable Modify Integer: %N51% = %N11% + 31
End If
If Variable %N10% = 3
Variable Modify Integer: %N51% = %N11% + 61
End If
If Variable %N10% = 4
Variable Modify Integer: %N51% = %N11% + 92
End If
If Variable %N10% = 5
Variable Modify Integer: %N51% = %N11% + 122
End If
If Variable %N10% = 6
Variable Modify Integer: %N51% = %N11% + 153
End If
If Variable %N10% = 7
Variable Modify Integer: %N51% = %N11% + 183
End If
If Variable %N10% = 8
Variable Modify Integer: %N51% = %N11% + 214
End If
If Variable %N10% = 9
Variable Modify Integer: %N51% = %N11% + 245
End If
If Variable %N10% = 10
Variable Modify Integer: %N51% = %N11% + 275
End If
If Variable %N10% = 11
Variable Modify Integer: %N51% = %N11% + 306
End If
If Variable %N10% = 12
Variable Modify Integer: %N51% = %N11% + 336
End If
Variable Modify Integer: %N12% = %N12% - 2006
Variable Modify Integer: %N57% = %N12% * 365
Variable Modify Integer: %N51% = %N51% + %N57%
If Variable %N1% = 1
Variable Modify Integer: %N50% = %N2% + 0
End If
If Variable %N1% = 2
Variable Modify Integer: %N50% = %N2% + 31
End If
If Variable %N1% = 3
Variable Modify Integer: %N50% = %N2% + 61
End If
If Variable %N1% = 4
Variable Modify Integer: %N50% = %N2% + 92
End If
If Variable %N1% = 5
Variable Modify Integer: %N50% = %N2% + 122
End If
If Variable %N1% = 6
Variable Modify Integer: %N50% = %N2% + 153
End If
If Variable %N1% = 7
Variable Modify Integer: %N50% = %N2% + 183
End If
If Variable %N1% = 8
Variable Modify Integer: %N50% = %N2% + 214
End If
If Variable %N1% = 9
Variable Modify Integer: %N50% = %N2% + 245
End If
If Variable %N1% = 10
Variable Modify Integer: %N50% = %N2% + 275
End If
If Variable %N1% = 11
Variable Modify Integer: %N50% = %N2% + 306
End If
If Variable %N1% = 12
Variable Modify Integer: %N50% = %N2% + 336
End If
Variable Modify Integer: %N3% = %N3% - 2006
Variable Modify Integer: %N57% = %N3% * 365
Variable Modify Integer: %N50% = %N50% + %N57%
Variable Modify Integer: %N99% = %N50% - %N51%
If Variable %N99% >= 93
Variable Modify String: Save %T3% to Clipboard
Clipboard Append Text: "Overdue 93.txt"
End If
If Variable %N99% >= 62
Variable Modify String: Save %T3% to Clipboard
Clipboard Append Text: "Overdue 62.txt"
End If
If Variable %N99% >= 31
Variable Modify String: Save %T3% to Clipboard
Clipboard Append Text: "Overdue 31.txt"
End If
Activate Window: "Work Assignment Database"
Text Type: <ALTD>f<ALTU>mo
Wait Text Playback
Text Type: <ALTD>C<ALTU><ENTER>
Wait Text Playback
End If
End If
Activate Window: "Work Assignment Database"
Text Type: <ALTD>f<ALTU>F
Wait Text Playback
Text Type: <ALTD>C<ALTU><ENTER>
Wait Text Playback
End If
Repeat End