Jump to content

Recommended Posts

For notes,

compiled my script this time to 64bit along with Copy_x64.dll  (_Copy_CopyFile())

its all Good on windows 7

running VM with windows 10 I get the dreaded 0xc0000005 error code 
"A problem caused the program to stop working correctly"

 worked for me before with the 32bit compile i had used
 
 now, not sure if its the 64bit Autoit compile that might cause this somehow or its the dll ( probably windows 10 or the VM  )
 
leaving out the line _Copy_CopyFile() in the code, everything continues without any problems
 
the dll loads ok but when the line gets to _Copy_CopyFile() that error shows up

..

Link to post
Share on other sites
  • 1 month later...
  • Replies 85
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

LAST VERSION - 1.4 18-May-12 This small library allows simple and reliable way to copy or move files and directories without suspending your script. Moreover, you can get the current state (number of

You're example doesn't work at home (XP PRO SP3, AutoIt v3.3.6.1) "No files were copied". The source folder contains 5 files and the target folder is empty. What did I miss?

For notes, compiled my script this time to 64bit along with Copy_x64.dll  (_Copy_CopyFile()) its all Good on windows 7 running VM with windows 10 I get the dreaded 0xc0000005 error code

Posted Images

  • 3 months later...
On 11/22/2010 at 4:04 AM, wuruoyu said:

@wraithdu

I see. but forgot to mention. I am asking the UDF maker( Yashied ). Maybe this is too difficult everybody else other than Yashied. :-)

That is not too difficult but what @wraithdu wanted to tell you only is afraid to say it honestly as it is so then I will do and I hope

moderator let it through!

So what you @wuruoyu ask is not kind of question in which you sound as person who is stuck up with a problem what how he only know to try do not solve the problem and maybe someone with more knowledge has a clue what to try.

But your, @wuruoyu sound more that you love if someone solves your problem and are very happy when one or another task gets done by others so that you have more free time to lay on your couch and drink some cola while watching some football.

Only such joy of others helping you probably won't happen so often but maybe you believe you need to try harder and others will help.

Is definitely a way to go though in principle not a way you go but a way others go for you.

Consider once another direction and see where you get hopelessly stuck and then ask for smallest possible amount of help or offer a beautiful round amount of $$|€€ like €100 for this case and lots of AutoITers will love to help. 

Link to post
Share on other sites
  • 1 year later...

Weird to see that after starting dev xD.

 

I am not giving up I'll rework haha :evil:

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to post
Share on other sites
  • 5 months later...

Hello Yashied;
First of all, thanks for the udf you prepared.
my problem is simply copying a single folder even if more than one folder is selected. If you could help with this situation, I would greatly appreciate it. I share the scrip I edited.
    Thank you in advance for the help.

#include <AutoItConstants.au3>
#Include <Array.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include "Copy.au3"

Opt('MustDeclareVars', 1)
Opt('TrayAutoPause', 0)

Global $Form, $Dest, $Save, $Rec, $Esc, $Label, $Data, $Msg, $Progress, $State
Global $Checkbox1, $Checkbox2, $Checkbox3
Global $Path, $Path1, $Path2, $Path3, $Path4, $Path5
Global $Sour1, $Sour2, $Sour3, $Sour4, $Sour5
Global $Size1, $Size2, $Size3, $Size4, $Size5
Global $Copy = False, $Pause = False

If Not _Copy_OpenDll() Then
    MsgBox(16, "HATA DLL", "DLL DOSYASI BULUNAMADI.")
    Exit
EndIf

Global $Form = GUICreate("_ank_ Yedekleyici", 550, 330, -1, -1, $WS_POPUP)
Global $File = GUICtrlCreateMenu("Dosya")
Global $Fle1 = GUICtrlCreateMenuItem("Yedekle", $File)
Global $Exit = GUICtrlCreateMenuItem("Çıkış", $File)
Global $Edit = GUICtrlCreateMenu("Düzen")
Global $Edt1 = GUICtrlCreateMenuItem("Tema 1", $Edit)

