Very happy, and thank you once again for all your help most appreciated. So instead of using oAutoIt.WinSetState as you did, I’ve used oAutoIt.WinMove which allowed me to set both the position on the screen, and the size of the window. To my amazement, it worked! That is, it now sets the focus to the address bar.Īlso, once I had it working I decided to tweak it a bit because I didn’t want it maximized if it was avoidable. That didn’t help, so I tried something else: Once IE11 is running I can press Alt-D (the equivalent of your WshShell.SendKeys “%D”) and the cursor shows in the address bar, so I didn’t have any idea why the code wasn’t doing what it’s supposed to do.Īt first, after doing some searching on the internet, I tried a delay, like WScript.Sleep 2500 before WshShell.SendKeys “%D”. Then I decided maybe I can’t, so went looking for a fix or workaround. Disappointing, but I thought I could live with it. Voila! Worked almost like you described, except for the fact that focus wasn’t set to the address bar. dll, so uninstalled AutoIt and reinstalled it as a 64-bit program to C:\Program Files\. When I read your comments I figured you were pretty much on the ball, and decided there wasn’t any point trying to register the 64-bit. So I took their ‘advice’ and installed the 32-bit option to C:\Program Files (x86)\. When I installed AutoIt it seemed to be suggesting that I should choose the 32-bit option, for compatibility reasons, even though I’m running a 64-bit machine. Thank you so much, for taking the time to offer more feedback. Whatever Microsoft did during their last update to disable MSIE now prevents them from working, even if you disable the MSIE ⇒ Edge redirection they put in place, so now you have to manually enter an address to get it to open in MSIE. I created a shortcut to the vbscript that I use to start MSIE and, so far, it still works. Note: AutoIt has other options for controlling the Window size and position but my preference is to have it maximized. The oAutoIt commands in the script bring the MSIE11 window to the front, maximize it, and set the focus (i.e. OAutoIt.WinSetState "Internet Explorer", "", oAutoIt.SW_MAXIMIZE ' Set AutoIt windows title match option to "EXACT" Set oAutoIt = WScript.CreateObject("AutoItX3.Control")ĬreateObject("InternetExplorer.Application").Visible=true Set WshShell = CreateObject("WScript.Shell") ' Enable Object Commands for VBscript & AutoIt You can solve items 1 – 4 by using a combination of the following vbscript & AutoIt to open Internet Explorer. It seems to be a 50/50 chance of it occurring during update attempts and I’m not sure exactly what causes it (like a lot of MS error messages, the description of the problem doesn’t really help), but simply closing Edge and then restarting the manual update always works. Note: on my PC Edge sometimes throws an error when it reaches the 66% complete mark during the update process. To “manually” update Edge, I open Edge > Settings > About Microsoft Edge and it initiates a update check and installs the “latest update” if one’s available. These settings prevent Edge from auto-starting and auto-updating on my Windows 10 PC.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |