Sign in to follow this  
Followers 0
torels

PowerClip

2 posts in this topic

Hi there

I wrote this app that creates multiple clips :)

here is the code

;power-clip
#include <WindowsConstants.au3>
Global $gui, $close, $label
Opt("traymenumode",1)
Opt("trayautopause",0)
$nfo = TrayCreateItem("Ultra Clip v1.0")
TrayCreateItem("")
TraySetIcon(@MyDocumentsDir & "\immagini\ultraclip.ico")
$read = TrayCreateItem("Read" & @TAB & "Ctrl+r")
$up = TrayCreateItem("Clip +1" & @TAB & "Ctrl++")
$down = TrayCreateItem("Clip -1" & @TAB & "Ctrl+-")
TrayCreateItem("")
$nfo = TrayCreateItem("Info")
$ext = TrayCreateItem("Exit")
Dim $CurrClip = 1
Dim $ultraclip[10]
_TrayTip("PowerClip Running" & @CRLF & @CRLF & "PowerClip Is running" & @LF & _
"Press Ctrl+I for Info" & @LF & _
"Current Clip = " & $currclip & @LF & _
"Enjoy! torels_" & @CRLF & @CRLF & "For info, updates and support visit http://torels.altervista.org")
;Sleep(5000)
ControlClick($gui,"",$close)
HotKeySet("^c","copy")
HotKeySet("^v", "paste")
HotKeySet("^r","read")
HotKeySet("^{NUMPADADD}","plus")
HotKeySet("^{NUMPADSUB}","minus")
HotKeySet("^a","delete")
HotKeySet("^e","emptyme")
HotKeySet("^{+}","plus")
HotKeySet("^{-}","minus")
HotKeySet("^i","info")
While 1
    Switch TrayGetMsg()
        case $ext
            Exit
        Case $nfo
            info()
        case $read
            read()
        Case $up
            plus()
        Case $down
            minus()
    EndSwitch
    Switch GUIGetMsg($gui)
        Case -3
            Exit
        Case $close
            For $i = @DesktopWidth-200 to @DesktopWidth step 4
                WinMove($gui,"",$i,100)
            Next
            GUIDelete($gui)
    EndSwitch
WEnd
Func copy()
    HotKeySet("^c")
    Send("^c")
    $ultraclip[$CurrClip] = ClipGet()
    HotKeySet("^c","copy")
EndFunc
Func paste()
    HotKeySet("^v")
    ClipPut($ultraclip[$CurrClip])
    Send("^v")
    HotKeySet("^v","paste")
EndFunc
Func read()
    For $i = @DesktopWidth-200 to @DesktopWidth
        WinMove($gui,"",$i,100)
    Next
    GUIDelete($gui)
    _TrayTip("Clip " & $currclip &@CRLF & $ultraclip[$currclip])
EndFunc
Func plus()
    if $currclip < 9 then $CurrClip += 1
    if $ultraclip[$currclip] = "" then 
        $status = ": Empty"
    Else
        $status = ": Not Empty (Ctrl+r to read)"
    EndIf
    TrayTip("Current Clip",$currclip & $status,10,1 + 16)
EndFunc
Func minus()
    if $currclip > 1 then $CurrClip -= 1
    if $ultraclip[$currclip] = "" then 
        $status = ": Empty"
    Else
        $status = ": Not Empty (Ctrl+r to read)"
    EndIf
    TrayTip("Current Clip",$currclip & $status,10,1 + 16)
EndFunc
Func delete()
    $ultraclip = ""
    Dim $ultraclip[10]
EndFunc
Func EmptyMe()
    $ultraclip[$currclip] = ""
EndFunc
Func info()
    _TrayTip("PowerClip - torels_" & @CRLF & @CRLF & "Ctrl+C: Copy in current clipboard" & @LF & _
    "Ctrl+V: Paste the Content of the current clipboard" & @LF & _
    "Ctrl+R: View the Content of the current clipboard" & @LF & _
    "Ctrl+A: Empty all Clips" & @LF & _
    "Ctrl+I: Info & Help" & @LF & _
    "Ctrl+E: Empty Current Clip" & @LF & _
    "Ctrl++: Move Clipboard (+1)" & @LF & _
    "Ctrl+-: Move Clipboard (-1)" & @LF)
EndFunc
Func _TrayTip($text)
    $gui = GUICreate("",1,@DesktopHeight - 200,@DesktopWidth-1,100, $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW )
    WinSetTrans($gui,"",200)
    GUISetBkColor(0x000000)
    GUISetState()
    For $i = @DesktopWidth to @DesktopWidth-200 step -50
        For $c = 1 to 200 Step 50
            WinMove($gui,"",$i,100,$i)
        Next
    Next
    $close = GUICtrlCreateButton("Close>>", 0,@DesktopHeight - 250,200,50)
    $label = GUICtrlCreateLabel($text,0,0,200,@DesktopHeight - 250)
    GUICtrlSetColor(-1, 0xFFFFFF)
EndFunc

hope you like it

what do you think about it ?


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites



Very nice idea, but it`s hard to work with this. Look at Microsoft Office Clipbord maybe you'll see something to inspire you. :)

Anyway, nice example. :)


When the words fail... music speaks

Share this post


Link to post
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
Sign in to follow this  
Followers 0