Sign in to follow this  
Followers 0
JustinMeyer

Copy Tool

3 posts in this topic

I know this is supposed to be a place to post your "cool" scripts but I just found this on my flash drive and while it is not that cool, I would like to share it. It was one of my first scripts real (sorta) scripts that I shared with anyone to use. It is not finished, and I don't think I will finish it because, well it works for what I have needed it.

Maybe if you brilliant people out there have any suggestions I will be inspired to finish it.

You need to download the zip file because it contains all the graphics and a specific file hierarchy.

Posted Image

;JMEYER
;CLEAN UP CODE
;ADD SETTINGS

#include <GuiConstants.au3>
#include <GuiConstantsEX.au3>
#Include <File.au3>
#include <Array.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>


Global $COPIES = @ScriptDir & "\COPIES"
;Global $SPLASH_PIC = @ScriptDir & "\FILES\SPLASH(1).jpg"
Global $COPY_ICO = @ScriptDir & "\FILES\COPY.ico"
Global $COPY_FROM_ICO = @ScriptDir & "\FILES\CPY_FROM.ico"
Global $COPY_TO_ICO = @ScriptDir & "\FILES\CPY_TO.ico"
Global $COPY_ALERT_ICO = @ScriptDir & "\FILES\CPY_ALERT.ico"
Global $COPY_SET_ICO = @ScriptDir & "\FILES\CPY_SET.ico"
Global $CPY_SPL_1 = @ScriptDir & "\FILES\CPY_SPL_1.ico"
Global $CPY_SPL_2 = @ScriptDir & "\FILES\CPY_SPL_2.ico"
Global $SETTINGS = @ScriptDir & "\FILES\SETTINGS.INI"

HotKeySet("{F1}", "Help")
HotKeySet("{F2}", "Settings")

$SPLASH_GUI = GUICreate("COPY v1.0", 320, 345, 25, 25)
GUISetIcon ($COPY_ICO,"",$SPLASH_GUI)
$SPLASH_CHECK = IniRead($SETTINGS,"SPLASH","IMAGE","1")
If $SPLASH_CHECK = 1 Then
    $SPLASH_PIC = @ScriptDir & "\FILES\SPLASH(2).jpg"
Else
    $SPLASH_PIC = @ScriptDir & "\FILES\SPLASH(1).jpg"
EndIf
GUICtrlCreatePic($SPLASH_PIC,0,0,320,345)
GUICtrlSetState(-1,$GUI_DISABLE)
GUISetState(@SW_SHOW,$SPLASH_GUI)

