I just observed the following in Macro Scheduler 14.2.03...
In the RunProgram> command...
By setting the RP_WINDOWMODE variable programs can be executed minimized, maximised, hidden or normal. RP_WINDOWMODE can be one of the following :
0: Hidden
1: Normal (default)
2: Minimized
3: Maximized
...so I use the following to open a new browser window hidden...
Code: Select all
//make the window hidden
Let>RP_WINDOWMODE=0
//line below will instantiate a new IE window which will be hidden and NOT EVEN FLASH
Run>C:\Program Files\Internet Explorer\iexplore.exe about:blank
//reset to normal
Let>RP_WINDOWMODE=1
Then I tried the exact same code on a machine with IE11 installed as the default browser and it does not work the same. The new IE11 browser window does get created however it is not hidden!
Marcus is this a bug with the RunProgram> command wrt IE11? If so, please fix as it would be great if this worked as well with IE11 as it does with IE8.
So then I tried to achieve this using the new native IE commands... I came up with the following:
Code: Select all
//Create new IE instance and return new IE instance handle in IE[0] variable
IECreate>IE[0]
//Hide IE[0] instance as fast as we can!
IEShowIE>IE[0],0
MDL>New IE window should be hidden but did it flash? Click OK and I will show it...
//Show IE[0] instance
IEShowIE>IE[0],1
Marcus, is there any way to change the behavior of IECreate> so that it could open a new IE window in HIDDEN mode instead?
Another IECreate> parameter maybe?
Or even a new System Variable (directive) we could set to control this... so if we did the following...
Let>IE_CREATE_HIDDEN=1
...then IECreate> would then create the new IE window as hidden.
I believe this would be a good feature as often its nice to be able to re-size, position and navigate a browser window to a particular page BEFORE showing it to a user... so if we could create them hidden in the first place we could do all this and show them when ready... and no flashing would be seen.
Of course if RunProgram> could be fixed so that it honors RP_WINDOWMODE=0 then that would also work as well.
Or... if someone out there know how to achieve this with IE11 installed as the default browser and NO flashing, then please share.
Thanks and take care