imacros browser not running under lock screen

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
User avatar
vardipoor.m
Posts: 34
Joined: Sun Jan 17, 2021 8:58 am

imacros browser not running under lock screen

Post by vardipoor.m » Fri Mar 19, 2021 8:36 am

hi
i use imacros browser enterprise v12.6 and w10 pro x64

i have running the imacros browser by vbscript through task scheduler(setting to run at logon) and when system unlocked, its working properly but it cant run when my system is locked! Runs but is frozen.

This is almost my last adventure with imacros browser. I have learned most tricks except this
Thanks to the clever and clean administrator of this forum
Tom, Tech Support
Posts: 3684
Joined: Mon May 31, 2010 4:59 pm

Re: imacros browser not running under lock screen

Post by Tom, Tech Support » Mon Mar 22, 2021 8:59 am

vardipoor.m wrote:
Fri Mar 19, 2021 8:36 am
hi
i use imacros browser enterprise v12.6 and w10 pro x64

i have running the imacros browser by vbscript through task scheduler(setting to run at logon) and when system unlocked, its working properly but it cant run when my system is locked! Runs but is frozen.

This is almost my last adventure with imacros browser. I have learned most tricks except this
Hi vardipoor,

I'm just a tad bit confused, how is it possible for the system to be locked during logon? There seems to be a contradiction in what you have described. You say that the scheduled task is set to run at logon, but that it isn't working because the system is locked. I don't see how the system can be locked during logon, that doesn't make sense to me.

Also, what exactly is frozen? Is it the script or the macro/browser that is frozen? Are you able to reproduce the behavior when playing one of the demo macros, e.g. FillForm, from a vbscript through task scheduler?
Regards,

Tom, iMacros Support
User avatar
vardipoor.m
Posts: 34
Joined: Sun Jan 17, 2021 8:58 am

Re: imacros browser not running under lock screen

Post by vardipoor.m » Mon Mar 22, 2021 10:06 am

hi tom
I'm just a tad bit confused, how is it possible for the system to be locked during logon?
It was my fault, Maybe I set the task scheduler wrong. Which option should be on to run when the system is turned on and behind the lock screen?

My macro runs directly via vbscript. When the system locks up and after a few seconds I do unlock the system I see that the bottom of the iMacros browser is written, it is finished correctly. But only my Macro 1 has been played. I have about 10 other macros to run.
Also, what exactly is frozen?
And in your answer I must say that freezing may not be the right word to explain my problem. The problem is that other macros do not run, but working well when the system is unlocked
Thanks to the clever and clean administrator of this forum
Tom, Tech Support
Posts: 3684
Joined: Mon May 31, 2010 4:59 pm

Re: imacros browser not running under lock screen

Post by Tom, Tech Support » Mon Mar 22, 2021 10:40 am

vardipoor.m wrote:
Mon Mar 22, 2021 10:06 am
My macro runs directly via vbscript. When the system locks up and after a few seconds I do unlock the system I see that the bottom of the iMacros browser is written, it is finished correctly. But only my Macro 1 has been played. I have about 10 other macros to run.
So it is playing at least one macro in this state. What is iimPlay returning (what is the error code) when it attempts to play the other macros? You might need to modify your script to log this information so you can get a better idea of what may be occurring.
Regards,

Tom, iMacros Support
User avatar
vardipoor.m
Posts: 34
Joined: Sun Jan 17, 2021 8:58 am

Re: imacros browser not running under lock screen

Post by vardipoor.m » Tue Mar 23, 2021 9:37 am

Screenshot 2021-03-23 124912.jpg
as you can see in the picture i setting my macro to restart imacros browser after 50 loops in vbscript(for prevent mem leaking). this method is working fine when system unlocked but when i run it and lock system and when unlock system and check it i see it ended after loop 50 (shows it in the pic). This means that the macro only gets in trouble when it wants to reopen.
i just use this codes to reopen it

Code: Select all

         iim.iimClose()
         iret = iim.iimOpen("")
AND
The interesting thing is that after a few minutes when the system is unlocked, the macro continues with no problem!
Thanks to the clever and clean administrator of this forum
User avatar
vardipoor.m
Posts: 34
Joined: Sun Jan 17, 2021 8:58 am

Re: imacros browser not running under lock screen

Post by vardipoor.m » Tue Mar 23, 2021 9:40 am

What is iimPlay returning (what is the error code) when it attempts to play the other macros?
i use a log sub for every error but it dont return any error! As you can see in the picture, the macro stays in the same stage
Thanks to the clever and clean administrator of this forum
Tom, Tech Support
Posts: 3684
Joined: Mon May 31, 2010 4:59 pm

Re: imacros browser not running under lock screen

Post by Tom, Tech Support » Mon Mar 29, 2021 6:57 pm

vardipoor.m wrote:
Tue Mar 23, 2021 9:40 am
What is iimPlay returning (what is the error code) when it attempts to play the other macros?
i use a log sub for every error but it dont return any error! As you can see in the picture, the macro stays in the same stage

Well then, you probably need to specify a timeout value to iimPlay and then check for a timeout error (-3). When your script detects an iimPlay timeout, you can assume the macro is frozen and attempt to take corrective action, such as trying to restart the browser again.

Or, you might need to try a method like the one described in How to keep the Windows desktop active.
Regards,

Tom, iMacros Support
User avatar
vardipoor.m
Posts: 34
Joined: Sun Jan 17, 2021 8:58 am

Re: imacros browser not running under lock screen

Post by vardipoor.m » Mon Mar 29, 2021 9:27 pm

Well then, you probably need to specify a timeout value to iimPlay and then check for a timeout error (-3).
Excuse me but can I know how? You mean, like, vbs code(use do while loop and a variable for counter) or imacros code that i'm not aware of
ow i find it iiimPlay(<macro>, <timeout>)
ok i use it and I will report the result
Thanks to the clever and clean administrator of this forum
Post Reply