Jump to content

I hate Line 62 | Select Help


Recommended Posts

;***********************
; Dan's Main Menu
; Coded by: Dan
; August 2, 2006
;Find Dan at: 
;InvisionFreeSkins.com 
;and JavascriptFreek.com
;***********************

#include <GuiConstants.au3>
#include <Misc.au3>


; GUI
GuiCreate("Dan's Main Menu", 400, 400)
GuiSetIcon(@SystemDir & "\notepad.exe", 0)
$TagsPageC = GuiCtrlCreateLabel('Visit Homepage', 5, 180, 100, 15, $SS_CENTER)
GuiCtrlSetFont($TagsPageC,9,400,4)
GuiCtrlSetColor($TagsPageC,0x0000ff)
GuiCtrlSetCursor($TagsPageC,0)


; TEXT
GUICtrlCreateLabel ( "If you have not noticed this already, the thing above this text is a tab. Pretty neat " &@crlf &"eh? Well not really, but still :D! Lalala this is some text. Blah blah I like muffins, and chocolate. Tribe No 1 Fan is a n00b. I like TEXT!" &@crlf &"" &@crlf &"-Dan", 10, 200, 400, 100)
;GUICtrlSetStyle (-1, $SS_RIGHT )

; MENU
$filemenu = GuiCtrlCreateMenu ("File")
$fileitem = GuiCtrlCreateMenuitem ("Open...",$filemenu)
$recentfilesmenu = GuiCtrlCreateMenu ("Recent Files",$filemenu)
$separator1 = GuiCtrlCreateMenuitem ("",$filemenu)
$exititem = GuiCtrlCreateMenuitem ("Exit",$filemenu)
$helpmenu = GuiCtrlCreateMenu ("About")
$aboutitem = GuiCtrlCreateMenuitem ("About",$helpmenu)

; PROGRESS BAR
ProgressOn("Progress Meter", "Increments every second", "0 percent")
For $i = 1 to 100 step 10
    ProgressSet( $i, $i & " percent")
Next
ProgressSet(100 , "Done", "Complete")
sleep(500)
ProgressOff()


; TAB
GuiCtrlCreateTab(1, 0, 400, 190)
GuiCtrlCreateTabItem("Intro")
GuiCtrlCreateLabel("Welcome to Dan's Menu Program." &@crlf &" " &@crlf &"Of course if you trust me you would be seeing this right now. Because this an " &@crlf &".exe file. Not everyone trust's them kind of files as they contain harmful virus. So "& @crlf &"hats off you too. So, this is like my first favorite program I wrote. Sweet eh? Well "& @crlf &"not really, but I still like it!", 20, 40, 400, 100)
GuiCtrlCreateTabItem("Date")
GuiCtrlCreateLabel("Todays date: " &@MON &" " &@WDAY &", " &@YEAR &" " &@crlf &"" &@crlf &"So your name on the computer is: " &@UserName &"" &@crlf &"" &@crlf &"Screen resolution: " &@DesktopWidth &"x" &@DesktopHeight &"" &@crlf &"" &@crlf &"Operating System Version: " &@OSVersion &" ", 20, 40)
GuiCtrlCreateTabItem("Contact")
GuiCtrlCreateLabel("Find me at ZetaStyles.com! Username: Dan." &@crlf &"" &@crlf &"Got an IM? Want to quickly chat with me?" &@crlf &"" &@crlf &"MSN: Hunterz92@yahoo.com" &@crlf &"" &@crlf &"AIM: Writer Zombie " &@crlf &"" &@crlf &"Yahoo!: zombiekid92@yahoo.com" &@crlf &"" &@crlf &"Email(s): dan@zetastyles.com", 20, 40)
; GUI MESSAGE        LOOP
GuiSetState()

While 1
    $msg = GUIGetMsg()
   
    Select
        Case $msg = $fileitem
            $file = FileOpenDialog("Choose file...",@TempDir,"All (*.*)")
            If @error <> 1 Then GuiCtrlCreateMenuItem ($file,$recentfilesmenu)

        Case $msg = $exititem
            ExitLoop

While 1
    $msg = GUIGetMsg()
   
    Select
        Case $msg = $GUI_EVENT_CLOSE
            $oRP.SaveFile( @ScriptDir & "\RichText.rtf", 0 )
            ExitLoop

        Case $msg = $TagsPageC
            Run(@ComSpec & ' /c start http://www.javascriptfreek.com}','', @SW_HIDE)

        Case $msg = $aboutitem
            Msgbox(0,"About Dan's Menu","Dan's Main Menu" &@crlf &" " &@crlf &"http://javascriptfreek.com" &@crlf &"" &@crlf &"http://zetastyles.com" &@crlf &"" &@crlf &"©2006 Dan")
     
        Case $msg = $GUI_EVENT_CLOSE
Exit
    EndSelect
WEnd

Allright when i run it it says. Error: Select statement is missing. Blah blah.

Can anyone help me fix this code up? Btw I'm trying to add a click-able link.

