Looking for reliable way to conditionally check on IE and take some actions on it

Hello all, I’ve been trying to work this issue for a week or so on and off (I don’t use PS much at all in my work) and having some issues getting reliable results.

In short: I can’t get anyone to actually fix an error for a network resource that we have to access, so I’m looking to script a workaround for now.

Situation: local PC uses a secondary monitor to watch a specific html file which is constantly being written to by offsite processes. Essentially, as work occurs, this monitor will display each new addition to that particular form. The markup has a meta refresh in it to try to keep abreast of changes. I think it runs every second.

Or tries to– the issue:

It breaks. Either IE stops refreshing on that meta tag or the session seems to break entirely.

What we do– if it’s just stopped updating, throw an f5 to refresh and carry on. If it’s bombed to, ‘this page can’t be displayed’, we generally have to close IE and restart it.

I’ve played with this in various ways, making a little wscript shell to AppActivate and send F5s occasionally, but when the session breaks up entirely, I am unable to come up with a reliable, consistent solution. Sometimes throwing the browser an alt+Home(%{HOME}) will resolve the broken session (Home button for IE if you’re not in full-screen) and other times it won’t.

What I’m working on: checking the content of the tab, if it’s not ‘This page…’, throw the refresh, if it’s ‘This page can’t be displayed’, do a clean shutdown of IE and restart it (it will default to the correct page upon restart).

I’ve been able to:

Script effectively enough to check the main window for ‘This page’ and cleanly shutdown and restart IE if it’s present.

Throw refreshes at the session.

Loop some of that(very small memory use, 18-22MB).

What I need help with is unifying everything into something coherent. I’ve tried lots of promising leads but seem unable to make things behave reliably. I really wanted to do a crash course in PS this weekend but familiar engagements made it impossible.

I’m sorry I don’t have access to the environment right now so my notes are incomplete. I will be back at this in the morning and would really appreciate you good folks maybe giving me some places to look when I get in. The materials for PS are enormous and I’ve undoubtedly gone down some false trails, wasting time I don’t currently have.

Thanks in advance for anyone willing to lend some of their own time and expertise to my effort.

P.S. Yes I’m working on getting the /actual/ issue fixed but everyone is silo’d in this environment and the bandaid would go a long way toward me getting caught up on other work while the powers that be decide whether or not to look into the core issue.

Thanks!

submitted by /u/thisisntmeatallyo
[link] [comments]

Leave a Reply