WaitPixelColor and Crystal Reports

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Adriaan
Newbie
Posts: 4
Joined: Thu Feb 19, 2004 2:37 pm

WaitPixelColor and Crystal Reports

Post by Adriaan » Wed Mar 10, 2004 9:22 am

I have problems with WaitPixelColor.

I heve an Crystal Report of which I have to copy 23 parts to the harddrive
Selections are made with the Parameters in Crystal.
It takes up to 5 minites to colect the data through the ODBC driver and fo the next step te export as an pdf file.
During the reading of the data the icons on the toolbar are grey and after reading they are coloured again.
I cannot use the change cursor since is changes it shape during reading of the linked subreports

The proces does not stop until the pixel changes colour.
What is mij ommission.
I tried enay value of the waittime but no luck sofar.


Let>RP_WAIT=1
Let>WPC_TIMEOUT=0
DeleteFile>c:\a_Upload\*.pdf
SetFocus>Crystal*
Press F5
Press Tab
Press Tab
Press Tab
Press Tab
Press Down
Send Character/Text>SALESDEP
Press Tab
Press Tab
Press Tab
Press Tab
Press Down
Send Character/Text>WAREHOUS
Press Tab
Press Down
Send Character/Text>11
Press Enter
WaitPixelColor>0,21,701,0 //color,X,Y,max waitingtime
Message>WPC_RESULT


Etcetera


Any help will be preciated

Thanks

Adriaan Stoop

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Mar 10, 2004 3:22 pm

:idea: Just a thought......could you access the database directly using Macro Scheduler's VB Script and bypass Crystal Reports and PDF completely?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Adriaan
Newbie
Posts: 4
Joined: Thu Feb 19, 2004 2:37 pm

Post by Adriaan » Sat Mar 13, 2004 6:02 pm

Bob Hansen wrote::idea: Just a thought......could you access the database directly using Macro Scheduler's VB Script and bypass Crystal Reports and PDF completely?
Bob I do not have the skills to use VB script.
Is WaitPixelColor so difficult to use???

Adriaan

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Mar 13, 2004 6:40 pm

WaitPixelColor>0,21,701,0 //color,X,Y,max waitingtime
is not in the correct format.

1. Should be something more like:
WaitPixelColor>11038776,453,573,10
11038776 is the color.
453 is the x position, or column of the mouse.
573 is the y position or row of the mouse.
10 is the timeout value.

You can get these desired values by opening the Macro Scheduler editor, click on Tools, Cursor Monitor. Now as you move the mouse you will see the values. Go to your desired mouse position, set the conditions to show the color you want to wait for, write down the values.

2. Don't believe you can comments on the same line as a command, so "//color,X,Y,max waitingtime" needs to be on its own line. I usually put such notes above the line that I use.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Adriaan
Newbie
Posts: 4
Joined: Thu Feb 19, 2004 2:37 pm

Post by Adriaan » Thu Mar 18, 2004 1:10 pm

Thank you Bob,

is mesed up the X and Y values.

0 is the code for BLACK according to the Pixel Color tool.

I got it working now.
Thanks

Adriaan

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts