AutoHotkey Community

It is currently May 27th, 2012, 1:11 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 51 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post subject:
PostPosted: April 26th, 2011, 10:28 am 
Offline

Joined: April 21st, 2011, 10:00 am
Posts: 3
Sorry for the late reply:

I have been searching for a 64bit libcurl.dll as there is no x64 version on the official download page, but I haven't found one. I thought the 32bit dll would work just as fine under Windows7 64bit, but it seems not.

I only found a x64 libcurl.dll here: https://bitbucket.org/geographika/mapse ... /tip/cURL/
It was linked from this post:
http://geographika.co.uk/64-bit-curl-wi ... raphika%29
But when I start Olfen's Testscript with it I get an error message ("This dll doesn't seem to work with this version of windows or it is corrupted" etc.).

When I start the script with the most recent libcurl.dll from http://curl.haxx.se/download.html it doesn't even give me any errors (see post above), it just won't work.

I can't imagine I'm the only one who ever tried using libcurl.dll under Win64?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2011, 7:40 am 
Offline

Joined: April 21st, 2011, 10:00 am
Posts: 3
Don Luchini who compiles the official x64 cURL binaries was so nice and provided me with a x64 libcurl.dll, but to no avail - AHK simply won't load the dll and I don't know how to find out why - any hints how I could get a debug or error message out of it?
I uploaded the dll here if anyone needs it:
https://docs.google.com/leaf?id=0B_m_Zu ... ist&num=50


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 2nd, 2011, 8:41 am 
tov wrote:
tov wrote:
This works.
Downloads the file and then removes it from the server.

I'm sure it could be cleaned up... can anyone advise how ?
Code:
#SingleInstance, force
#NoEnv
#include FileHelper.ahk ; http://www.autohotkey.com/forum/topic19608.html
#include libcurl.ahk

if ( CurlGlobalInit( "libcurl" ) != 0 )
   ExitApp
hCurlEasy := CurlEasyInit()
CurlEasyDefineOptions()
CurlGetInfoDefine()
CurlShowErrors()

;### DOWNLOAD ###
Url = ftp://192.168.1.254/test.txt
hFile := CreateFile( A_ScriptDir . "\test.txt", 2 )

CurlEasySetOption( hCurlEasy, CURLOPT_URL, &URL )
VarSetCapacity(CURL_ERROR, CURL_ERROR_SIZE + 1)
CurlEasySetOption( hCurlEasy, CURLOPT_ERRORBUFFER, &CURL_ERROR )
CurlEasySetOption( hCurlEasy, CURLOPT_NOPROGRESS, 0 )
pCurlProgressFunction := RegisterCallback("CurlProgressFunction", "C F")
CurlEasySetOption( hCurlEasy, CURLOPT_PROGRESSFUNCTION, pCurlProgressFunction )
pCurlWriteFunction := RegisterCallback("CurlWriteFunction", "C F")
CurlEasySetOption( hCurlEasy, CURLOPT_WRITEFUNCTION, pCurlWriteFunction )


If ( CurlEasyPerform( hCurlEasy ) )
  MsgBox % CURL_ERROR ;%


Progress, Off
CloseHandle(hFile)

;### DELETE ###
Url = ftp://192.168.1.254
CurlSlistAppend(list, "DELE test.txt")
CurlEasyReset(hCurlEasy)
CurlEasySetOption( hCurlEasy, CURLOPT_URL, &URL )
CurlEasySetOption( hCurlEasy, CURLOPT_QUOTE, list)
CurlEasySetOption( hCurlEasy, CURLOPT_VERBOSE, 0)
CurlEasySetOption( hCurlEasy, CURLOPT_NOPROGRESS, 1)
VarSetCapacity(CURL_ERROR, CURL_ERROR_SIZE + 1)
CurlEasySetOption( hCurlEasy, CURLOPT_ERRORBUFFER, &CURL_ERROR )
If ( CurlEasyPerform( hCurlEasy ) )
  MsgBox % CURL_ERROR ;%

 CurlEasyCleanup( hCurlEasy )
 CurlFreeLibrary()
return


CurlProgressFunction(clientp, dltotal_l, dltotal_h, dlnow_l, dlnow_h, ultotal_l, ultotal_h, ulnow_l, ulnow_h)
{
   dltotal := MergeDouble( dltotal_l, dltotal_h )
   dlnow := MergeDouble( dlnow_l, dlnow_h )

   KBTotal := Round( dltotal / 1024, 2 )
   KBNow := Round( dlnow / 1024, 2 )
   Percent := Round( dlnow / dltotal * 100, 2 )
   Progress, %Percent%, %KBNow% of %KBTotal% KB (%Percent% `%)
   Return 0
}


CurlWriteFunction(pBuffer, size, nitems, pOutStream)
{
   global hFile
   WriteFile(hFile, pBuffer, size*nitems)
   return size*nitems
}


Also anyway to make the progress appear in a border less gui and update ?

If I add 'b' to the progress it goes border less, but flickers !

Thanks :)


Hi
I've got this working. But have a slight problem.
My progress bar appears, but is blank for about 5 seconds as curl connects to my server.

Once the file starts to download the progress bar is fine.

Is there any way to only display the progress bar as the download starts, not as it attempts to connect ??

Thanks :)


Any one any ideas on this ?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 19th, 2011, 4:35 pm 
Hi
I'm looking at this again and need some advice.

How do I make the progress bar appear in a GUI, not as a standalone bar, ??
Any way to make it appear once the download starts, not prior to it ?

Thanks :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 19th, 2011, 7:49 pm 
I've got the GUI working and updating OK.
But how do I only show the progress bar, once the download starts..

Not when curl is attempting to log in.

If there a 'if connected...' etc ??

Thanks


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 9th, 2011, 7:16 pm 
Offline

Joined: November 18th, 2010, 7:26 pm
Posts: 124
I have everything downloaded and in one folder. But I cant get the test file to do anything. Also where should I place the libcurl file?


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 51 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Bon, sks and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group