$Sour1 = GUICtrlCreateInput("", 10, 10, 300, 20, BitOR($ES_AUTOHSCROLL, $ES_LEFT, $ES_MULTILINE))
GUICtrlSetState(-1, $GUI_DISABLE)
$Size1 = GUICtrlCreateInput("", 460, 10, 70, 20, BitOR($ES_AUTOHSCROLL, $ES_RIGHT, $ES_MULTILINE))
GUICtrlSetState(-1, $GUI_DISABLE)
$Checkbox1 = GUICtrlCreateCheckbox("Kullanıcı Tüm Dosyaları...", 320, 5, 130, 30)

$Sour2 = GUICtrlCreateInput("", 10, 40, 300, 20, BitOR($ES_AUTOHSCROLL, $ES_LEFT, $ES_MULTILINE))
GUICtrlSetState(-1, $GUI_DISABLE)
$Size2 = GUICtrlCreateInput("", 460, 40, 70, 20, BitOR($ES_AUTOHSCROLL, $ES_RIGHT, $ES_MULTILINE))
GUICtrlSetState(-1, $GUI_DISABLE)
$Checkbox2 = GUICtrlCreateCheckbox("Belgeler...........................", 320, 35, 130, 30)

$Sour3 = GUICtrlCreateInput("", 10, 70, 300, 20, BitOR($ES_AUTOHSCROLL, $ES_LEFT, $ES_MULTILINE))
GUICtrlSetState(-1, $GUI_DISABLE)
$Size3 = GUICtrlCreateInput("", 460, 70, 70, 20, BitOR($ES_AUTOHSCROLL, $ES_RIGHT, $ES_MULTILINE))
GUICtrlSetState(-1, $GUI_DISABLE)
$Checkbox3 = GUICtrlCreateCheckbox("Masaüstü...........................", 320, 65, 130, 30)

$Sour4 = GUICtrlCreateInput("", 10, 100, 250, 20, BitOR($ES_AUTOHSCROLL, $ES_LEFT, $ES_MULTILINE))
GUICtrlSetState(-1, $GUI_DISABLE)
Global $Fol1 = GUICtrlCreateButton("...", 270, 100, 40, 20)
$Size4 = GUICtrlCreateInput("", 460, 100, 70, 20, BitOR($ES_AUTOHSCROLL, $ES_RIGHT, $ES_MULTILINE))
GUICtrlSetState(-1, $GUI_DISABLE)
Global $Lbl1 = GUICtrlCreateLabel("Kullanıcı Tanımlı Klasör.......", 320, 105, 130, 20)

$Sour5 = GUICtrlCreateInput("", 10, 130, 250, 20, BitOR($ES_AUTOHSCROLL, $ES_LEFT, $ES_MULTILINE))
GUICtrlSetState(-1, $GUI_DISABLE)
Global $Fol2 = GUICtrlCreateButton("...", 270, 130, 40, 20)
$Size5 = GUICtrlCreateInput("", 460, 130, 70, 20, BitOR($ES_AUTOHSCROLL, $ES_RIGHT, $ES_MULTILINE))
GUICtrlSetState(-1, $GUI_DISABLE)
Global $Lbl2 = GUICtrlCreateLabel("Kullanıcı Tanımlı Klasör.......", 320, 135, 130, 20)

$Save = GUICtrlCreateButton("...", 310, 220, 40, 20)
GUICtrlCreateLabel("Hedef:", 10, 223, 60, 20)
$Dest = GUICtrlCreateInput("", 50, 220, 250, 20, BitOR($ES_AUTOHSCROLL, $ES_LEFT, $ES_MULTILINE))
GUICtrlSetState(-1, $GUI_DISABLE)

Global $Drive = GUICtrlCreateButton("USB DISC", 360, 220, 70, 20)
Global $aa = DriveGetDrive($DT_REMOVABLE)

If @error Then
    GUICtrlSetState($Drive, $GUI_DISABLE)
Else
    GUICtrlSetState($Drive, $GUI_ENABLE)
EndIf

$Label = GUICtrlCreateLabel("İşlem...", 360, 275, 300, 20)
$Progress = GUICtrlCreateProgress(10, 250, 340, 15)
$Rec = GUICtrlCreateButton("YEDEKLE", 200, 270, 100, 20)
$Esc = GUICtrlCreateButton(';', 310, 270, 40, 20)
GUICtrlSetFont(-1, 10, 400, 0, 'Webdings')
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState()

