Jump to content

Simple Button and URL


Recommended Posts

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

;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]

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...