Jump to content

Autoit script takes long to complete execution


Recommended Posts

Hello, 

I am facing an issue while running the script which I have created for sending files from client to server using a web service hosted on the server.

Issue description:

1. It takes long time to send a file which is more than 500 kb. 

2. The logic of sending the file : it coverts the file content into byte array and send it. But converting large data into binary array takes long time. I have written below code for creating a byte array.

Local $String_Bytedata = "["
    ;For $io = 0 To BinaryLen($sFileRead)
    ;    $byteData[$io] = DllStructGetData($File_struct, "File", $io+1)

    ;    If ($io=0) Then

        ;    $String_Bytedata = $String_Bytedata & $byteData[$io]
        ;Else
    ;    $String_Bytedata = $String_Bytedata & "," & $byteData[$io]
    ;    EndIf
    ;Next
    ;$String_Bytedata = $String_Bytedata & "]"

 

So at the end I am getting the byte array in below format [49,50,47,48,56,47,50,48,49,53,10].

 

Please help if there is another way available for converting it into byte array.

 

Note:

1. For small files the script uploads file in a second.

2. c# exe takes few seconds to upload a file. But this exe will not be able to work in winpe environment.

 

 

 

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...