Mehmet Posted April 5, 2013 Share Posted April 5, 2013 (edited) 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 April 6, 2013 by MeHMeTBeN Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted April 5, 2013 Share Posted April 5, 2013 (edited) #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 April 6, 2013 by mesale0077 Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted April 5, 2013 Share Posted April 5, 2013 (edited) 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 April 6, 2013 by mesale0077 Quote Link to comment Share on other sites More sharing options...
Mehmet Posted April 5, 2013 Author Share Posted April 5, 2013 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) Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted April 5, 2013 Share Posted April 5, 2013 anlamadım txt otomatik mi oluşturacak yoksa ,save dosyasının sonunu txt mi yapacağız onu anlayamadım net olarak anlatırmısın yada rastgele txt dosyalarımı oluşturacak Quote Link to comment Share on other sites More sharing options...
Mehmet Posted April 5, 2013 Author Share Posted April 5, 2013 Hayır kaydettiğimde uzantıyı otumatik atasın kaydet.txt Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted April 5, 2013 Share Posted April 5, 2013 (edited) $C=".txt" $SAVE = FileSaveDialog("txt olarak . b b . . . . aaa. . bu şekilmi ? istiyorsun Edited April 6, 2013 by mesale0077 Quote Link to comment Share on other sites More sharing options...
Mehmet Posted April 5, 2013 Author Share Posted April 5, 2013 aynen teşekkürler :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.