Jump to content

Link Kopyalayıcı


daft117
 Share

Recommended Posts

program aslında sadece hafızaya alınan (CTRL V = kopyala) linkleri toplamak için değil geniş amaçlı da kullanılabilir
geliştirilebilir ben basit bıraktım

misal www.rapidshare.com/...../1.rar şeklinde kısaltılmış linkleri topluca almanın başka yöntemleri de var(IDM, Excel+Firefox gibi)
ama program yinede iş görür

[img]http://img233.imageshack.us/img233/1649/clipboard01up.jpg[/img]

[code]#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form1_1 = GUICreate("Link Kopyala", 625, 445, -1, -1)
$Button1 = GUICtrlCreateButton("Başlat", 536, 6, 75, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Durdur", 536, 33, 75, 25, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Kaydet", 536, 61, 75, 25, $WS_GROUP)
$Button4 = GUICtrlCreateButton("Panoya Al", 536, 89, 75, 25, $WS_GROUP)
$Edit1 = GUICtrlCreateEdit("", 8, 8, 521, 433)
GUICtrlSetStyle($Edit1, $ES_READONLY)
GUISetState(@SW_SHOW)
$a = 0
$old = ""

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$a = 1
Case $Button2
$a = 0
Case $Button3
DosyaKaydet()
Case $Button4
NotDefterineAt()
EndSwitch
Kopyala()
WEnd

Func Kopyala()
If $a = 1 Then
If ClipGet() <> "" And ClipGet() <> $old Then
$old = ClipGet()
$editoku = GUICtrlRead($Edit1)
If $editoku = "" Then
$editoku = ClipGet()
Else
$editoku = $editoku & @CRLF & $old
EndIf
GUICtrlSetData($Edit1, $editoku)
EndIf
EndIf
EndFunc ;==>Kopyala

Func DosyaKaydet()
If $a = 0 Then
$default=GetRandomName(8)
$dosyayolu = FileSaveDialog("Bir isim seçin", @DesktopDir, "Yazı dosyaları (*.txt;*.txt)", 2, $default) & ".txt"
If @error <> 0 Then
Else
$editoku = GUICtrlRead($Edit1)
$dosya = FileOpen($dosyayolu, 2)
FileWrite($dosya, $editoku)
FileClose($dosya)
EndIf
Else
MsgBox(0, "Hata", "İlk önce programı durdurun")
EndIf

EndFunc ;==>DosyaKaydet

Func NotDefterineAt()
$editoku = GUICtrlRead($Edit1)
ClipPut($editoku)
EndFunc ;==>NotDefterineAt

Func GetRandomName($rLength)
Local $i = 0, $string, $number
Do
$number = Random(48, 122, 1)
If $number > 57 And $number < 65 Then ContinueLoop
If $number > 90 And $number < 97 Then ContinueLoop
$string = $string & Chr($number)
$i = $i + 1
Until $i = $rLength
Return ($string)
EndFunc ;==>__GetRandomName[/code]

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...