Sign in to follow this  
Followers 0
poplat

running 2nd GUI

4 posts in this topic

i really need help

i've created one GUI and make another one to input data

i use in first include"secondGUI" but ...

when i run 2nd GUI alone it works perfectlu but when i run first GUI it came with the message:

Func close()

Error: 'Func' statement has no matching 'EndFunc'

when i remove every func line it works but no event on 2nd GUI

i do not know why , what am i doing wrong, or what i do not know

i wuld be gratefull for any advice and help

here is my 2nd GUI :

#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1)

$dane = GUICreate('Informacje o połączeniu', 280, 150)

;GUICtrlCreateLabel(GUICtrlRead($a1), 90, 10)

GUICtrlCreateLabel("Nazwa użytkownika: ",14 , 45)

$id = GUICtrlCreateInput ("", 115, 43, 140, 20)

GUICtrlCreateLabel("Hasło dostępowe: ", 25, 75)

$haslo = GUICtrlCreateInput ("", 115, 73, 140, 20)

GUISetOnEvent($GUI_EVENT_CLOSE, "close")

; przycisk ok

$ok = GuiCtrlCreateButton("OK", 86, 110, 100, 27)

GUICtrlSetOnEvent($ok, "ok")

GuiSetState()

While GuiGetMsg() <> $GUI_EVENT_CLOSE

WEnd

Func close()

Exit

EndFunc

Func ok()

Exit

EndFunc

poplat

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

i really need help

i've created one GUI and make another one to input data

i use in first include"secondGUI" but ...

when i run 2nd GUI alone it works perfectlu but when i run first GUI it came with the message:

Func close()

Error: 'Func' statement has no matching 'EndFunc'

<{POST_SNAPBACK}>

I assume your #include "secondGUI.au3" is located inside a While..wend or Select...endselect ?

The #Include inserts the code at the line it is located .......

You cannot have FUNC-ENDFUNC inside any If-EndIF, Select-Endselect of other FUNC-ENDFUNC.......

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I assume your #include "secondGUI.au3" is located inside a While..wend or Select...endselect ?

The #Include inserts the code at the line it is located .......

You cannot have FUNC-ENDFUNC inside any If-EndIF, Select-Endselect  of other FUNC-ENDFUNC.......

<{POST_SNAPBACK}>

ok now i understand , but is there any solution to run 2nd GUI when the statement is made ??

Share this post


Link to post
Share on other sites

I do not know how to do it , so I made it with InputBox

But it doesn't look nice, 2nd GUI looks better, but i do not know YET how to do it .... :)

Anyway thanks for info ...

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