Jump to content

Input Veri Editde Alt Alta Nasıl Sıralanır.?


Mehmet
 Share

Recommended Posts

Arkadaşlar $Input1deki sayıya göre $Edit1de nasıl çoğaltabiliriz altalta olacak şekilde

 

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("form", 266, 464, 301, 140)
$kacbsmk = GUICtrlCreateInput("6", 17, 52, 49, 21)
$Input1 = GUICtrlCreateInput("10", 16, 80, 49, 21)
$Edit1 = GUICtrlCreateEdit("", 16, 144, 233, 249)
$Label1 = GUICtrlCreateLabel("Basamak", 88, 56, 69, 17)
$Label2 = GUICtrlCreateLabel("Adet", 88, 88, 71, 17)
$olustur = GUICtrlCreateButton("Oluştur", 24, 416, 97, 33)
$kaydet = GUICtrlCreateButton("Kaydet", 155, 416, 97, 33)

GUISetState(@SW_SHOW)

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $olustur
GUICtrlSetData($Edit1, _Random-Password(GUICtrlRead(,$Input1)))

Case $kaydet
$SAVE = FileSaveDialog("txt olarak Kaydet..", "C:\", "Metin Belgeleri(*.txt)", 16)
FileOpen($SAVE, 2)
FileWrite($SAVE, GUICtrlRead($))
FileClose($SAVE)


EndSwitch
WEnd

For $i = 4 To 20
	ConsoleWrite($i - 3 & '. ' & _Random_Password($i) & ' (Seviye: ' & $i & ')' & @CR)
Next


EndFunc
Edited by MeHMeTBeN
Link to comment
Share on other sites

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("form", 266, 464, 301, 140)
$kacbsmk = GUICtrlCreateInput("6", 17, 52, 49, 21)
$Input1 = GUICtrlCreateInput("10", 16, 80, 49, 21)
$Edit1 = GUICtrlCreateEdit("", 16, 144, 233, 249)
$Label1 = GUICtrlCreateLabel("Basamak", 88, 56, 69, 17)
$Label2 = GUICtrlCreateLabel("Adet", 88, 88, 71, 17)
$olustur = GUICtrlCreateButton("Oluştur", 24, 416, 97, 33)
$kaydet = GUICtrlCreateButton("Kaydet", 155, 416, 97, 33)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $olustur

Case $kaydet
$SAVE = FileSaveDialog("txt olarak Kaydet..", "C:\", "Metin Belgeleri(*.txt)", 16)
FileOpen($SAVE, 2)
FileWrite($SAVE, GUICtrlRead($Edit1))
FileClose($SAVE)
EndSwitch
WEnd

For $i = 4 To 20
	ConsoleWrite($i - 3 & '. ' & _Random_Password($i) & ' (Seviye: ' & $i & ')' & @CR)
Next

Func _Random_Password($nBoyut = 16)
	Local $s_Password, $nKarakter
	If $nBoyut < 4 Or $nBoyut > 20 Then $nBoyut = 4
	For $i = 1 To $nBoyut
	Switch Random(1, 3, 1)
			Case 1
				$nKarakter = Chr(Random(48, 57));Sayısal [0-9]
			Case 2
				$nKarakter = Chr(Random(65, 90));Büyük-küçük karakrer [A-Z]
			Case 3
				$nKarakter = Chr(Random(97, 122));Küçük karakter [a-z]
		EndSwitch
		$s_Password &= $nKarakter
	Next
	Return $s_Password
EndFunc
Edited by mesale0077
Link to comment
Share on other sites

yada

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("form", 266, 464, 301, 140)
$kacbsmk = GUICtrlCreateInput("6", 17, 52, 49, 21)
$Input1 = GUICtrlCreateInput("10", 16, 80, 49, 21)
$Edit1 = GUICtrlCreateEdit("", 16, 144, 233, 249)
$Label1 = GUICtrlCreateLabel("Basamak", 88, 56, 69, 17)
$Label2 = GUICtrlCreateLabel("Adet", 88, 88, 71, 17)
$olustur = GUICtrlCreateButton("Oluştur", 24, 416, 97, 33)
$kaydet = GUICtrlCreateButton("Kaydet", 155, 416, 97, 33)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $olustur

Case $kaydet
$SAVE = FileSaveDialog("txt olarak Kaydet..", "C:\", "Metin Belgeleri(*.txt)", 16)
FileOpen($SAVE, 2)
FileWrite($SAVE, GUICtrlRead($Edit1))
FileClose($SAVE)
EndSwitch
WEnd

For $i = 4 To 20
	ConsoleWrite($i - 3 & '. ' & _Random_Password($i) & ' (Seviye: ' & $i & ')' & @CR)
Next

Func _Random_Password($nBoyut = 16)
	Local $s_Password, $nKarakter
	If $nBoyut < 4 Or $nBoyut > 20 Then $nBoyut = 4
	For $i = 1 To $nBoyut
	Switch Random(1, 3, 1)
			Case 1
				$nKarakter = Chr(Random(48, 57));Sayısal [0-9]
			Case 2
				$nKarakter = Chr(Random(65, 90));Büyük-küçük karakrer [A-Z]
			Case 3
				$nKarakter = Chr(Random(97, 122));Küçük karakter [a-z]
		EndSwitch
		$s_Password &= $nKarakter
	Next
	Return $s_Password
EndFunc
Edited by mesale0077
Link to comment
Share on other sites

Teşekkürler mesale0077 FileSaveDialogta Dosya adını otomatik olarak atayabilirmiyiz örneğin kaydet.txt gibi 

 

Case $kaydet
$SAVE = FileSaveDialog("txt olarak Kaydet..", "C:\", "Metin Belgeleri(*.txt)", 16)
FileOpen($SAVE, 2)
FileWrite($SAVE, GUICtrlRead($Edit1))
FileClose($SAVE)
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...