Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: task hangs if window opened by automate is not the active window.
Topic Summary:
Created On: 08/31/2012 03:31 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 08/31/2012 03:31 PM
User is offline View Users Profile Print this message

Author Icon
AlexNavagomez
Student (5-19 posts)

Posts: 14
Joined: 08/31/2012

Hello,

 

I have noticed that when an automated taskbegins, if the opened window is not the active window, then the task will hang indefinitely in one of the steps (mostly the second step, right after opening the window).

Only when I click the window opened by automate, and make it the active window, the task completes.

Is this a setting I need to change somewhere in automate?

 

Thank you greatly.

 



 Category Survey
 08/31/2012 03:58 PM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Alex,

Without seeing your task, I would recommend that you add a Wait for Window and Focus Window action to make sure your window is the active window to interact with.




 Category Survey
AutoMate 7 version:
Windows version:


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 08/31/2012 04:47 PM
User is offline View Users Profile Print this message

Author Icon
AlexNavagomez
Student (5-19 posts)

Posts: 14
Joined: 08/31/2012

it is a very basic task. i must say.

it opens logs on to the erp system, opens a window, checks a fes check boxes, and closes the window. that in a nutshell.

the task is ran from a computer to which i rdp using the same user that i specify to also set up the task, and run it. once i finish setting up the task, i log off of the rdp connection.

i am including a screnn shot of the steps, would it be possible ask for help in identifying the stepes where i might need to add wait to open and focus window?

 

thank you kindly.

 

regards,

 

alex.

 

 



 Category Survey
 09/01/2012 12:19 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Alex,
on step 2 you "wait for window to be focused" and it seems to do so, waiting for ever until the window is focused.
You should just replace that with a simple "wait for window", and since you specified "focus the window after the wait", it should then proceed nicely.

 Category Survey
AutoMate 7 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 09/01/2012 01:16 PM
User is offline View Users Profile Print this message

Author Icon
AlexNavagomez
Student (5-19 posts)

Posts: 14
Joined: 08/31/2012

Jean, 

 

I changed the step to be only "Wait for window to open" leaving the focus after the wait box, checked.

 

I then ran the task from the task builder screen, and it ran fine.

I saved the task and tried to run it again from the task administrator screen, and this time it failed. 

 

It says "window can not be focused" and then the task just hangs.

Is there any recommendations you may have to get around this issue?

 

I am including a screen shot of the error, and the step# 2 

 

Thank you.

 

 

 

 



 Category Survey
 09/01/2012 04:40 PM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Alex,

Are you able to provide the screenshots of the windows you are trying to interact with? And post the task in its entirety using the Attach Code button?




 Category Survey
AutoMate 7 version:
Windows version:


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 09/01/2012 05:19 PM
User is offline View Users Profile Print this message

Author Icon
AlexNavagomez
Student (5-19 posts)

Posts: 14
Joined: 08/31/2012

this is the window and the code for the first task. 

 

Thank you for your help.



 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


Click for full image
Click for larger image

 09/01/2012 05:23 PM
User is offline View Users Profile Print this message

Author Icon
AlexNavagomez
Student (5-19 posts)

Posts: 14
Joined: 08/31/2012

 

this is the window and the code for the second task. 

 

Thank you for your help.

 



 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


Click for full image
Click for larger image

 09/02/2012 08:58 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Alex,

I have no certainty, but

on task 1, I would suspect that the task is not running under the same user in task administrator as it does from task builder. (check task properties)

And regarding task 2, I see the wait for window is still "wait for window to be focused"

 Category Survey
AutoMate 7 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 09/02/2012 02:25 PM
User is offline View Users Profile Print this message

Author Icon
AlexNavagomez
Student (5-19 posts)

Posts: 14
Joined: 08/31/2012

Hi Jean,

 

I amde sure that the two tasks are using the same user. 

I did not change the window to be focus in the script I uploaded but in the script I am running it matched the script #1

 

Thank you much



 Category Survey
 09/03/2012 12:32 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

When you run the task from task administrator, do you mean you are sitting in front of the computer, seeing the task administrator window, and you hit the "Run" button ?

As a test you might place a message box at the very beginning of the task, and see if it displays correctly when you run the task from TA.

 Category Survey
AutoMate 7 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 09/04/2012 08:32 AM
User is offline View Users Profile Print this message

Author Icon
AlexNavagomez
Student (5-19 posts)

Posts: 14
Joined: 08/31/2012

Hi,

 

I did provide all the screen shots and scripts last weekend. 

 