[center]Cookyx.com :: Simple LAN Chat[/center]

Link to comment
Share on other sites

;***********************
; Dan's Main Menu
; Coded by: Dan
; August 2, 2006
;Find Dan at: 
;InvisionFreeSkins.com 
;and JavascriptFreek.com
;***********************

#include <GuiConstants.au3>
#include <Misc.au3>
Global $oRP

; GUI
GuiCreate("Dan's Main Menu", 400, 400)
GuiSetIcon(@SystemDir & "\notepad.exe", 0)
$TagsPageC = GuiCtrlCreateLabel('Visit Homepage', 5, 200, 100, 15, $SS_CENTER)
GuiCtrlSetFont($TagsPageC,9,400,4)
GuiCtrlSetColor($TagsPageC,0x0000ff)
GuiCtrlSetCursor($TagsPageC,0)


; TEXT
GUICtrlCreateLabel ( "If you have not noticed this already, the thing above this text is a tab. Pretty neat " &@crlf &"eh? Well not really, but still ! Lalala this is some text. Blah blah I like muffins, and chocolate. Tribe No 1 Fan is a n00b. I like TEXT!" &@crlf &"" &@crlf &"-Dan", 10, 250, 400, 100)
;GUICtrlSetStyle (-1, $SS_RIGHT )

; MENU
$filemenu = GuiCtrlCreateMenu ("File")
$fileitem = GuiCtrlCreateMenuitem ("Open...",$filemenu)
$recentfilesmenu = GuiCtrlCreateMenu ("Recent Files",$filemenu)
$separator1 = GuiCtrlCreateMenuitem ("",$filemenu)
$exititem = GuiCtrlCreateMenuitem ("Exit",$filemenu)
$helpmenu = GuiCtrlCreateMenu ("About")
$aboutitem = GuiCtrlCreateMenuitem ("About",$helpmenu)

; PROGRESS BAR
ProgressOn("Progress Meter", "Increments every second", "0 percent")
For $i = 1 to 100 step 10
    ProgressSet( $i, $i & " percent")
Next
ProgressSet(100 , "Done", "Complete")
sleep(500)
ProgressOff()


; TAB
GuiCtrlCreateTab(1, 0, 400, 190)
GuiCtrlCreateTabItem("Intro")
GuiCtrlCreateLabel("Welcome to Dan's Menu Program." &@crlf &" " &@crlf &"Of course if you trust me you would be seeing this right now. Because this an " &@crlf &".exe file. Not everyone trust's them kind of files as they contain harmful virus. So "& @crlf &"hats off you too. So, this is like my first favorite program I wrote. Sweet eh? Well "& @crlf &"not really, but I still like it!", 20, 40, 400, 100)
GuiCtrlCreateTabItem("Date")
GuiCtrlCreateLabel("Todays date: " &@MON &" " &@WDAY &", " &@YEAR &" " &@crlf &"" &@crlf &"So your name on the computer is: " &@UserName &"" &@crlf &"" &@crlf &"Screen resolution: " &@DesktopWidth &"x" &@DesktopHeight &"" &@crlf &"" &@crlf &"Operating System Version: " &@OSVersion &" ", 20, 40)
GuiCtrlCreateTabItem("Contact")
GuiCtrlCreateLabel("Find me at ZetaStyles.com! Username: Dan." &@crlf &"" &@crlf &"Got an IM? Want to quickly chat with me?" &@crlf &"" &@crlf &"MSN: Hunterz92@yahoo.com" &@crlf &"" &@crlf &"AIM: Writer Zombie " &@crlf &"" &@crlf &"Yahoo!: zombiekid92@yahoo.com" &@crlf &"" &@crlf &"Email(s): dan@zetastyles.com", 20, 40)
; GUI MESSAGE        LOOP
GuiSetState()

While 1
    $msg = GUIGetMsg()
   
    Select
        Case $msg = $fileitem
            $file = FileOpenDialog("Choose file...",@TempDir,"All (*.*)")
            If @error <> 1 Then GuiCtrlCreateMenuItem ($file,$recentfilesmenu)

        Case $msg = $exititem
            ExitLoop
            EndSelect
Wend
While 1
    $msg = GUIGetMsg()
   
    Select
        Case $msg = $GUI_EVENT_CLOSE
            $oRP.SaveFile( @ScriptDir & "\RichText.rtf", 0 )
            ExitLoop

        Case $msg = $TagsPageC
            Run(@ComSpec & ' /c start http://www.javascriptfreek.com}','', @SW_HIDE)

        Case $msg = $aboutitem
            Msgbox(0,"About Dan's Menu","Dan's Main Menu" &@crlf &" " &@crlf &"http://javascriptfreek.com" &@crlf &"" &@crlf &"http://zetastyles.com" &@crlf &"" &@crlf &"©2006 Dan")
     
        Case $msg = $GUI_EVENT_CLOSE
Exit
    EndSelect
WEnd

Link to comment
Share on other sites

Gosh darnit now the thing will not close if i click the X or File>>Exit

