Jump to content
Sign in to follow this  
bwq

IE acting differently when "Visible" is set to false

Recommended Posts

bwq

Here's a quick outline of what my program does:

- runs in the background, _IECreate with the F_VISIBLE parameter set to 0

- navigates to a web page

- fills in username and password

- there's a checkbox on the page, it's checked by default

- hits the submit button

- exits

Now, my web page keeps track of whoever filled in something. When the F_VISIBLE parameter is set to 1, everything works just fine, the database gets updated properly.

However, when the F_VISIBLE parameter is set to 0, everything runs the same, but the database does NOT get updated properly.

I was wondering if there's some kinda function that detects if the browser window is visible and if not, to just not update the database.

I've been clueless about this for a few days and I've been dying to know what exactly is going on.

So in short: F_VISIBLE set to 1 registers the new info, when set to 0 it doesn't.

Share this post


Link to post
Share on other sites
bo8ster

Can you post your code up - it may just be a logic issue.


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites
bwq

Well, nothing is changed from the _IECreate. It doesn't do anything different than the standard stuff. I'm just trying to figure out exactly why it's not working. Perhaps it's just bad luck but I'm pretty sure something doesn't work when the visible property is set to false.

Share this post


Link to post
Share on other sites
bo8ster

_IEPropertyGet can see if the browser is visible or not.


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites
DaleHohm

Hard to think of any common things that could cause a difference. Certainly possible that some arcane javascript is causing you trouble... as mentioned above, you can tell whentehr the browser is visible, you can sense the position of the mouse and some other things through client-side code.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites
bwq

Thanks for the input guys! I'm pretty sure it's related to the server side. In my autoit script I don't use anything such as _IEPropertyGet to see if it's visible.

I'm just wondering if there's any way for a website to see if your current browser window is visible or not. I've asked several people, experienced web developers, and all of them told me that it's just not possible to view this server-wise.

"you can sense the position of the mouse and some other things through client-side code."

This is some very interesting information, Dale. Could you please elaborate a bit more on this? If it's indeed possible through client-side code (javascript I take it) then I should be able to view it in the source code of the page, no?

Or is it possible that they use some PHP code to figure out if the page is visible to me or not, and do certain actions depending on the output.

I just got an idea, I could use _IEBodyReadText($OIE) and then write the output to a file, maybe that way I can find a difference ^_^.

Share this post


Link to post
Share on other sites
DaleHohm

DebugBar will show you all of the client-side script. It is the Evt object that can report coordinates of mouse clicks and such.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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  

×