While 1
    If $Copy Then
        $State = _Copy_GetState()
        If $State[0] Then
            If $State[0] = -1 Then
            Else
                $Data = Round($State[1] / $State[2] * 100)
                If GUICtrlRead($Progress) <> $Data Then
                    GUICtrlSetData($Progress, $Data)
                EndIf
                $Data = StringRegExpReplace($State[6], '^.*\\', '')
                If GUICtrlRead($Label) <> $Data Then
                    GUICtrlSetData($Label, $Data)
                EndIf
            EndIf
        Else
            Switch $State[5]
                Case 0
                    GUICtrlSetData($Progress, 100)
                    MsgBox(64, "SONUÇ", 'Kopyalama işlemi başarıyla tamamlandı.', 0, $Form)
                Case 1235
                    MsgBox(16, "HATA_1", 'Kopyalama işlemi iptal edildi.', 0, $Form)
                Case Else
                    MsgBox(16, "HATA_2", 'Klasör kopyalanamadı.' & @CR & @CR & $State[5], 0, $Form)
            EndSwitch
            GUICtrlSetState($Esc, $GUI_DISABLE)
            GUICtrlSetData($Progress, 0)
            GUICtrlSetData($Label, '')
            GUICtrlSetData($Rec, 'YEDEKLE')
            GUICtrlSetData($Esc, ';')
            $Copy = 0
        EndIf
    EndIf
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            ExitLoop

        Case $Edt1
            GUISetBkColor(0xABABAB)

        Case $Exit
            _Terminate()

        Case $Checkbox1
            If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then
                GUICtrlSetData($Sour1, @UserProfileDir)
                $Path1 = GUICtrlRead($Sour1)
                Local $SZ1 = DirGetSize($Path1, 0)
                If $SZ1 > 1098907648 Then
                    Local $sza = Round($SZ1 / 1024 / 1024 / 1024)
                    GUICtrlSetData($Size1, $sza & " - GB.")
                ElseIf $SZ1 > 1048576 Then
                    Local $sza = Round($SZ1 / 1024 / 1024)
                    GUICtrlSetData($Size1, $sza & " - MB.")
                Else
                    Local $sza = Round($SZ1 / 1024)
                    GUICtrlSetData($Size1, $sza & " - KB.")
                EndIf
                GUICtrlSetState($Checkbox2, $GUI_DISABLE)
                GUICtrlSetState($Checkbox2, $GUI_UNCHECKED)
                GUICtrlSetState($Checkbox3, $GUI_DISABLE)
                GUICtrlSetState($Checkbox3, $GUI_UNCHECKED)
                GUICtrlSetData($Sour2, "")
                GUICtrlSetData($Sour3, "")
                GUICtrlSetData($Size2, "")
                GUICtrlSetData($Size3, "")
            EndIf
            If GUICtrlRead($Checkbox1) <> $GUI_CHECKED Then
                $Path1 = GUICtrlRead($Sour1)
                GUICtrlSetState($Checkbox2, $GUI_ENABLE)
                GUICtrlSetState($Checkbox2, $GUI_UNCHECKED)
                GUICtrlSetState($Checkbox3, $GUI_ENABLE)
                GUICtrlSetState($Checkbox3, $GUI_UNCHECKED)
                GUICtrlSetData($Sour1, "")
                GUICtrlSetData($Size1, "")
            EndIf

        Case $Checkbox2
            If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then
                GUICtrlSetData($Sour2, @MyDocumentsDir)
                $Path2 = GUICtrlRead($Sour2)
                Local $SZ2 = DirGetSize($Path2, 0)
                If $SZ2 > 1098907648 Then
                    Local $szb = Round($SZ2 / 1024 / 1024 / 1024)
                    GUICtrlSetData($Size2, $szb & " - GB.")
                ElseIf $SZ2 > 1048576 Then
                    Local $szb = Round($SZ2 / 1024 / 1024)
                    GUICtrlSetData($Size2, $szb & " - MB.")
                ElseIf $SZ2 > 1024 Then
                    Local $szb = Round($SZ2 / 1024)
                    GUICtrlSetData($Size2, $szb & " - KB.")
                EndIf
            EndIf
            If GUICtrlRead($Checkbox2) <> $GUI_CHECKED Then
                GUICtrlSetData($Sour2, "")
                GUICtrlSetData($Size2, "")
                $Path2 = GUICtrlRead($Sour2)
            EndIf

        Case $Checkbox3
            If GUICtrlRead($Checkbox3) = $GUI_CHECKED Then
                GUICtrlSetData($Sour3, @DesktopDir)
                $Path3 = GUICtrlRead($Sour3)
                Local $SZ3 = DirGetSize($Path3, 0)
                If $SZ3 > 1098907648 Then
                    Local $szc = Round($SZ3 / 1024 / 1024 / 1024)
                    GUICtrlSetData($Size3, $szc & " - GB.")
                ElseIf $SZ3 > 1048576 Then
                    Local $szc = Round($SZ3 / 1024 / 1024)
                    GUICtrlSetData($Size3, $szc & " - MB.")
                ElseIf $SZ3 > 1024 Then
                    Local $szc = Round($SZ3 / 1024)
                    GUICtrlSetData($Size3, $szc & " - KB.")
                EndIf
            EndIf
            If GUICtrlRead($Checkbox3) <> $GUI_CHECKED Then
                GUICtrlSetData($Sour3, "")
                GUICtrlSetData($Size3, "")
                $Path3 = GUICtrlRead($Sour3)
            EndIf

        Case $Fol1
            $Path4 = FileSelectFolder("Yedeklenecek klasörü seçin", "", 0)
            GUICtrlSetData($Sour4, $Path4)
            Local $SZ4 = DirGetSize($Path4, 0)
            If $SZ4 > 1098907648 Then
                Local $szd = Round($SZ4 / 1024 / 1024 / 1024)
                GUICtrlSetData($Size4, $szd & " - GB.")
            ElseIf $SZ4 > 1048576 Then
                Local $szd = Round($SZ4 / 1024 / 1024)
                GUICtrlSetData($Size4, $szd & " - MB.")
            ElseIf $SZ4 > 1024 Then
                Local $szd = Round($SZ4 / 1024)
                GUICtrlSetData($Size4, $szd & " - KB.")
            EndIf

        Case $Fol2
            $Path5 = FileSelectFolder("Yedeklenecek klasörü seçin", "", 0)
            GUICtrlSetData($Sour5, $Path5)
            Local $SZ5 = DirGetSize($Path5, 0)
            If $SZ5 > 1098907648 Then
                Local $sze = Round($SZ5 / 1024 / 1024 / 1024)
                GUICtrlSetData($Size5, $sze & " - GB.")
            ElseIf $SZ5 > 1048576 Then
                Local $sze = Round($SZ5 / 1024 / 1024)
                GUICtrlSetData($Size5, $sze & " - MB.")
            ElseIf $SZ5 > 1024 Then
                Local $sze = Round($SZ5 / 1024)
                GUICtrlSetData($Size5, $sze & " - KB.")
            EndIf

        Case $Drive
            $Path = ("E:\" & @MON & @MDAY & "_Backup\")
            GUICtrlSetData($Dest, $Path)

        Case $Save
            $Path = FileSelectFolder('Kaynak dizininin kopyalanacağı hedef klasörü seçin.', '', 2, $Form)
            GUICtrlSetData($Dest, $Path)

        Case $Rec
            If $Copy Then
                _Copy_Abort()
            Else
                GUICtrlSetState($Esc, $GUI_ENABLE)
                GUICtrlSetData($Label, 'Hazırlanıyor ...')
                GUICtrlSetData($Rec, "VAZGEÇ")
                Global $f[4]
                $f[0] = $Path1
                $f[1] = $Path2
                $f[2] = $Path3
                $f[3] = $Path4
                For $i = 0 To UBound($f) - 1 Step +1
                    Global $Dst = $f[$i]
                    _Copy_CopyDir($Dst, $Path, 0, 0, 0, '_Copy_CallbackDlg', $Form)
                    $Copy = 1
                Next
            EndIf

        Case $Esc
            $Pause = Not $Pause
            If $Pause Then
                GUICtrlSetData($Esc, '4')
            Else
                GUICtrlSetData($Esc, ';')
            EndIf
            _Copy_Pause($Pause)
    EndSwitch
WEnd

Func _Terminate()
    Exit
EndFunc

 

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...