Jump to content

basic help please.


adds
 Share

Recommended Posts

hey

i made a copier to copy Wow files and other read only files, which works mainly from the tray. however it didnt work so i tryed redoing it and it runs but doent do anything...

#NoTrayIcon

#include <GUIConstants.au3>
#include <ProgressConstants.au3>
#include <EditConstants.au3>

Opt("TrayMenuMode",1)
    
Global $Source  
Global $Destination
Global $Save
Global $Exit2 
Global $Browse 
Global $Browse2 

FileInstall ( "C:\Users\User\Documents\My Sources\Master Copy\tray.ico", @ScriptFullPath , 0 )

TraySetIcon ("C:\Users\User\Documents\My Sources\Master Copy\tray.ico")
$Exit = TrayCreateItem ("Exit")
$Go = TrayCreateItem ("Go!")
$Set = TrayCreateItem ("Settings")

Func _Set()
        GUICreate ("Settings",301, 201, 193, 125)
        Global $Source = GUICtrlCreateInput ("Source",16, 56, 121, 21)
        Global $Destination = GUICtrlCreateInput ("Destination",32, 152, 75, 25, 0)
        Global $Save = GUICtrlCreateButton ("SAVE", 32, 152, 75, 25, 0)
        Global $Exit2 = GUICtrlCreateButton("Exit", 208, 152, 75, 25, 0)
        Global $Browse = GUICtrlCreateButton("Browse", 192, 56, 75, 25, 0)
        Global $Browse2 = GUICtrlCreateButton("Browse", 192, 104, 75, 25, 0)
        GUISetState(@SW_SHOW)
        While 1
            $Msg1 = GUIGetMsg ()
            Select
            Case $Msg1 = $Browse
                FileSelectFolder ("Select Directory", "", 2)
            
            Case $Msg1 = $Browse2
                FileSelectFolder ("Select Directory", "", 2)
        
            Case $Msg1 = $Exit2
                Exit
            
            Case $Msg1 = $Save
                IniWrite ("@ScriptFullPath\Settings", "", "Source", $Source)
                IniWrite ("Settings", "", "Destination", $Destination)
            EndSelect
        WEnd
    EndFunc
    
    
Func _Go()
    GUICreate ("Working...", 278, 81, 193, 125)
    $Progress1 = GUICtrlCreateProgress(56, 48, 150, 17, $PBS_SMOOTH)
    $Log = GUICtrlCreateInput("", 80, 8, 121, 21, $ES_READONLY)
    $Label = GUICtrlCreateLabel("Copying:", 24, 8, 45, 24)
    GUISetState(@SW_SHOW)
    
    $Check1 = DirGetSize ($Source, 0 )      
    $Check2 = DirGetSize ( $Destination, 0)
    
    DirCopy ($Source,$Destination,1)
        
    $Check3 = DirGetSize ( $Destination, 0)
        
    If $Check3 = $Check2 + $Check1 Then
        MsgBox(0, "Worked!", "Yay! It Worked!")         
    Else
        MsgBox(0, "Oh...", "Somethings Wrong")
    EndIf
EndFunc
        
Func _Exit() 
    Exit
EndFunc


While 1
    $Msg = GUIGetMsg()      
    Select
    Case $Msg = $Set
        _Set()              
    Case $Msg = $Go
        _Go()
    Case $Msg = $Exit
        _Exit()
    EndSelect
WEnd

still doesnt work...

anyhelp would be great.

thanks adds

Edited by adds
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...