Sign in to follow this  
Followers 0
Prestige

Simple Button and URL

9 posts in this topic

I'm super stupid, I'm done with my program, and now I want to learn how to program a button to go to a certain URL using the default browser.

 

I tried 

If Case $Website ;<---- That is the button Variable
ShellOpen("Website URL")
Endif

Help please?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

shellexecute()  maybe ???

shellopen does not exist

if case doesn't exist either, so you should consider using the helpfile.

E.

If GUIGetMsg()=$Website Then ShellExecute("Website URL")
Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites

I tried the help file, And i'm sorry, I actually wrote ShellExecute but I was reading the script from the tip of my tounge

Share this post


Link to post
Share on other sites

don't know what more to say. everything is already said.


[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites

If U cannot work with this code, here is the full i wanted to perform... Perhaps you may help me find a flaw? For it says when I try to open the program, Line101 (File""):

Error: "Func" Statement has no matching "EndFunc".

#RequireAdmin

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEX.au3>
#Region ### START Koda GUI section ### Form=
Example()
Func Example()
   Local $msg

   GUICreate("Example",340,200)
   
   GUICtrlCreateButton("Suspend XTrap   ",20,20,100,40)
   GUICtrlCreateButton("Suspend HGWC    ",20,60,100,40)
   GUICtrlCreateButton("Suspend S4Client",20,100,100,40)
   GUICtrlCreateButton("Resume XTrap    ",120,20,100,40)
   GUICtrlCreateButton("Resume HGWC     ",120,60,100,40)
   GUICtrlCreateButton("Resume S4Client",120,100,100,40)
   GUICtrlCreateButton("Kill XTrap      ",220,20,100,40)
   GUICtrlCreateButton("Kill HGWC       ",220,60,100,40)
   GUICtrlCreateButton("Kill S4Client   ",220,100,100,40)
$Exit    =      GUICtrlCreateMenuItem("Exit",1)
$Website =      GUICtrlCreateButton("Team Genesis and Madskillz S4 League Suspender",0,0,340,20)
   
   $Label1 = GUICtrlCreateLabel("       Not Running",20,160,100,40)
   GUICtrlSetColor($Label1,0xFF0000)
   
   $Label2 = GUICtrlCreateLabel("       Not Running",120,160,100,40)
   GUICtrlSetColor($Label2,0xFF0000)
   
   $Label3 = GUICtrlCreateLabel("       Not Running",220,160,100,40)
   GUICtrlSetColor($Label3,0xFF0000)
#EndRegion
   While 1
        $nMsg = GUIGetMsg()
         Switch $nMsg 
     Case $GUI_EVENT_CLOSE, $Exit 
        Exit
     Case $Website
        ShellExecute("http://www.s4pvpers.webs.com/")
   EndSwitch
wEnd

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

;http://www.autoitscript.com/forum/topic/153171-simple-button-and-url/#entry1102138
;Post #6
;D:\DOKUME~1\ADMINI~1\LOKALE~1\Temp\SLICER\Avatar\photo-thumb-80185.jpg
;by Prestige

;Script grabbed by SLICER by Edano here: http://www.autoitscript.com/forum/topic/152402-slicer-autoit-forum-script-grabber/?p=1093575

#RequireAdmin

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEX.au3>
#Region ### START Koda GUI section ### Form=
Example()
Func Example()
    Local $msg

    GUICreate("Example", 340, 200)

    GUICtrlCreateButton("Suspend XTrap   ", 20, 20, 100, 40)
    GUICtrlCreateButton("Suspend HGWC    ", 20, 60, 100, 40)
    GUICtrlCreateButton("Suspend S4Client", 20, 100, 100, 40)
    GUICtrlCreateButton("Resume XTrap    ", 120, 20, 100, 40)
    GUICtrlCreateButton("Resume HGWC     ", 120, 60, 100, 40)
    GUICtrlCreateButton("Resume S4Client", 120, 100, 100, 40)
    GUICtrlCreateButton("Kill XTrap      ", 220, 20, 100, 40)
    GUICtrlCreateButton("Kill HGWC       ", 220, 60, 100, 40)
    GUICtrlCreateButton("Kill S4Client   ", 220, 100, 100, 40)
    $Exit = GUICtrlCreateMenuItem("Exit", 1)
    $Website = GUICtrlCreateButton("Team Genesis and Madskillz S4 League Suspender", 0, 0, 340, 20)

    $Label1 = GUICtrlCreateLabel("       Not Running", 20, 160, 100, 40)
    GUICtrlSetColor($Label1, 0xFF0000)

    $Label2 = GUICtrlCreateLabel("       Not Running", 120, 160, 100, 40)
    GUICtrlSetColor($Label2, 0xFF0000)

    $Label3 = GUICtrlCreateLabel("       Not Running", 220, 160, 100, 40)
    GUICtrlSetColor($Label3, 0xFF0000)
    GUISetState()
    #EndRegion ### START Koda GUI section ### Form=
    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE;, $Exit
                Exit
            Case $Website
                ShellExecute("http://www.s4pvpers.webs.com/")
        EndSwitch
    WEnd
EndFunc

.

yw E

Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites

yes "Error: "Func" Statement has no matching "EndFunc"." does mean something crystal clear


[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites

I LOVE YOU :D THANK YOU!

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  
Followers 0