Hi,
I'm running a script on a secure website, and this particular website logs you out (quickly, but not immediately) if another browser logs in using the same user id. I'm trying to build some code that will detect a logout, and branch to my login code.
Here's the problem, I think:
The script is running so fast that the website doesn't logout the script browser session before I execute my next IE_ClickTag... I think what is happening when I create this condition is that the script clicks, the script browser session is then logged out, and is not taken to the page it expects... it probably gets a return code from the website that tells the script that it is no longer logged in. Then macro scheduler, not my code, throws up this dialog box that says "Access is Denied" with a big red X.
When I see that, the script stops dead in its tracks.
I can't isolate this behavior, because when I step through the code, the website has enough time to logout the script's browser session.
That's why I'm guessing. Is this right? More importantly, what can I do to either avoid the dialog box entirely, or use code to dismiss it, given my situation?
Tx,
George
"Access is Denied" dialog box
Moderators: JRL, Dorian (MJT support)
"Access is Denied" dialog box
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Have you tried slowing the script down and giving IE more time to react to events? Add some waits, or slow the script down by setting STEP_DELAY.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Hi,
No, I've not tried that, I certainly can for diagnosis purposes, but ultimately, I'm working against the clock, so I need the speed that the script currently provides.
Maybe I can try a quick refresh of the page before I try to work with it, hopefully that won't add too much time to the overall script. I think that the IE_ClickTag command will fail without a dialog box if there is nothing to click, is that right?
Is there no way to intercept the dialog, or to turn off the dialog completely?
Tx,
George
No, I've not tried that, I certainly can for diagnosis purposes, but ultimately, I'm working against the clock, so I need the speed that the script currently provides.
Maybe I can try a quick refresh of the page before I try to work with it, hopefully that won't add too much time to the overall script. I think that the IE_ClickTag command will fail without a dialog box if there is nothing to click, is that right?
Is there no way to intercept the dialog, or to turn off the dialog completely?
Tx,
George
Last edited by mightycpa on Wed Nov 19, 2008 1:58 pm, edited 2 times in total.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Well I'm not really sure what this dialog is or why you are getting it and personally I'd prefer to make sure it never appears than work around intercepting it. If, as you suppose, the dialog is appearing because the script is doing something it shouldn't or at the wrong time, then surely it's best to stop the script doing what it shouldn't or sort he timing out. However, if you want to intercept it you might be able to with an OnEvent handler. If it holds up the script then you will need to create another script, running at the same time, which could be fired at the start of your main script, which simply waits for and cancels that dialog in a loop. Examples:
http://www.mjtnet.com/blog/2008/10/31/a ... processes/
http://www.mjtnet.com/blog/2008/03/04/o ... e-dialogs/
http://www.mjtnet.com/blog/2008/10/31/a ... processes/
http://www.mjtnet.com/blog/2008/03/04/o ... e-dialogs/
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Hi,
Thanks. Yes, I'm considering another script to dismiss the dialog if it comes up.
After I compile this script into an exe file, if this dialog comes up and I click it, will the first exe close and stop executing? Or does it resume where it left off, or does it start over from the beginning?
I just figured out that you said you don't know what this dialog is... is it possible that it is coming from the browser? I'd do a screenshot, but the refresh is actually being pretty effective. Unfortunately, I don't think it is foolproof.
Tx,
George
Thanks. Yes, I'm considering another script to dismiss the dialog if it comes up.
After I compile this script into an exe file, if this dialog comes up and I click it, will the first exe close and stop executing? Or does it resume where it left off, or does it start over from the beginning?
I just figured out that you said you don't know what this dialog is... is it possible that it is coming from the browser? I'd do a screenshot, but the refresh is actually being pretty effective. Unfortunately, I don't think it is foolproof.
Tx,
George
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
The second script clicking the dialog would do exactly the same as you clicking the dialog. So whatever happens when you dismiss the dialog would still happen.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
By the way, I think the problem arises from the website checking for double logins on a fixed schedule. I notice that when I log in twice, the original browser may log out almost immediately, or it might take close to a minute, or somewhere in between. Until then, the two browsers can both be logged in simultaneously.
This sounds like a server-side script that sets a flag or maybe kills a session variable once every n seconds; As a result, the logout timing is basically uncontrollable/unpredictable - even the refresh might miss it, although I think that will catch most of the occurrences. Getting that dialog box now is not as easy as it used to be.
For that Event Handler, would you suggest the WINDOW_OPEN Event Type? It is a plain old vanilla windows dialog box, much like the MessageModal, but it has the red X, and is not generated directly by my code.
The next time I see it, I'll capture a picture and post it.
Thanks for all your help with these problems.
George
This sounds like a server-side script that sets a flag or maybe kills a session variable once every n seconds; As a result, the logout timing is basically uncontrollable/unpredictable - even the refresh might miss it, although I think that will catch most of the occurrences. Getting that dialog box now is not as easy as it used to be.
For that Event Handler, would you suggest the WINDOW_OPEN Event Type? It is a plain old vanilla windows dialog box, much like the MessageModal, but it has the red X, and is not generated directly by my code.
The next time I see it, I'll capture a picture and post it.
Thanks for all your help with these problems.
George
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Yes. WINDOW_OPEN
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?