Code : Tout sélectionner
#include <GUIConstantsEx.au3>
#include <ColorConstants.au3>
Astreintes()
Func Astreintes()
Local $login,$password, $btn,$btn1,$file,$lecture,$lecture1, $msg,$BS_ICON
GUICreate(" Authentification Astreinte", 320, 150, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1, 0x00000018); WS_EX_ACCEPTFILES
$login = GUICtrlCreateInput("Saisir login", 10, 5, 300, 20)
$password = GUICtrlCreateInput("Saisir mot de passe", 10, 50, 300, 20)
;~ GUICtrlSetState(-1, $GUI_DROPACCEPTED)
; will not accept drag&drop files
Local $btn = GUICtrlCreateButton("Ok", 40, 100, 60, 20)
Local $btn1 = GUICtrlCreateButton("Annuler",150, 100, 60, 20)
GUISetState()
$msg = 0
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()
Select
Case $msg = $btn
Case $msg=$btn1
msgbox(64,"Annulation", " Reinitialisation des champs")
GUICtrlSetColor($password,$COLOR_RED)
ExitLoop
EndSelect
WEnd
$lecture_login =GUICtrlRead($login,1)
$lecture_password=GUICtrlRead($password,1)
$check=$lecture_login&$lecture_password
;~ msgbox(64,"test",$lecture_login & " " & $lecture_password)
If $check="xxxx" Then
msgbox(64,"Bienvenue "," Bonne visite !")
GUICreate(" Accès aux sites astreinte", 320, 150, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1, 0x00000018); WS_EX_ACCEPTFILES
Local $btn = GUICtrlCreateButton("Google", 40, 100, 60, 20)
Local $btn1 = GUICtrlCreateButton("GrosBill",150, 100, 60, 20)
GUISetState()
$msg = 0
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()
Select
Case $msg = $btn
ShellExecute("www.google.fr")
Case $msg=$btn1
ShellExecute("http://www.grosbill.com")
ExitLoop
EndSelect
WEnd
EndIf
EndFunc