Si estan correctos, se deberia de cerrar esta ventana, y abrir la siguiente en la cual ya se podrian hacer 'X' funciones.
Tengo las 2 ventanas creadas, y cuando pongo el usuario y contraseña y son correctos me abre la siguiente, pero.. la primera no se cierra..
que he de hacer?
Codigo Ventana 1:
Código: Seleccionar todo
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.0.0
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include "panel.au3"
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Panel de Control", 249, 144, 187, 118)
GUISetOnEvent($GUI_EVENT_CLOSE, "Logincerrar")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "LoginMinimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "LoginMaximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "LoginRestore")
$Group1 = GUICtrlCreateGroup("Identificarse", 8, 8, 233, 129)
$Input1 = GUICtrlCreateInput("", 104, 32, 121, 21)
GUICtrlSetOnEvent($Input1, "LoginChange")
$Input2 = GUICtrlCreateInput("", 104, 64, 121, 21)
GUICtrlSetOnEvent($Input2, "LoginChange1")
$Button1 = GUICtrlCreateButton("Identificarse", 80, 96, 75, 25, $WS_GROUP)
GUICtrlSetOnEvent($Button1, "ButtonLogin")
$Label1 = GUICtrlCreateLabel("Usuario", 24, 32, 40, 17)
GUICtrlSetOnEvent($Label1, "LoginClick")
$Label2 = GUICtrlCreateLabel("Contraseña", 24, 64, 58, 17)
GUICtrlSetOnEvent($Label2, "LoginClick1")
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
Func ButtonLogin()
$usuario = GUICtrlRead($Input1)
$password = GUICtrlRead($Input2)
If $usuario == "mataxetos" Then
If $password == "ainhoa" Then
TrayTip("Panel de Control","TODO GUAY",-1)
panel()
Exit
Else
TrayTip("Panel de Control","Contraseña Incorrecta",-1)
EndIf
Else
TrayTip("Panel de Control","Usuario incorrecto",-1)
EndIf
EndFunc
Func Logincerrar()
Exit
EndFunc
Func LoginMaximize()
EndFunc
Func LoginMinimize()
EndFunc
Func LoginRestore()
EndFunc
Func LoginChange()
EndFunc
Func LoginChange1()
EndFunc
Func LoginClick()
EndFunc
Func LoginClick1()
EndFunc
Código: Seleccionar todo
func panel()
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 192, 124)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore")
$Button1 = GUICtrlCreateButton("Button1", 104, 104, 75, 25, $WS_GROUP)
GUICtrlSetOnEvent($Button1, "Button1Click")
$Button2 = GUICtrlCreateButton("Button2", 424, 224, 75, 25, $WS_GROUP)
GUICtrlSetOnEvent($Button2, "Button2Click")
$Button3 = GUICtrlCreateButton("Button3", 288, 272, 75, 25, $WS_GROUP)
GUICtrlSetOnEvent($Button3, "Button3Click")
$Button4 = GUICtrlCreateButton("Button4", 120, 224, 75, 25, $WS_GROUP)
GUICtrlSetOnEvent($Button4, "Button4Click")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
EndFunc
Func Button1Click()
EndFunc
Func Button2Click()
EndFunc
Func Button3Click()
EndFunc
Func Button4Click()
EndFunc
Func Form1Close()
Exit
EndFunc
Func Form1Maximize()
EndFunc
Func Form1Minimize()
EndFunc
Func Form1Restore()
EndFunc