Jump to content
Sign in to follow this  
HARNOvHARNO

problem with if and endif

Recommended Posts

While 1
    $msg = GUIGetMsg()
    
    If $msg = $fileitem Then
        $file = FileOpenDialog("Choose file...",@TempDir,"All (*.*)")
        If @error <> 1 Then GUICtrlCreateMenuitem ($file,$recentfilesmenu)
    EndIf 
    If $msg = $viewstatusitem Then
        If BitAnd(GUICtrlRead($viewstatusitem),$GUI_CHECKED) = $GUI_CHECKED Then
            GUICtrlSetState($viewstatusitem,$GUI_UNCHECKED)
            GUICtrlSetState($statuslabel,$GUI_HIDE)
        Else
            GUICtrlSetState($viewstatusitem,$GUI_CHECKED)
            GUICtrlSetState($statuslabel,$GUI_SHOW)
        EndIf
    EndIf
    If $msg = $GUI_EVENT_CLOSE Or $msg = $exititem Then ExitLoop
    If $msg = $infoitem Then Msgbox(0,"Webeditor","this is just a test")
    If $msg = $newitem Then Msgbox(0,"Webeditor","testing")
                                








WEnd
GUIDelete()

Exit

i would like (If $msg = $newitem) to do more then one thing but if im doing somthing else below it will just show the msg box at startup, and if i use the endif on it i will get an error tilling me no matching if statment was found

Edited by HARNOvHARNO

Share this post


Link to post
Share on other sites

replacing :

If $msg = $newitem Then MsgBox(0, "HvHWebeditor", "testing")

With:

If $msg = $newitem Then 
        MsgBox(0, "HvHWebeditor", "testing")
    EndIf

Should work....


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

If $msg = $newitem Then
        MsgBox(0, "HvHWebeditor", "testing")
       ;Do something code
       ;More Do something code
EndIf

Share this post


Link to post
Share on other sites

replacing :

If $msg = $newitem Then MsgBox(0, "HvHWebeditor", "testing")

With:

If $msg = $newitem Then 
        MsgBox(0, "HvHWebeditor", "testing")
    EndIf

Should work....

<{POST_SNAPBACK}>

this below wouldent work?

EndIf
    If $msg = $GUI_EVENT_CLOSE Or $msg = $exititem Then ExitLoop
    If $msg = $infoitem Then Msgbox(0,"HvHWebeditor","this is just a test")
    If $msg = $newitem Then MsgBox(0, "Webeditor", "testing") MsgBox(0, "Webeditor", "testing2")
                               EndIf

so i do have to do it on the next line??

not that it matters, but in html or css it dident matter if i did stuff on the same line.

enyway i hope to make an webeditor witch can edit css and html from an grapic user interface. to start with just an generrator to make image galleries with. but as i get better i might improve it if possible and as autoit gets better

Edited by HARNOvHARNO

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...