Sign in to follow this  
Followers 0
fredp1

Checking Status of task in task manager

4 posts in this topic

Hi,

This is my first post:-)

I'm using AutoIt to simulate some key strokes in Microsoft Navision and perform an "approval fucnction" in Nav that causes the window to "freeze" until the task has finished.

This approval function is Nav can take anywhere from 15-120sec to run per item. I would only like to wait until the window has "unfrozen"/responding again as I have about 5000 item to approve.

How do I get AutoIt to wait until this task in Windows task manager has changed it status from "Not Responding" to "Running"?

This is what I've done so far

;This is the window that starts just before I press enter

$scrn1 = "Microsoft Dynamics NAV - [5060680 "& $partid &" - Verific. Audit Trail Entry]"

WinWaitActive($scrn1, "",20);Change Title

Send("{Enter}")

sleep(100)

;When Enter was pressed from above the system can freeze for up to 120secs.

;At this point the Window/PC freezes until Nav performs its approval function so wait until the next window pops up

$scrn1 = "Microsoft Dynamics NAV - ["& $partid &" "&$version&" "&$desc&" "& "- Manufacturing Specification Card"

WinWaitActive($scrn1, "",200)

The above code isn't working.... any suggestions please?

Any debugging I can use?

Thanks

Fred

Share this post


Link to post
Share on other sites



Try

while 1; do infinate loop, if so that program wont continue before  something happens
If not StringInStr("Your title","not responding") then
;if windows title don't have notresponding in it, program will continue
;your code here
endif
sleep(250)
wend

edited

Share this post


Link to post
Share on other sites

Try

while 1; do infinate loop, if so that program wont continue before  something happens
If not StringInStr("Your title","not responding") then
;if windows title don't have notresponding in it, program will continue
;your code here
endif
sleep(250)
wend

Thanks for the quick response.

How do i get the Title with the string "not responding" reurned to AutoIt?

Is there a function that will return the tile of the active window?

I'm not even sure that the Title changes name to have the string "not responding" in it.

Any help I an get would be great.

Thanks

Share this post


Link to post
Share on other sites

Type "" as win title, then its active window and works in every win command

U can also try "[Active]"


edited

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0