Prestige Posted August 1, 2013 Share Posted August 1, 2013 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? Link to comment Share on other sites More sharing options...
Edano Posted August 1, 2013 Share Posted August 1, 2013 (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 August 1, 2013 by Edano [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
Prestige Posted August 1, 2013 Author Share Posted August 1, 2013 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 Link to comment Share on other sites More sharing options...
Prestige Posted August 1, 2013 Author Share Posted August 1, 2013 Just came home Heres the end of my code While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit IF Case $Website Then ShellExecute("http://www.s4pvpers.webs.com/") Endif Wend EndFunc ... Anything Im doing wrong? Link to comment Share on other sites More sharing options...
Edano Posted August 1, 2013 Share Posted August 1, 2013 don't know what more to say. everything is already said. [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
Prestige Posted August 1, 2013 Author Share Posted August 1, 2013 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". expandcollapse popup#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 More sharing options...
Edano Posted August 1, 2013 Share Posted August 1, 2013 (edited) expandcollapse popup;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 August 1, 2013 by Edano [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
Edano Posted August 1, 2013 Share Posted August 1, 2013 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] Link to comment Share on other sites More sharing options...
Prestige Posted August 1, 2013 Author Share Posted August 1, 2013 I LOVE YOU THANK YOU! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now