my problem

02/17/2014 23:01 REDAPRO#1
closed
02/18/2014 00:08 elmarcia#2
You mean this ?
Code:
GUICreate("Test",200,200)
$button=GUICtrlCreateButton("WTF",50,50,100,100)
GUISetState()
$link = "www.google.com.ar"
While 1
$msg = GUIGetMsg()
Switch ($msg)
	case -3
		Exit 0
case $button
ShellExecute($link)
EndSwitch
WEnd
Learn english first or use a better translator :$ // yo soy espaņol tambien :P
02/18/2014 22:51 mlukac89#3
U can use it like this, i tested no error

Code:
GUICreate("Test",250,250)
$button = GUICtrlCreateButton("Link button",50,50,150,150)
GUISetState()

;Add your link here
Dim $link = "http://www.elitepvpers.com/forum/autoit"

While 1
	$msg = GUIGetMsg()
	Switch ($msg)
		case -3
			Exit 0

		Case $button
			ShellExecute($link, "", "", "")
	EndSwitch
WEnd
02/19/2014 00:33 butter123#4
Quote:
Originally Posted by REDAPRO View Post
I am american check my address. But I was typing fast on my laptop keyboard. But where do I have to write the link?
Sorry for playing the grammar nazi here, but your respond was just too tempting...

The script posted by elmarcia works for me. You just have to make shure the url starts with www or [Only registered and activated users can see links. Click Here To Register...]
As an alternative you could also execute the browsers .exe with parameters to open it in a specific browser.
02/19/2014 09:50 alpines#5
You can leave the http:// or www. out if you use
Code:
Run("cmd.exe ""/c iexplore.exe " & $link & """")
instead.
02/23/2014 21:25 xKemya#6
I think this will work :
Code:
ShellExecute ( "Link" )
Make sure you type the Http 2 I mean the hole link!

So if you want to open elitepvpers, :
Code:
ShellExecute ( "http://www.elitepvpers.com" )
02/25/2014 16:37 xKemya#7
Quote:
Originally Posted by elmarcia View Post
You mean this ?
Code:
GUICreate("Test",200,200)
$button=GUICtrlCreateButton("WTF",50,50,100,100)
GUISetState()
$link = "www.google.com.ar"
While 1
$msg = GUIGetMsg()
Switch ($msg)
	case -3
		Exit 0
case $button
ShellExecute($link)
EndSwitch
WEnd
Learn english first or use a better translator :$ // yo soy espaņol tambien :P
This is better :

I think this will work :
Code:
ShellExecute ( "Link" )
Make sure you type the Http 2 I mean the hole link!

So if you want to open elitepvpers, :
Code:
ShellExecute ( "http://www.elitepvpers.com" )
Example :

Code:
 #cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.10.2
 Author:         myName

 Script Function:
	Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Example", 275, 133, 189, 124)
$Button1 = GUICtrlCreateButton("Elitepvpers", 8, 8, 257, 121)
GUICtrlSetFont(-1, 12, 400, 0, "Gill Sans Ultra Bold")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		 Case $Button1
			ShellExecute("http://www.elitepvpers.com")

	EndSwitch
WEnd