$CPY_SETTINGS_GUI = GUICreate("COPY SETTINGS", 320, 345, 25, 25)
GUISetIcon ($COPY_SET_ICO,"",$CPY_SETTINGS_GUI)
GUISetState(@SW_HIDE,$CPY_SETTINGS_GUI)
GUICtrlCreateLabel("SPLASH",2,2,50,20)
GuiCtrlCreateGroup("IMAGE", 25, 20,260,40) ;START GROUP
GUICtrlCreateIcon($CPY_SPL_1, "", 50, 35, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$SET_SPLASH_DARK = GUICtrlCreateRadio("DARK",70,35,50,20)
GUICtrlSetState (-1,1)
;GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateIcon($CPY_SPL_2, "", 190, 35, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$SET_SPLASH_LIGHT = GUICtrlCreateRadio("LIGHT",210,35,70,20)
;GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateGroup ("",-99,-99,1,1)  ;close group
$SET_SPLASH_DEL = GUICtrlCreateCombo ("3", 30,80,30,20) ; create first item
GUICtrlSetData(-1,"4|5|6|7|8|9","3") ; add other item snd set a new default
GUICtrlCreateLabel("SECOND DELAY",70,83,90,20)
$SET_SPLASH_OFF = GUICtrlCreateCheckbox("SPLASH OFF",190,80,100,20)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateLabel("COPY",2,115,50,20)
GuiCtrlCreateGroup("COLOR", 25, 130,260,105) ;START GROUP
$SET_COLOR_RGB = GUICtrlCreateRadio("RGB",60,150,50,20)
GUICtrlSetState (-1,1)
GUICtrlSetState(-1, $GUI_DISABLE)
$SET_COLOR_R = GUICtrlCreateInput("0",130,150,30,20)
GUICtrlSetLimit($SET_COLOR_R,2,2)
GUICtrlSetState(-1, $GUI_DISABLE)
$SET_COLOR_G = GUICtrlCreateInput("0",170,150,30,20)
GUICtrlSetLimit($SET_COLOR_G,2,2)
GUICtrlSetState(-1, $GUI_DISABLE)
$SET_COLOR_B = GUICtrlCreateInput("0",210,150,30,20)
GUICtrlSetLimit($SET_COLOR_B,2,2)
GUICtrlSetState(-1, $GUI_DISABLE)
$SET_COLOR_BLACK = GUICtrlCreateRadio("BLACK",60,180,55,20)
GUICtrlSetState(-1, $GUI_DISABLE)
$SET_COLOR_WHITE = GUICtrlCreateRadio("WHITE",130,180,55,20)
GUICtrlSetState(-1, $GUI_DISABLE)
$SET_COLOR_RED = GUICtrlCreateRadio("RED",200,180,50,20)
GUICtrlSetState(-1, $GUI_DISABLE)
$SET_COLOR_BLUE = GUICtrlCreateRadio("BLUE",60,200,55,20)
GUICtrlSetState(-1, $GUI_DISABLE)
$SET_COLOR_GREEN = GUICtrlCreateRadio("GREEN",130,200,55,20)
GUICtrlSetState(-1, $GUI_DISABLE)
$SET_COLOR_YELLOW = GUICtrlCreateRadio("YELLOW",200,200,65,20)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateGroup ("",-99,-99,1,1)  ;close group
GuiCtrlCreateGroup("WRITE MODE", 25, 240,260,40) 
$SET_WRITE_DEF = GUICtrlCreateRadio("DEFAULT",65,255,65,20)
GUICtrlSetState(-1, $GUI_DISABLE)
$SET_WRITE_RAW = GUICtrlCreateRadio("RAW",180,255,65,20)
GUICtrlSetState (-1,1)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateGroup ("",-99,-99,1,1)  ;close group
$SET_APPLY = GUICtrlCreateButton("APPLY",75,320,60,20)
$SET_SAVE = GUICtrlCreateButton("SAVE",140,320,60,20)
$SET_SAVE_APPLY = GUICtrlCreateButton("SAVE - APPLY",205,320,100,20)

;$710 = GUICtrlRead($SET_WRITE_DEF)
;$711 = GUICtrlRead($SET_WRITE_RAW)
;MsgBox(1,"RADIO CHECK", "DEF = " & $710 & " RAW = " & $711) 

$RGB_R = IniRead($SETTINGS,"RGB","R","00")
$RGB_G = IniRead($SETTINGS,"RGB","G","00")
$RGB_B = IniRead($SETTINGS,"RGB","B","00")

$CPY_GUI = GUICreate("COPY", 320, 345, 25, 25)
GUISetBkColor(0x & $RGB_R & $RGB_G & $RGB_B,$CPY_GUI)
GUISetIcon ($COPY_ICO,"",$CPY_GUI)
GUISetState(@SW_HIDE,$CPY_GUI)

$IN1_ICON = GUICtrlCreateIcon($COPY_FROM_ICO, "", 6, 6, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$IN_1 = GUICtrlCreateButton("",5,5,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))
$TXT_1 = GUICtrlCreateInput("",40,5,235,20)
$OUT1_ICON = GUICtrlCreateIcon($COPY_TO_ICO, "", 296, 6, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$OUT_1 = GUICtrlCreateButton("",295,5,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))

$IN2_ICON = GUICtrlCreateIcon($COPY_FROM_ICO, "", 6, 36, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$IN_2 = GUICtrlCreateButton("",5,35,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))
$TXT_2 = GUICtrlCreateInput("",40,35,235,20)
$OUT2_ICON = GUICtrlCreateIcon($COPY_TO_ICO, "", 296, 36, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$OUT_2 = GUICtrlCreateButton("",295,35,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))

$IN3_ICON = GUICtrlCreateIcon($COPY_FROM_ICO, "", 6, 66, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$IN_3 = GUICtrlCreateButton("",5,65,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))
$TXT_3 = GUICtrlCreateInput("",40,65,235,20)
$OUT3_ICON = GUICtrlCreateIcon($COPY_TO_ICO, "", 296, 66, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$OUT_3 = GUICtrlCreateButton("",295,65,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))

$IN4_ICON = GUICtrlCreateIcon($COPY_FROM_ICO, "", 6, 96, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$IN_4 = GUICtrlCreateButton("",5,95,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))
$TXT_4 = GUICtrlCreateInput("",40,95,235,20)
$OUT4_ICON = GUICtrlCreateIcon($COPY_TO_ICO, "", 296, 96, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$OUT_4 = GUICtrlCreateButton("",295,95,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))

$IN5_ICON = GUICtrlCreateIcon($COPY_FROM_ICO, "", 6, 126, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$IN_5 = GUICtrlCreateButton("",5,125,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))
$TXT_5 = GUICtrlCreateInput("",40,125,235,20)
$OUT5_ICON = GUICtrlCreateIcon($COPY_TO_ICO, "", 296, 126, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$OUT_5 = GUICtrlCreateButton("",295,125,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))

$IN6_ICON = GUICtrlCreateIcon($COPY_FROM_ICO, "", 6, 156, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$IN_6 = GUICtrlCreateButton("",5,155,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))
$TXT_6 = GUICtrlCreateInput("",40,155,235,20)
$OUT6_ICON = GUICtrlCreateIcon($COPY_TO_ICO, "", 296, 156, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$OUT_6 = GUICtrlCreateButton("",295,155,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))

$IN7_ICON = GUICtrlCreateIcon($COPY_FROM_ICO, "", 6, 186, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$IN_7 = GUICtrlCreateButton("",5,185,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))
$TXT_7 = GUICtrlCreateInput("",40,185,235,20)
$OUT7_ICON = GUICtrlCreateIcon($COPY_TO_ICO, "", 296, 186, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$OUT_7 = GUICtrlCreateButton("",295,185,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))

$IN8_ICON = GUICtrlCreateIcon($COPY_FROM_ICO, "", 6, 216, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$IN_8 = GUICtrlCreateButton("",5,215,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))
$TXT_8 = GUICtrlCreateInput("",40,215,235,20)
$OUT8_ICON = GUICtrlCreateIcon($COPY_TO_ICO, "", 296, 216, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$OUT_8 = GUICtrlCreateButton("",295,215,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))

$IN9_ICON = GUICtrlCreateIcon($COPY_FROM_ICO, "", 6, 246, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$IN_9 = GUICtrlCreateButton("",5,245,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))
$TXT_9 = GUICtrlCreateInput("",40,245,235,20)
$OUT9_ICON = GUICtrlCreateIcon($COPY_TO_ICO, "", 296, 246, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$OUT_9 = GUICtrlCreateButton("",295,245,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))

$IN10_ICON = GUICtrlCreateIcon($COPY_FROM_ICO, "", 6, 276, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$IN_10 = GUICtrlCreateButton("",5,275,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))
$TXT_10 = GUICtrlCreateInput("",40,275,235,20)
$OUT10_ICON = GUICtrlCreateIcon($COPY_TO_ICO, "", 296, 276, 16, 16)
GUICtrlSetState(-1, $GUI_DISABLE)
$OUT_10 = GUICtrlCreateButton("",295,275,20,20, BitOr($WS_CLIPSIBLINGS, $BS_BOTTOM, $BS_MULTILINE))

$LOAD = GUICtrlCreateButton("LOAD",42,310,80,20)

$SAVE = GUICtrlCreateButton("SAVE",197,310,80,20)

;$HELP_LABEL = GUICtrlCreateLabel("Press F1 For Help", 120,325,110,20)

$CPY_LOAD_GUI = GUICreate("LOAD", 320, 40, -1, -1)
GUISetIcon ($COPY_ICO,"",$CPY_LOAD_GUI)
$Combo = GuiCtrlCreateCombo("", 2, 5,250,20);COMBO SEARCH INPUT
GUISetState(@SW_HIDE,$CPY_LOAD_GUI)

$LOAD_F = GUICtrlCreateButton("LOAD FILE",254,5,65,20)

$CPY_SAVE_GUI = GUICreate("SAVE", 320, 50, -1, -1)
GUISetIcon ($COPY_ICO,"",$CPY_SAVE_GUI)
$SAVE_AS = GUICtrlCreateInput("",2,5,250,20)
;GUICtrlSetFont(-1,8)
$SAVE_F = GUICtrlCreateButton("SAVE FILE",254,5,65,20)
$OVER_WRITE = GUICtrlCreateCheckbox("OVERWRITE",2,27,100,20)
GUICtrlSetState($OVER_WRITE,$GUI_DISABLE)
GUISetState(@SW_HIDE,$CPY_SAVE_GUI)

$DELAY = IniRead($SETTINGS,"SPLASH","DELAY","3000")
If $DELAY <= "3000" Then
    Sleep(3000)
Else
    Sleep($DELAY)
EndIf
GUISetState(@SW_HIDE,$SPLASH_GUI)
GUISetState(@SW_SHOW,$CPY_GUI)
GUISwitch($CPY_GUI)

While 1
    $msg = GUIGetMsg(1)
    $1_O = GUICtrlRead($TXT_1)
    $2_O = GUICtrlRead($TXT_2)
    $3_O = GUICtrlRead($TXT_3)
    $4_O = GUICtrlRead($TXT_4)
    $5_O = GUICtrlRead($TXT_5)
    $6_O = GUICtrlRead($TXT_6)
    $7_O = GUICtrlRead($TXT_7)
    $8_O = GUICtrlRead($TXT_8)
    $9_O = GUICtrlRead($TXT_9)
    $10_O = GUICtrlRead($TXT_10)
        Select
            Case $msg[0] = $GUI_EVENT_CLOSE
            If $msg[1] = $CPY_GUI Then
                $CHECK_LINES = "0"
                If $1_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $2_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $3_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $4_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $5_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $6_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $7_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $8_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $9_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $10_O <> "" Then
                    $CHECK_LINES = "1"
                EndIf
                If $CHECK_LINES = "0" Then
                    Exit
                Else
                    $EXIT = MsgBox(3,"NOTICE","DO YOU WANT TO SAVE BEFORE EXITING?")
                    ;GUISetIcon ($COPY_ALERT_ICO,"",$EXIT)
                    IF $EXIT = "6" Then
                        GUISetState(@SW_SHOW,$CPY_SAVE_GUI)
                        ;ADD FUNCTION TO EXIT AFTER SAVE
                        ;Exit
                    ElseIf $EXIT = "7" Then
                        Exit
                    Else
                        ;
                    EndIf
                EndIf

            ElseIf $msg[1] = $CPY_LOAD_GUI Then
                GUISetState(@SW_HIDE,$CPY_LOAD_GUI)
                WinActivate("COPY")
            ElseIf $msg[1] = $CPY_SAVE_GUI Then
                GUISetState(@SW_HIDE,$CPY_SAVE_GUI)
                WinActivate("COPY")
            ElseIf $msg[1] = $CPY_SETTINGS_GUI Then
                GUISetState(@SW_HIDE,$CPY_SETTINGS_GUI)
                WinActivate("COPY")
            EndIf
            
            Case $msg[0] = $LOAD
                GUICtrlSetData($Combo,"")
                $aFileList=_FileListToArray($COPIES)
                _ArraySort($aFileList,0,1)
                $FileList = _ArrayToString ( $aFileList, "|", 1)
                GUICtrlSetData($Combo,$FileList)
                GUISetState(@SW_SHOW,$CPY_LOAD_GUI)

            Case $msg[0] = $LOAD_F
                $READ_FILE = GUICtrlRead($COMBO)
                If $READ_FILE <> "" Then
                    If FileExists($COPIES & "\" & $READ_FILE) Then
                        $READ_L_1 = FileReadLine($COPIES & "\" & $READ_FILE,1)
                        $READ_L_2 = FileReadLine($COPIES & "\" & $READ_FILE,2)
                        $READ_L_3 = FileReadLine($COPIES & "\" & $READ_FILE,3)
                        $READ_L_4 = FileReadLine($COPIES & "\" & $READ_FILE,4)
                        $READ_L_5 = FileReadLine($COPIES & "\" & $READ_FILE,5)
                        $READ_L_6 = FileReadLine($COPIES & "\" & $READ_FILE,6)
                        $READ_L_7 = FileReadLine($COPIES & "\" & $READ_FILE,7)
                        $READ_L_8 = FileReadLine($COPIES & "\" & $READ_FILE,8)
                        $READ_L_9 = FileReadLine($COPIES & "\" & $READ_FILE,9)
                        $READ_L_10 = FileReadLine($COPIES & "\" & $READ_FILE,10)
                    
                        GUICtrlSetData($TXT_1,$READ_L_1)
                        GUICtrlSetData($TXT_2,$READ_L_2)
                        GUICtrlSetData($TXT_3,$READ_L_3)
                        GUICtrlSetData($TXT_4,$READ_L_4)
                        GUICtrlSetData($TXT_5,$READ_L_5)
                        GUICtrlSetData($TXT_6,$READ_L_6)
                        GUICtrlSetData($TXT_7,$READ_L_7)
                        GUICtrlSetData($TXT_8,$READ_L_8)
                        GUICtrlSetData($TXT_9,$READ_L_9)
                        GUICtrlSetData($TXT_10,$READ_L_10)

                        GUISetState(@SW_HIDE,$CPY_LOAD_GUI)
                    Else
                        MsgBox(1,"ERROR","FILE DOES NOT EXIST")
                        ;GUISetIcon ($COPY_ALERT_ICO,"",-1)
                    EndIf
                Else
                    MsgBox(1,"ERROR","YOU MUST SELECT OR ENTER A FILE")
                    ;GUISetIcon ($COPY_ALERT_ICO,"",-1)
                EndIf

            Case $msg[0] = $SAVE
                $CHECK_LINES = "0"
                If $1_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $2_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $3_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $4_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $5_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $6_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $7_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $8_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $9_O <> "" Then
                    $CHECK_LINES = "1"
                ElseIf $10_O <> "" Then
                    $CHECK_LINES = "1"
                EndIf
                If $CHECK_LINES = "0" Then
                    MsgBox(1,"ERROR", "THERE IS NO INFORMATION TO SAVE TO FILE")
                    ;GUISetIcon ($COPY_ALERT_ICO,"",-1)
                Else
                    GUISetState(@SW_SHOW,$CPY_SAVE_GUI)
                EndIf

            Case $msg[0] = $SAVE_F
                $SAVE_AS_F = GUICtrlRead($SAVE_AS)
                If FileExists($COPIES & "\" & $SAVE_AS_F) Then
                    MsgBox(1,"ERROR", "FILE ALREADY EXISTS")
                    ;GUISetIcon ($COPY_ALERT_ICO,"",-1)
                Else
                    If $SAVE_AS_F <> "" Then
                        FileCopy("FILES\0000","TEMP0")
                        FileMove("TEMP0\0000",$COPIES & "\" & $SAVE_AS_F)
                        $WRITE_FILE = FileOpen($COPIES & "\" & $SAVE_AS_F, 1)
                        FileWriteLine($WRITE_FILE, $1_O)
                        FileWriteLine($WRITE_FILE, $2_O)
                        FileWriteLine($WRITE_FILE, $3_O)
                        FileWriteLine($WRITE_FILE, $4_O)
                        FileWriteLine($WRITE_FILE, $5_O)
                        FileWriteLine($WRITE_FILE, $6_O)
                        FileWriteLine($WRITE_FILE, $7_O)
                        FileWriteLine($WRITE_FILE, $8_O)
                        FileWriteLine($WRITE_FILE, $9_O)
                        FileWriteLine($WRITE_FILE, $10_O)
                        FileClose($WRITE_FILE)
                        GUISetState(@SW_HIDE,$CPY_SAVE_GUI)
                    Else
                        MsgBox(1,"ERROR", "YOU MUST NAME THE NEW FILE")
                        ;GUISetIcon ($COPY_ALERT_ICO,"",-1)
                    EndIf
                EndIf

            Case $msg[0] = $IN_1
                $CLIP = ClipGet()
                GUICtrlSetData($TXT_1,$CLIP)
            Case $msg[0] = $IN_2
                $CLIP = ClipGet()
                GUICtrlSetData($TXT_2,$CLIP)
            Case $msg[0] = $IN_3
                $CLIP = ClipGet()
                GUICtrlSetData($TXT_3,$CLIP)
            Case $msg[0] = $IN_4
                $CLIP = ClipGet()
                GUICtrlSetData($TXT_4,$CLIP)
            Case $msg[0] = $IN_5
                $CLIP = ClipGet()
                GUICtrlSetData($TXT_5,$CLIP)
            Case $msg[0] = $IN_6
                $CLIP = ClipGet()
                GUICtrlSetData($TXT_6,$CLIP)
            Case $msg[0] = $IN_7
                $CLIP = ClipGet()
                GUICtrlSetData($TXT_7,$CLIP)
            Case $msg[0] = $IN_8
                $CLIP = ClipGet()
                GUICtrlSetData($TXT_8,$CLIP)
            Case $msg[0] = $IN_9
                $CLIP = ClipGet()
                GUICtrlSetData($TXT_9,$CLIP)
            Case $msg[0] = $IN_10
                $CLIP = ClipGet()
                GUICtrlSetData($TXT_10,$CLIP)
                
            Case $msg[0] = $OUT_1
                ClipPut($1_O)
            Case $msg[0] = $OUT_2
                ClipPut($2_O)
            Case $msg[0] = $OUT_3
                ClipPut($3_O)
            Case $msg[0] = $OUT_4
                ClipPut($4_O)
            Case $msg[0] = $OUT_5
                ClipPut($5_O)
            Case $msg[0] = $OUT_6
                ClipPut($6_O)
            Case $msg[0] = $OUT_7
                ClipPut($7_O)
            Case $msg[0] = $OUT_8
                ClipPut($8_O)
            Case $msg[0] = $OUT_9
                ClipPut($9_O)
            Case $msg[0] = $OUT_10
                ClipPut($10_O)
            Case $msg[0] = $SET_APPLY
                $RGB_R = GUICtrlRead($SET_COLOR_R)
                $RGB_G = GUICtrlRead($SET_COLOR_G)
                $RGB_B = GUICtrlRead($SET_COLOR_B)
                GUISetBkColor(0x & $RGB_R & $RGB_G & $RGB_B,$CPY_GUI)
            Case $msg[0] = $SET_SAVE
                $SPLASH_IMAGE_DARK = GUICtrlRead($SET_SPLASH_DARK)
                $SPLASH_IMAGE_LIGHT = GUICtrlRead($SET_SPLASH_LIGHT)
                $SPLASH_DELAY = GUICtrlRead($SET_SPLASH_DEL)
                $RGB_R = GUICtrlRead($SET_COLOR_R)
                $RGB_G = GUICtrlRead($SET_COLOR_G)
                $RGB_B = GUICtrlRead($SET_COLOR_B)
                ;IniWrite($SETTINGS,"SPLASH","DELAY",$SPLASH_DELAY & "000")
                IniWrite($SETTINGS,"SPLASH","IMAGE",$SPLASH_IMAGE_DARK)
                IniWrite($SETTINGS,"SPLASH","IMAGE",$SPLASH_IMAGE_LIGHT)
                IniWrite($SETTINGS,"SPLASH","DELAY",$SPLASH_DELAY & "000")
                IniWrite($SETTINGS,"RGB","R",$RGB_R)
                IniWrite($SETTINGS,"RGB","G",$RGB_G)
                IniWrite($SETTINGS,"RGB","B",$RGB_B)
                GUISetState(@SW_HIDE,$CPY_SETTINGS_GUI)
            Case $msg[0] = $SET_SAVE_APPLY
                $SPLASH_DELAY = GUICtrlRead($SET_SPLASH_DEL)
                $RGB_R = GUICtrlRead($SET_COLOR_R)
                $RGB_G = GUICtrlRead($SET_COLOR_G)
                $RGB_B = GUICtrlRead($SET_COLOR_B)
                GUISetBkColor(0x & $RGB_R & $RGB_G & $RGB_B,$CPY_GUI)
                ;MsgBox(1,"TEST","DELAY = " & $SPLASH_DELAY)
                IniWrite($SETTINGS,"SPLASH","DELAY",$SPLASH_DELAY & "000")
                IniWrite($SETTINGS,"RGB","R",$RGB_R)
                IniWrite($SETTINGS,"RGB","G",$RGB_G)
                IniWrite($SETTINGS,"RGB","B",$RGB_B)
                GUISetState(@SW_HIDE,$CPY_SETTINGS_GUI)
        EndSelect
WEnd

Func Help()
    $HELP_F = "FILES\Help.html"
    If FileExists($HELP_F) Then
        Run(@ComSpec & " /c Start " & $HELP_F, "", @SW_HIDE)
    Else
        MsgBox(0,"ERROR", "HELP FILE CORRUPT OR MISSING" & @CRLF & "GO TO WWW.-.COM")
        ;GUISetIcon ($COPY_ALERT_ICO,"",-1)
        WinActivate("COPY")
    EndIf
EndFunc

Func Settings()
    GUISetState(@SW_SHOW,$CPY_SETTINGS_GUI)
EndFunc

A few things to note:

The button on the left of the input will set the input to whatever is on the clipboard

The button to the right of the input will copy whatever is in the input to the clipboard

F1 launches the html help file in your default browser

F2 launches (unfinished) settings

You can save and load for future use

I know that there are a million free apps out there that do this far better than what I have done here but it was fun to write and I posted it here because I think there are some useful examples.

Please take it and do what you will with it, fix it break it, whatever you want.

COPY.zip


Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

nice. only if you could make it a FIFO or FILO with ctrl-c and ctrl-v.

Edited by dexxa

Share this post


Link to post
Share on other sites

nice. only if you could make it a FIFO or FILO with ctrl-c and ctrl-v.

That would be easy. You can set the clipboard data programmatically, so just use ctrl+v and ctrl+c as hotkeys. Whenever something new is copied, increment a numberOfCopies variable, and whenever something is pasted, the last file copied will be set to the clipboard. The program would grab the previous data from an array and set it to the clipboard. You'd obviously need to work something out for files and images and so on, but heck, that's small beans for autoit.

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