adds Posted November 28, 2008 Share Posted November 28, 2008 (edited) 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... expandcollapse popup#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 November 28, 2008 by adds Link to comment Share on other sites More sharing options...
Tomb Posted November 28, 2008 Share Posted November 28, 2008 you never call your functions. for example you have the function _Go() so you need to write _Go() somewhere to use the function Link to comment Share on other sites More sharing options...
adds Posted November 28, 2008 Author Share Posted November 28, 2008 hmmmmmm so i just add _Go() under the case in the while loop? Link to comment Share on other sites More sharing options...
Tomb Posted November 28, 2008 Share Posted November 28, 2008 hmmmmmm so i just add _Go() under the case in the while loop?is that where the function should execute?if so then yes. Link to comment Share on other sites More sharing options...
Valuater Posted November 28, 2008 Share Posted November 28, 2008 Yes.... Like This Case $Msg = $Go _Go() 8) Link to comment Share on other sites More sharing options...
adds Posted November 28, 2008 Author Share Posted November 28, 2008 cheers very much ppl... lol havent made a fully working app yet 0.- Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now