This was in the log file of a script I have running. I have no idea why it failed, and I'm sure there was no window open that was only $. Any idea why it would have failed? Where that $ is comming from?
-WJF
IfWindowOpen>Select Company
3/21/2010 21:30:25:907 - END: else
3/21/2010 21:30:25:907 - START: GetActiveWindow>window_title,nXPos,nYPos,,
3/21/2010 21:30:25:907 - END: GetActiveWindow>window_title,nXPos,nYPos,,
3/21/2010 21:30:25:907 - START: $
3/21/2010 21:30:25:907 - END: $
3/21/2010 21:30:25:907 - START: windowAction>3,$
GetActiveWindow
Moderators: Dorian (MJT support), JRL
-
- Junior Coder
- Posts: 24
- Joined: Tue Sep 15, 2009 3:20 pm
GetActiveWindow
I think I can automate that!
-
- Junior Coder
- Posts: 24
- Joined: Tue Sep 15, 2009 3:20 pm
Active Window Garbage
Thanks for taking a look. I've moved onto another way of handling it, but still don't understand why the code didn't work.... Here is the raw code:
This script is to log onto our accounting software which they say can't be done by macro software. (I have figured out how to do this reliably with another approach)
label>Login
//Daily Billing Summary
RunProgram>C:\Program Files\Timberline Office\Accounting\IA.exe
WaitWindowOpen>Checking system settings
MoveWindow>Checking system settings,497,465
ResizeWindow>Checking system settings,285,60
// Focus the app
SetFocus>Checking system settings
//Recorded Events
Let>WW_TIMEOUT=120
Let>WSI_TIMEOUT=60
Let>FIP_SCANPIXELS=1000
let>sk_delay=10
CapsOff
wait>10
Send>User Login
Press Tab
Wait>1
Send>User Password
wait>1
Press Tab * 2
// ^=I've had problems with this not always working properly, anyone else?
Press Enter
wait>10
IfWindowOpen>Select Company
//login Successful
else
GetActiveWindow>window_title,nXPos,nYPos,,
Length>%window_title%,Lenwt
%window_title%
If>%lenwt%>1
windowAction>3,%window_title%
IfWindowOpen>Sage Timberline Office - Log On
WindowAction>3,Sage Timberline Office - Log On
endif
//login Failed attempting again
goto>Login
else
IfWindowOpen>Sage Timberline Office - Log On
WindowAction>3,Sage Timberline Office - Log On
endif
//login Failed attempting again
goto>Login
endif
endif
This script is to log onto our accounting software which they say can't be done by macro software. (I have figured out how to do this reliably with another approach)
label>Login
//Daily Billing Summary
RunProgram>C:\Program Files\Timberline Office\Accounting\IA.exe
WaitWindowOpen>Checking system settings
MoveWindow>Checking system settings,497,465
ResizeWindow>Checking system settings,285,60
// Focus the app
SetFocus>Checking system settings
//Recorded Events
Let>WW_TIMEOUT=120
Let>WSI_TIMEOUT=60
Let>FIP_SCANPIXELS=1000
let>sk_delay=10
CapsOff
wait>10
Send>User Login
Press Tab
Wait>1
Send>User Password
wait>1
Press Tab * 2
// ^=I've had problems with this not always working properly, anyone else?
Press Enter
wait>10
IfWindowOpen>Select Company
//login Successful
else
GetActiveWindow>window_title,nXPos,nYPos,,
Length>%window_title%,Lenwt
%window_title%
If>%lenwt%>1
windowAction>3,%window_title%
IfWindowOpen>Sage Timberline Office - Log On
WindowAction>3,Sage Timberline Office - Log On
endif
//login Failed attempting again
goto>Login
else
IfWindowOpen>Sage Timberline Office - Log On
WindowAction>3,Sage Timberline Office - Log On
endif
//login Failed attempting again
goto>Login
endif
endif
I think I can automate that!
The only time you're going to get to the point in the code that creates the posted lines from the log file, is when login fails. Are you sure that "IA.exe" doesn't open a window named "$"? The window might not be a visible window. Try using Macro Scheduler's "View System Windows" tool and look for a window named "$".
-
- Junior Coder
- Posts: 24
- Joined: Tue Sep 15, 2009 3:20 pm
Your correct, the only time the active window is collected is when it fails.
It is extremely difficult to log onto this specific application, as a result, as part of my efforts to finally get to a point where I can have a reliable login I've been collecting the active window to help me troubleshoot what is going on.
Almost all of my macros do work during the middle of the night, so I'm not sure what is really going on until I get in in the morning. And then I have a jumble of scripts running that make it difficult to decifer what has really occured.
It could be by the time I get in, that the window that was there isn't there anymore. I've never been able to find any of these windows even when searching for them in the window browser.
It is extremely difficult to log onto this specific application, as a result, as part of my efforts to finally get to a point where I can have a reliable login I've been collecting the active window to help me troubleshoot what is going on.
Almost all of my macros do work during the middle of the night, so I'm not sure what is really going on until I get in in the morning. And then I have a jumble of scripts running that make it difficult to decifer what has really occured.
It could be by the time I get in, that the window that was there isn't there anymore. I've never been able to find any of these windows even when searching for them in the window browser.
I think I can automate that!
Hi wjfinniganjds,
The user documentation does not say whether IfWindowOpen works with your WW_TIMEOUT setting. To be sure, precede it with a WaitWindowOpen command. Also set WF_TYPE to 2 so it will look for a visible window.
Try putting in a ScreenCapture at the point of failure so you can see what was going on in the middle of the night.
Gale
The user documentation does not say whether IfWindowOpen works with your WW_TIMEOUT setting. To be sure, precede it with a WaitWindowOpen command. Also set WF_TYPE to 2 so it will look for a visible window.
Try putting in a ScreenCapture at the point of failure so you can see what was going on in the middle of the night.
Gale
-
- Junior Coder
- Posts: 24
- Joined: Tue Sep 15, 2009 3:20 pm
Screen capture!
Hey that's a great idea thanks for that idea,
I don't know why a screen capture never occured to me.
I'll use that for trapping failures go forward
Thanks
-John
I don't know why a screen capture never occured to me.
I'll use that for trapping failures go forward
Thanks
-John
I think I can automate that!