Intelligent Automation & Macro Software  

Go Back   Automation Anywhere, Inc. Forums > Products Zone > Automation Anywhere
Register FAQ Search Today's Posts Mark Forums Read

Automation Anywhere Post messages and questions related to Automation Software here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-07-2011, 05:09 PM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 458
Default ?If window exists ... wait UP TO n seconds

I've copied some text below from a simple ATMN, where I was using the
IF WINDOW EXISTS .... (WAIT UP to...nn seconds...).

It seems like AA is waiting about 5 times as long as I asked.

For example when I asked for a 15 second delay,
AA waited more than a minute.

when I asked for a 5 second delay, I got 28 seconds.

is there an way to get the wait to really be UP TO what we ask for?

or, is there some thing else I should do.
Phil
You should be able to recreate this with any window that does NOT EXIST.


1 Comment: ================
2 Comment: ================
3 Comment: ================
4 Start Loop "$DelayLoop$" Times
5 Delay: ($delayMilliSec$ ms)
6 End Loop
7 Comment: ================
8 Delay: ($delayMilliSec$ ms)
9 Variable Operation : $Minute$_$Second$ To $NowSave1$
10 If Window Exists ("*Activity Log Search*") Then (Wait up to 5 seconds - for Window to exist)
11 Delay: ($delayMilliSec$ ms)
12 Click On Link : "Add" in Window : "CCSAS*"
13 Else
14 Comment: Please enter the conditional commands here.
15 Variable Operation : $Minute$_$Second$ To $NowSave2$
16 Message Box: "NowSave1 >$NowSave1$< NowSave2 >$NowSave2$< I'm sorry, but, The Activity Log Search page did not appear as expected. Please go back to the Overview page and run the macro again. If the problem persists, notify Phil at x2362. "
17 Variable Operation : "" To $Clipboard$
18 Log to File: **no ACTIVITY LOG SEARCH** $NoteText$ in "$LogFileName$"
19 Log to File: **END** in "$LogFileName$"
20 Stop The Current Task
21 End If
22 Comment: ================
23 Comment: ================
24 Delay: ($delayMilliSec$ ms)
25 If Window Does Not Exist ("CCSAS C S E") Then (Wait up to 30 seconds - for Window not to exist)
26 Comment: This is a SAFETY wait in case a "please wait window is put up"
27 End If
28 Comment: ================
29 Comment: ================
30 Delay: ($delayMilliSec$ ms)
31 If Window Exists ("windows internet explore*") Then
32 Keystrokes: [ENTER] in "windows internet explore*"
33 End If
34 Comment: ================
35 Start Loop "$DelayLoop$" Times
36 Delay: ($delayMilliSec$ ms)
37 End Loop
38 Comment: ================
Reply With Quote
  #2 (permalink)  
Old 11-07-2011, 06:57 PM
trentonponder trentonponder is offline
Senior Member
 
Join Date: Jan 2009
Posts: 102
Default

I'm not sure why it's not working for you, but you can try another method:

Start Loop 30 Times
If Window Exists ("CCSAS C S E") Then
Delay (1000ms)
Else
Exit Loop
End If
End Loop
Reply With Quote
  #3 (permalink)  
Old 11-08-2011, 07:50 AM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 458
Default

certainly.

my point is

WHEN I give direction to a product to do X
I don't want it to do 5 x.

One of the big problems with AA is that it is "squirrelly"
You can't know whether you've stumbled on an undocumented bug,
or made a coding mistake.

All you know is "it didn't do what I directed it to do..."

does this make sense to you?
Reply With Quote
  #4 (permalink)  
Old 11-08-2011, 08:05 AM
trentonponder trentonponder is offline
Senior Member
 
Join Date: Jan 2009
Posts: 102
Default

Quote:
Originally Posted by philkryder View Post
certainly.

my point is

WHEN I give direction to a product to do X
I don't want it to do 5 x.

One of the big problems with AA is that it is "squirrelly"
You can't know whether you've stumbled on an undocumented bug,
or made a coding mistake.

All you know is "it didn't do what I directed it to do..."

does this make sense to you?
Yes, I've come across bugs before but nothing critical in at least a year. The beauty of code is that there are usually multiple ways to do things and I've developed my own best practices to deal with certain situations which I know work reliably.

I know that doesn't solve your problem, but to ensure it is a bug, isolate just those few lines in a new task and see what it does.
Reply With Quote
  #5 (permalink)  
Old 11-08-2011, 09:40 AM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 458
Default

ahh -

but,
I've also asked FORUM support for a list of FAQs - aka BEST PRACTICES

would you be willing to share yours.

Perhaps we could eventually get it "pinned" near the top of this forum..
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -7. The time now is 05:16 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2011 Automation Anywhere, Inc. All rights reserved