Jump to content
Sign in to follow this  
Hooch

Launch IE as "pop-up"

Recommended Posts

ok, here is a script to make your script. :)

; change quotes to #q# and @CRlf to #CR#
; and spit out code
$x=clipget()
$x=StringReplace(StringReplace($x,@CRLF,"#cr#"),'"','#q#')
$out=StringReplace("$x=StringReplace(StringReplace($x,*#cr#*,@CRLF),'#q#','*')",'*','"')
clipput('$x="' & $x & '"' & @CRLF & $out)
msgbox(1,"this will go into memory",'$x="' & $x & '"' & @CRLF & $out)

copy that poppup JS, and run this, and it will put your code into memory

<{POST_SNAPBACK}>

Hmm strange behaivor, if I have no IE windows active I get the prompt that an application wants to close the window, but if I have any IE window active at all it doesn't prompt me.. wierd

Share this post


Link to post
Share on other sites

perhaps an .hta file...

Lar.

<{POST_SNAPBACK}>

:) well that got rid of the one prompt but now it prompts for file download and warns about malicious code.

Share this post


Link to post
Share on other sites

:) well that got rid of the one prompt but now it prompts for file download and warns about malicious code.

<{POST_SNAPBACK}>

Well brute force and ignorance, I am just sending an {ENTER} to close the prompt. Kinda lost its sex appeal though...

Share this post


Link to post
Share on other sites

Ok, I'm stupid. I had forgotten about one of my js attempts at closing the window, had it in the the html of the page I was loading into the popup. :)

So, in conclusion, scriptkitty's solution was bang on.

Share this post


Link to post
Share on other sites
Guest Py7|-|[]/\/

Yesterday I wrote a script that writes its own autoit file, then compiles it, then places itself into the startup menu, (for my brother's amusement), but his McAfee blocked it and called it a trojan. LOL.

Share this post


Link to post
Share on other sites

Hey ScriptKitty, Question...

You gave me the solution here but I am curious as to WHY it works? What I am seeing here is we use autoit to write the file but then we still fire iexplore to run the parent window. So I don't get why we don't still get the prompt. At that point do we not have the same environment as if I had manually opened the IE window? Does autoit gain some sort of control over a window because it launched it?

Share this post


Link to post
Share on other sites

Not sure if I understand your question fully, but let me explain some of the code and maybe it will show

$file="popup2.htm"
FileWriteLine($file,$x)

Run('C:\Program Files\Internet Explorer\IEXPLORE.EXE -k '& @ScriptDir &'\'&$file,'',@SW_HIDE)

the first two lines simply create the file popup2.htm

the last line shown starts up IE hidden while loading the file popup2.htm.

The hidden IE window spawns up your popup. and then we close the IE explorer window AutoIt started.

If you manually open the file, which you can, you will open it and it will spawn up the popup as well. Prompt?

You can open explorer in Kiosk mode (which is close to this view), but netscape doesn't have that. This solution actually does work in both.

As a side note, all the hotkeys still work, so hit ^o when the window is open, and you can type in a new address to browse. :)


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Let's see if I can articulate better. The original need for this was because if we launch a pop-up and try to close the parent with js or even autoit you were prompted by windows for permission to close the parent window.

I didn't want the prompt. So you showed me this method, I fully understand what we are doing with the autoit script, what I don't understand is why we can close the hidden IE parent window we fired without getting the prompt.

Although we hide the window it is still an instance of IE and the parent of the pop-up so Windows should still be asking for permission to close it when we attempt that with winclose().

Better?

Share this post


Link to post
Share on other sites

I think the reason it was asking you for confirmation isnt because of the way the new window was opened, but I bet it was part of some more js on that page. I have had several webpages ask that and they didnt have popups. So I think it had to do with some other code that was on the page.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

I don't think so, make any type of pop-up and then use opener.close or even self.close on the parent and you will get the prompt. It's a security mechanism.

Share this post


Link to post
Share on other sites

Sorry Hooch. :-/ I havent had this problem. So I was just offering a suggestion. You are probably correct in the security mechanism it does make sense.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Ah, yes I see now.

Javascript has a lot of security measures in place to limit what you can and cannot do. This is for protection. If you run an exe, or click the close box yourself with a mouse, you don't have those same popup boxes.

AutoIt can close windows with a bunch of methods, including clicking the close, winclose,winkill, sending !{f4}, etc etc.

Your do you wish to close this window is from your JS. By the way, you can make your popup close without the box as well, if you have autoit runing in the backround. AutoIt can look for a certain title to show and then close when found for instance.

Some browsers stop any window from closing itself, as well as removing JS ability to open a popup.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

I tried closing that parent with all the autoit functions and there was no love. I like the scriptkitty solution at this point because it ensures the parent that produces the pop-up is never shown.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...