Jump to content

Deyle

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Deyle

  1. Thanks a lot! For next time, i will try be better.
  2. Hello, i am new in autoit world and i need your help. I want create application with gui. When a write password, i want execute notepad.exe. If i write wrong password, i want open error message with text. Here is my code: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Gui = GUICreate("Admin", 280, 50, -1, -1,$WS_POPUPWINDOW) Local $Gui main() Func main() $text = GUICtrlCreateInput("", 10, 15, 150, 20) $Button1 = GUICtrlCreateButton("OK", 165, 10, 50, 30) $Button2 = GUICtrlCreateButton("EXIT", 220, 10, 50, 30) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $Button1 If $text <> "password" then MsgBox(4096, "Error", "Wrong password!") Else Run("notepad.exe") Exit EndIf Case $button2 Exit EndSwitch WEnd EndFunc Thanks a lot for your help
×
×
  • Create New...