Sign in to follow this  
Followers 0
William112792

Script: Help importing cookies in the background for IE11

1 post in this topic

We are trying to run the Import/Export Settings to Import Cookies from a cookie.txt file into the Internet Browser but we want to make it run in the background so any users don't accidentally mess it up when they start working on the machine. We want to make it a part of the startup so it will load the cookies from log on. We can do the startup settings on our own but we been having trouble when we make the script run in the background it stalls out on the wait sequences and if we take out the wait sequences it still doesn't work properly.
 

This is what we have so far:
 

#include <IE.au3>

Opt("WinWaitDelay", 500)

Local $oIE = _IECreate("about:blank", 0, 1)

Sleep(500)
Send("!f")
Sleep(500)
Send("m")
WinWait("Import/Export Settings", "Import from a file")
ControlClick("Import/Export Settings", "Import from a file", "Button2")
Sleep(500)
ControlClick("Import/Export Settings", "Import from a file", "Button5")
Sleep(500)
WinWait("Import/Export Settings", "Cookies")
ControlClick("Import/Export Settings", "Cookies", "Button3")
Sleep(500)
ControlClick("Import/Export Settings", "Cookies", "Button12")
Sleep(500)
ControlSetText("Import/Export Settings", "", "Edit1", @UserProfileDir & "Documentscookies.txt")
Sleep(500)
ControlClick("Import/Export Settings", "", "Button17")
Sleep(500)
WinWait("Import/Export Settings", "Finish")
ControlClick("Import/Export Settings", "Finish", "Button19")
WinWaitClose("Import/Export Settings")

_IEQuit($oIE)


Any help would be much appreciated.

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0