Jump to content

Recommended Posts

Hi!,

Please can anyone help me with my script, because i cannot close the GUI after clicking on the link.

#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <IE.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 146, 80, 192, 124)
$Label1 = GUICtrlCreateLabel("Link that Opens Google", 16, 32, 116, 17)
GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Label1
$oIE = _IECreate ("[url="http://www.google.com"]www.google.com[/url]")
EndSwitch
WEnd

Thank You.

Link to comment
Share on other sites

So if you want to open a link I recomend you use ShellExecute, because it will open in defect broswer.

#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 146, 80, 192, 124)
$Label1 = GUICtrlCreateLabel("Link that Opens Google", 16, 32, 116, 17)
GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Label1
$oIE = ShellExecute("http://www.google.com")
EndSwitch
WEnd
Link to comment
Share on other sites

Okay! thank you

Please! i have another question,

When i click on the GUI link there's two browsers opening up. There's one with the Google webpage and the other one seem to be blank yet still loading.

Now if this is happening to me how can i just open only one website instead of two?

Thank You.

Link to comment
Share on other sites

If it were me, I'd be looking for problems on my computer.

Infections of some sort, it is supposed to, and does open only one browser

on a healthy computer.

EDIT: or what ileandros said.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
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
 Share

×
×
  • Create New...