Jump to content

Butona Kod Yazmak


WolfmanTR_
 Share

Recommended Posts

arkadaşlar çok küçük birşey yapayım dedim ama olmadı.Gui yi oluşturdum ama ok butonuna nasıl yazacağım orasını çözmüş değilim.

 

Gui code.

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Google Chrome", 342, 91, 192, 124)
$input = GUICtrlCreateInput("", 56, 32, 265, 21)
$Parola = GUICtrlCreateLabel("Parola :", 8, 32, 50, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Ok = GUICtrlCreateButton("Ok", 248, 56, 75, 25, BitOR($BS_DEFPUSHBUTTON,$BS_CENTER))
$Labe2 = GUICtrlCreateLabel("Goole Chrome Kilitlendi! Açılması için Parola'yı giriniz.", 8, 8, 319, 20)
GUICtrlSetFont(-1, 11, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit

		Case $Ok
	EndSwitch
WEnd

	

 

$ok butonuna yazacağım

 

if $input == "123" then
Run("chrome.exe")
Else
MsgBox(64,"Hata","Şifre Yanlış !")
Endif

 

 

Link to comment
Share on other sites

Biraz daha düzenledim. Kafana göre isteğini yazarsın

#NoTrayIcon
Local $Form1 = GUICreate("Google Chrome", 342, 91, 192, 124)
Local $input = GUICtrlCreateInput("", 56, 32, 265, 21,32)
Local $Parola = GUICtrlCreateLabel("Parola :", 8, 32, 50, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
Local $Ok = GUICtrlCreateButton("Ok", 248, 56, 75, 25, BitOR(0x0001, 0x0300))
Local $Labe2 = GUICtrlCreateLabel("Goole Chrome Kilitlendi! Açılması için Parola'yı giriniz.", 8, 8, 319, 20)
GUICtrlSetFont(-1, 11, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)



While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case -3
			Exit
		Case $Ok
			_OK()
	EndSwitch
WEnd


Func _OK()
	If GUICtrlRead($input) == "123" Then
		Run("chrome.exe")
	Else
		MsgBox(64, "Hata", "Şifre Yanlış !")
	EndIf
EndFunc   ;==>_OK
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...