Jump to content

Recommended Posts

Posted

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.

Posted

I can close it. Just tried and it closes.

I think you have posted only some part of you script and the problem is not in this part of it.

I feel nothing.It feels great.

Posted

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
Posted

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.

Posted

Could be an advertisment on the site you are opening.

Or check ur browser setting. With the code above this thing doesnt happen

I feel nothing.It feels great.

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
×
×
  • Create New...