paulja Posted December 14, 2015 Share Posted December 14, 2015 Disclaimer: I am a complete tyro with scripting, and I don't know if what I'm asking is so simple that no one's needed to ask it, or so out of scope that no one would think to ask it. In any case, I don't see this asked before. At my job, there's a web-based system we use Internet Explorer for. On the last update it added a security "feature" where it logs you out after ten minutes of inactivity. Well, there are times when we don't need to work on the system but we want to hop back in when we need to. So I want to write a script to give it a refresh every 9 minutes and 45 seconds or so, but I don't want it to have the window pop up on me and kick me out of Word or Excel or whatever. I tried: AutoItSetOption("WinTitleMatchMode",2)ControlSend("Internet Explorer","","Internet Explorer","{F5}") And it appears I have two problems. First, even if I activate the window beforehand, IE doesn't recognize the F5 as a command to refresh, or indeed any keystrokes sent by ControlSend. This appears to be specific to IE, as I can do it with Notepad and have it enter text. Second, even with Notepad, it doesn't work when the window is inactive. I can't have it "ghost write" any text on an inactive Notepad window. So, is there any way to send a surreptitious refresh command to an IE window? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 14, 2015 Moderators Share Posted December 14, 2015 Hi, @paulja, welcome to the forum. Take a look at the IE functions in the help file. I would suggest looking at _IEAttach to attach to the existing window, and then look at _IEAction, as there is a command for "refresh". Read through both sections in the help file, and try out the examples for yourself. Then try it on your current window; if you run into problems post your code back here and we'll do our best to assist "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
jguinch Posted December 14, 2015 Share Posted December 14, 2015 Maybe you can use _IExxx functions, like _IEAttach +_IEAction($oIE, "refresh"). Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now