Do you think it would be possible to get a bit more insight?

My tasks keep hanging. And I have verified that I am using the same user, that I am waiting to open the window, and then set focus in it. But I can not get pass step #2

Thank you



 Category Survey
 09/04/2012 09:46 AM
User is offline View Users Profile Print this message

Author Icon
AlexNavagomez
Student (5-19 posts)

Posts: 14
Joined: 08/31/2012

I do not understand why when I run the steps the task runs, but when I try to run the same task as a schedulked job, it does not run.

 

This si the strangest thing. does not make sense to me.



 Category Survey
 09/04/2012 10:32 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

When the task is scheduled, does it properly unlock the workstation and logon as the appropriate user ? Can you see it happening ?

 Category Survey
AutoMate 7 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 09/04/2012 10:36 AM
User is offline View Users Profile Print this message

Author Icon
AlexNavagomez
Student (5-19 posts)

Posts: 14
Joined: 08/31/2012

I am setting this task on a VM to which I connect via RDP.

This VM has Automate installed, and the software it needs to interact with. 

When I schedule the task, the only thing I see happening is "Running Task" message, but I never seen it completin, or erroring out.

 

 



 Category Survey
 09/04/2012 10:37 AM
User is offline View Users Profile Print this message

Author Icon
AlexNavagomez
Student (5-19 posts)

Posts: 14
Joined: 08/31/2012

Why would the task run from the task builder window, but not from the TA window if it's the same task, same steps and everything?



 Category Survey
 09/04/2012 11:23 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Alex,

Task Builder runs the task under the context of the currently logged on user whereas running it from Task Administrator may vary based on log on settings for that task. What are the logon settings for the task?




 Category Survey
AutoMate 7 version:
Windows version:


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 09/04/2012 11:37 AM
User is offline View Users Profile Print this message

Author Icon
AlexNavagomez
Student (5-19 posts)

Posts: 14
Joined: 08/31/2012

This screen shot shows the logon details for the task.

 

I tried to select from System > Options > Enable software SAS, but I select the check box and then if I go back to the same System > Options > Enable software SAS the box shows unchecked, it does not remember the setting.

 

I am on windows 7, 32 bit OS.



 Category Survey


Click for full image
Click for larger image

 09/04/2012 01:48 PM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Alex,

Please change 'when workstation is logged on' to 'run as logged on user'. Microsoft no longer supports running an interactive session as a specified user when there is a currently logged on session. Also, are you running the latest version of AM7? The latest version is 7.1.3.0.





 Category Survey
AutoMate 7 version:
Windows version:


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 09/04/2012 03:05 PM
User is offline View Users Profile Print this message

Author Icon
AlexNavagomez
Student (5-19 posts)

Posts: 14
Joined: 08/31/2012

I am running version 7.1.1.0

I changed that setting as you instructed, I sitll see the red note though.



 Category Survey
 09/05/2012 07:39 AM
User is offline View Users Profile Print this message

Author Icon
AlexNavagomez
Student (5-19 posts)

Posts: 14
Joined: 08/31/2012

hello again, 

 

it seems as the program is running, now from the TA window, and also as a scheduled task on windows.

 

Now,  for the last part, when scheduled as a windows task, it seems it only runs when I am logged on the VM viw RDP. If I exit out of the session, and let it run at the scheduled time, then the tasks hangs indefinitely.

What is the correct way to set up the task and program it to run at an specific time without having to be logged on to the machine where the task resides?

 

I hope this makes sens and it's clear, if not, please let me know.

Thank you very much for your help. 



 Category Survey
 09/06/2012 03:21 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hi Alex,

Is there anyway for you to test the logon sequence outside of Remote Desktop? Are you able to sit in front of the machine or use a third party tool like VMWare, LogMeIn or RealVNC?

By doing this we can make sure that AutoMate is sending control alt delete and getting past any security screens you may have.

 Category Survey


-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 11/08/2012 02:58 PM
User is offline View Users Profile Print this message

Author Icon
IgorKucera
n00b (>6 posts)

Posts: 1
Joined: 05/25/2011

I'm having exactly the same problem in Automate 9. The same script works fine in Automate 8 AND in the task builder in Automate 9. But as soon as it's run directly from the task administrator, it's failing.

I unfortunately can't provide you with my full code since it's a password protected page.

 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)
 11/09/2012 06:51 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Igor,

Please open a thread in the appropriate forum. You are running AM9 and not AM7.



 Category Survey
AutoMate 7 version:
Windows version:


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 1895 guests browsing this forum, which makes a total of 1895 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog