please help!!!

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
denissesp
Newbie
Posts: 6
Joined: Wed Mar 17, 2004 11:31 pm

please help!!!

Post by denissesp » Wed Mar 17, 2004 11:38 pm

hi I have a problem with a macro, I made a macro that open a Crystal Reports and genarate reports and then pass them to excel format, and repet that steps 2 times more, but i have a problem when it tray to call the next macro.. because It does´t do it, i dot know why.. i hope some help
this is the last part of my macro, the macro tah doesnt call es "sur" in the end:
macro>clic2
Press Enter
wait>5
wait>3
press del
send character/text>C:\Denny\pruebas\Norte\ventas i nte actual.xls
WAIT>3
press enter
wait>1
press enter
wait>1
getactivewindow>window,x,y
if>window=Exporting Records,sigue3
label>sigue3
WaitWindowClosed>Exporting Records
closewindow>Seagate Crystal Reports Professional*
wait>2
press enter
wait>2

getTime>hora
getdate>fecha
writeln>C:\Mis documentos\Bitacora\bitacora.txt,mensaje,%hora%,%fecha%,Se crearon correctamente los reportes de Crystal a excel
wait>2
macro>sur

Lumumba

Post by Lumumba » Thu Mar 18, 2004 12:11 am

Maybe there's a problem with the number of parameters which are separated with commas ',' in the WLN> command.

Why not using the Timestamp> command ?

TimeStamp>C:\Mis documentos\Bitacora\bitacora.txt,Se crearon correctamente los reportes de Crystal a excel

The file entry would appear :
15:43:03:066 - Se crearon correctamente los reportes de Crystal a excel

-----

//Where is the else condition ?
.
.
.
if>window=Exporting Records,sigue3
label>sigue3
.
.
.

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Thu Mar 18, 2004 12:32 am

Hello denissesp,

What you mean by "because It does't do it..."? Is the big gear still blinking in the system tray?
macro>clic2
Press Enter
wait>5
wait>3
Perhaps you may want to consolidate the last 2 statements into one--wait>5.

In your script alone, it calls 2 additional macros--clic2 and sur. Do you have any trouble with these two macros? Are you sure they run properly?

Your script doesn't include commands to run Crystal Reports and Excel.

Look forward to hearing more from you soon.

denissesp
Newbie
Posts: 6
Joined: Wed Mar 17, 2004 11:31 pm

thanks..

Post by denissesp » Thu Mar 18, 2004 12:42 am

hi, I really sorry if i dont express very well, i dont speak very well english, yes I have two macros: sur and clic2, they work? propely, separeted, the problem is when I try to call "sur" in a another macro, like the message, it dosent come?, when I call I write in bitacora some lines, adn when it finish, i call sur but it doesnt come, if i run sur alone, It works i dont know why...thanks :shock:

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 » Thu Mar 18, 2004 12:59 am

The most obvious problem to me is the IF statement:
if>window=Exporting Records,sigue3
label>sigue3
This will end up doing "sique3" regardless of the window name. Since you are using "IF" then it would seem that there are conditions when you don't wnat to do "sique3"

I see that Lumumba already noted the problem with the "IF" line in an earlier post.

It is also advisable to include the full path and have the ",scp" extension for your macros, not just the macro name. The lines calling the two macros "clic2" and "sur" should be modified.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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