Well with the X it will but it will give me an error!

Well it will after many tried of clicking it! :cry:

The error says something is wrong with Line 74.

Edited by JavaScript_Freek

[center]Cookyx.com :: Simple LAN Chat[/center]

Link to comment
Share on other sites

didn't mess with the rich text stuff

;***********************
; Dan's Main Menu
; Coded by: Dan
; August 2, 2006
;Find Dan at:
;InvisionFreeSkins.com
;and JavascriptFreek.com
;***********************

#include <GuiConstants.au3>
#include <Misc.au3>
Global $oRP

; GUI
GUICreate("Dan's Main Menu", 400, 400)
GUISetIcon(@SystemDir & "\notepad.exe", 0)
$TagsPageC = GUICtrlCreateLabel('Visit Homepage', 5, 200, 100, 15, $SS_CENTER)
GUICtrlSetFont($TagsPageC, 9, 400, 4)
GUICtrlSetColor($TagsPageC, 0x0000ff)
GUICtrlSetCursor($TagsPageC, 0)


; TEXT
GUICtrlCreateLabel("If you have not noticed this already, the thing above this text is a tab. Pretty neat " & @CRLF & "eh? Well not really, but still ! Lalala this is some text. Blah blah I like muffins, and chocolate. Tribe No 1 Fan is a n00b. I like TEXT!" & @CRLF & "" & @CRLF & "-Dan", 10, 250, 400, 100)
;GUICtrlSetStyle (-1, $SS_RIGHT )

; MENU
$filemenu = GUICtrlCreateMenu("File")
$fileitem = GUICtrlCreateMenuitem("Open...", $filemenu)
$recentfilesmenu = GUICtrlCreateMenu("Recent Files", $filemenu)
$separator1 = GUICtrlCreateMenuitem("", $filemenu)
$exititem = GUICtrlCreateMenuitem("Exit", $filemenu)
$helpmenu = GUICtrlCreateMenu("About")
$aboutitem = GUICtrlCreateMenuitem("About", $helpmenu)

; PROGRESS BAR
ProgressOn("Progress Meter", "Increments every second", "0 percent")
For $i = 1 To 100 Step 10
    ProgressSet($i, $i & " percent")
Next
ProgressSet(100, "Done", "Complete")
Sleep(500)
ProgressOff()


; TAB
GUICtrlCreateTab(1, 0, 400, 190)
GUICtrlCreateTabItem("Intro")
GUICtrlCreateLabel("Welcome to Dan's Menu Program." & @CRLF & " " & @CRLF & "Of course if you trust me you would be seeing this right now. Because this an " & @CRLF & ".exe file. Not everyone trust's them kind of files as they contain harmful virus. So " & @CRLF & "hats off you too. So, this is like my first favorite program I wrote. Sweet eh? Well " & @CRLF & "not really, but I still like it!", 20, 40, 400, 100)
GUICtrlCreateTabItem("Date")
GUICtrlCreateLabel("Todays date: " & @MON & " " & @WDAY & ", " & @YEAR & " " & @CRLF & "" & @CRLF & "So your name on the computer is: " & @UserName & "" & @CRLF & "" & @CRLF & "Screen resolution: " & @DesktopWidth & "x" & @DesktopHeight & "" & @CRLF & "" & @CRLF & "Operating System Version: " & @OSVersion & " ", 20, 40)
GUICtrlCreateTabItem("Contact")
GUICtrlCreateLabel("Find me at ZetaStyles.com! Username: Dan." & @CRLF & "" & @CRLF & "Got an IM? Want to quickly chat with me?" & @CRLF & "" & @CRLF & "MSN: Hunterz92@yahoo.com" & @CRLF & "" & @CRLF & "AIM: Writer Zombie " & @CRLF & "" & @CRLF & "Yahoo!: zombiekid92@yahoo.com" & @CRLF & "" & @CRLF & "Email(s): dan@zetastyles.com", 20, 40)
; GUI MESSAGE        LOOP
GUISetState()

While 1
    $msg = GUIGetMsg()
    
    Select
        Case $msg = $fileitem
            $file = FileOpenDialog("Choose file...", @TempDir, "All (*.*)")
            If @error <> 1 Then GUICtrlCreateMenuitem($file, $recentfilesmenu)
            
        Case $msg = $exititem
            ExitLoop
        Case $msg = $GUI_EVENT_CLOSE
;~          $oRP.SaveFile (@ScriptDir & "\RichText.rtf", 0)
            ExitLoop
            
        Case $msg = $TagsPageC
            Run(@ComSpec & ' /c start http://www.javascriptfreek.com}', '', @SW_HIDE)
            
        Case $msg = $aboutitem
            MsgBox(0, "About Dan's Menu", "Dan's Main Menu" & @CRLF & " " & @CRLF & "http://javascriptfreek.com" & @CRLF & "" & @CRLF & "http://zetastyles.com" & @CRLF & "" & @CRLF & "©2006 Dan")
            
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
WEnd

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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...