Jump to content

Clipboard Collector


TPaul81
 Share

Recommended Posts

Clipboard Collector

Description:

Clipboard Collector collects certain types of links copied in the clipboard directly in a textfile.

This can be useful when you gather big amounts of links on filesharing services, or links of interesting webpages and so on.

To Do:

Add more types of links.

Save as option for links stored in the textfile (currently stored in the same folder under the name CBC-DAYMONTHYEAR.txt)

Launch saved links through Clipboard Collector.

#include <GUIConstants.au3>
#Include <Misc.au3>
#include <IE.au3> 

Opt("TrayIconHide", 0)

dim $clipboard_check
dim $file

GUICreate("Clipboard Collector", 320, 240)
GUICtrlCreateLabel("Select link types to gather", 10, 10)
$web_check = GUICtrlCreateCheckbox(".html, .htm", 10, 30)
$image_check = GUICtrlCreateCheckbox(".bmp, .gif, .jpg, .png", 10, 50)
$archive_check = GUICtrlCreateCheckbox(".zip, .rar, .iso", 10, 70)
GUISetState()

$filename = "cbc-"& @MDAY & @MON & @YEAR &".txt"

Func AddClip()
    FileWriteLine($file, $clipboard_check)
    ClipPut("")
EndFunc

$file = FileOpen($filename, 1)


While 1
    $clipboard_check = ClipGet()
    $clipboard_len = StringLen($clipboard_check)
    $web_gather = GUICtrlRead($web_check)
    $image_gather = GUICtrlRead($image_check)
    $archive_gather = GUICtrlRead($archive_check)
    
    if $web_gather=1 Then
        If StringTrimLeft($clipboard_check,$clipboard_len-5)=".html" or StringTrimLeft($clipboard_check,$clipboard_len-4)=".htm" Then
            AddClip()
        EndIf
    EndIf
    
    if $image_gather=1 Then
        if StringTrimLeft($clipboard_check,$clipboard_len-4)=".jpg" Or StringTrimLeft($clipboard_check,$clipboard_len-4)=".gif" Or StringTrimLeft($clipboard_check,$clipboard_len-4)=".png" or StringTrimLeft($clipboard_check,$clipboard_len-4)=".bmp" Then
            AddClip()
        EndIf
    EndIf
    
    if $archive_gather=1 Then
        if StringTrimLeft($clipboard_check,$clipboard_len-4)=".zip" Or StringTrimLeft($clipboard_check,$clipboard_len-4)=".rar" Or StringTrimLeft($clipboard_check,$clipboard_len-4)=".iso" Then
            AddClip()
        EndIf
    EndIf
    
    $msg = GUIGetMsg()
    
    Select
        Case $msg = $GUI_EVENT_CLOSE
            FileClose($filename)
            ShellExecute($filename)
            Exit
    EndSelect
    sleep(10)
WEnd
ClipboardCollector.au3 Edited by TPaul81
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...