PColik Posted October 1, 2012 Share Posted October 1, 2012 Arkadaşlar ben AutoPlay Medi Studio'nun kendi yardım bölümünden aldığım bir kodu kendi kriterlerime göre değiştirdim, fakat aşağıda ki kodda 9. satırda hata veriyor. Neden olabilir? -- Get the path to the user's My Documents folder. DestFolder = Shell.GetFolder(SHF_PROGRAMFILES); -- Create a folder in the user's My Documents folder called "Copied Files". Folder.Create(_ProgramFilesFolder.."\\Kolay Ara"); --Copy all files within the Docs folder on the CD-ROM to the destination. StatusDlg.Show(MB_ICONNONE, false); File.Copy("AutoPlay\\Docs\\Türkçe Versiyon", ProgramFilesFolder.."\\Kolay Ara\\", true, true, false, true, nil); -- Check to see if the File.Copy action failed by getting it's error code. error = Application.GetLastError(); StatusDlg.Hide(); -- If it failed (not equal to 0), display a dialog informing the user. -- If it succeeded, open an explore window showing the "Copied Files" folder. if error ~= 0 then result = Dialog.Message("Error", "There was an error copying the files to your system. Please try again.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1); else Shell.Execute(ProgramFilesFolder.."\\Kolay Ara", "explore", "", "", SW_SHOWNORMAL); end Quote Link to comment Share on other sites More sharing options...
PColik Posted October 1, 2012 Author Share Posted October 1, 2012 Tamam sorunu düzelttim fakat şimdi başka bir sorum olacaktı. Kodu aşağıdaki ile değiştirdim ve çalıştı. -- Get the path to the user's My Documents folder. DestFolder = Shell.GetFolder(SHF_PROGRAMFILES); -- Create a folder in the user's My Documents folder called "Copied Files". Folder.Create(DestFolder.."\\Kolay Ara\\Türkçe Versiyon"); --Copy all files within the Docs folder on the CD-ROM to the destination. StatusDlg.Show(MB_ICONNONE, false); File.Copy("AutoPlay\\Docs\\Türkçe Versiyon\\*.*", DestFolder.."\\Kolay Ara\\Türkçe Versiyon\\", true, true, false, true, nil); -- Check to see if the File.Copy action failed by getting it's error code. error = Application.GetLastError(); StatusDlg.Hide(); -- If it failed (not equal to 0), display a dialog informing the user. -- If it succeeded, open an explore window showing the "Copied Files" folder. if error ~= 0 then result = Dialog.Message("Error", "There was an error copying the files to your system. Please try again.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1); else Shell.Execute(DestFolder.."\\Kolay Ara\\Türkçe Versiyon", "explore", "", "", SW_SHOWNORMAL); end Bu kodu kullandığım zaman StatusDlg açıldığında başlıkta Copying, dosya kaynağında from, kopyalanacak hedefte ise to yazıyor. Bunları düzeltme imkanım var mı? Quote Link to comment Share on other sites More sharing options...
nightmare3519 Posted October 2, 2012 Share Posted October 2, 2012 Proje dosyası verecekmisin? Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted October 2, 2012 Share Posted October 2, 2012 [CODE] StatusDlg.SetTitle(); StatusDlg.SetStatusText(); StatusDlg.SetMessage(); [/CODE] Quote Link to comment Share on other sites More sharing options...
PColik Posted October 2, 2012 Author Share Posted October 2, 2012 Bu kodları denedim fakat olmadı. Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted October 3, 2012 Editor Share Posted October 3, 2012 Olmaz tabi direk yazmayacaksın Globalde StatusDlg ile ilgili bir fonksion oluşturacaksın ve File.Copy nin Callback function kısmına globaldeki değişkenini tanımlayacaksın. Quote Link to comment Share on other sites More sharing options...
nightmare3519 Posted October 3, 2012 Share Posted October 3, 2012 (edited) Mesela bu şekildemi? function status() StatusDlg.SetTitle("Kopyalanıyor") StatusDlg.SetStatusText("Kopyalanan Dosya") StatusDlg.SetMessage("Hedef") end [indent=1][color=#282828] [b][b]File.Copy("AutoPlay\\Docs\\Türkçe Versiyon\\*.*", DestFolder.."\\Kolay Ara\\Türkçe Versiyon\\", true, true, false, true, [color=#ff0000]status[/color]);[/b][/b][/color] [color=#282828] Aklımdan yazdım yanlış olabilir[/color][/indent] Edited October 3, 2012 by nightmare3519 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.