danibecr
-
Posts
7 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by danibecr
-
-
Sorry for being such a pest...lol. Well, I'v decided to attack this in several different ways at once. While I'm still working with the macro above I have also broken it down into a couple of smaller ones. I have the main macro getting and logging service orders into the Access DB. And I put the date calculation macro seperate. Since the dates are in different places on different types of orders I have 3 calculation macros. And when the criteria are met it goes to that paricular macro to calculate date. But here's the swinger.... it ALWAYS comes back to saying the service order is 2600 days old. Regardless of the SO date...01/01/07 or 11/15/06. I went back through and checked the variables and they seem fine. I don't know. Oh- BTW I work for a Utility company and we're having to manually one-by-one search 200,000 + orders daily so this is needed to speed up the process.
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 Clipboard
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
End If
If Clipboard Contains "STAT I HOLD RSN"
AND
If Clipboard Contains "R E P O -"
AND
If Clipboard Contains "J TAKEN BY"
Macro Run: Find Age of SO REPO
End If
If Clipboard Contains "STAT I HOLD RSN"
AND
If Clipboard Contains "O P N 1 -"
AND
If Clipboard Contains "J TAKEN BY"
Macro Run: Find Age of SO OPN1
End If
If Clipboard Contains "STAT I HOLD RSN"
AND
If Clipboard Contains "K L O S -"
AND
If Clipboard Contains "J TAKEN BY"
Macro Run: Find Age of SO KLOS
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
Else
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
-
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
-
Thanks Guys.. And Ladies. Works great. Now just a few mods and a little tweaking and Perfecto!!! I couldn't however download that thing Randall posted?? Maybe just my PC.
-
Thank SOOOO much for all of your help..... I'm gonna start trying and playing with it. I update ya soon...
-
O.k. So I'm trying to figure out some kind of logic to add the correct dates maybe something a little like this
Set N1 from current date (but it only comes in a 2 digit # 02/10/2007 = 10)
Set N2 from prompt (for testing N2 will come from service order date in future)
Modify N3 = N1-N2 (02/10/2007 - 02 10 07 = -15) If reversed = 5
Maybe if I put the current month in N1 and the current date in N2 and had the month and date off the service order as N3 and N4, but then theres the problem of setting the addition and subtraction into another variable and I think that would get sticky. ANY HELP or IDEAS would be GREATLY apprecitated and at least tried. I'm kinda at a stand still on this. Thanks in advance.
-
I'm trying to filter work orders to the end user by dates. The date format is
mm dd yy. When the order comes up I need to check if the date wanted is 31 or 62 or 93 days older than the current date, and if so append them to a seperate .txt file.
All other orders will be skipped.
*urgent* Calculating Dates
in Macro Express 3.x
Posted
O.k. Is there anybody that would be willing to do some e-mail correspondance or even a phone call to get this thing running?