AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MiniFTP [a mini FTP client made in ahk]

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
ahklerner



Joined: 26 Jun 2006
Posts: 1317
Location: USA

PostPosted: Tue Apr 08, 2008 5:27 am    Post subject: MiniFTP [a mini FTP client made in ahk] Reply with quote

THE SOURCE CODE: http://autohotkey.net/~nkruzan/MiniFTP3.zip
License

Code:

/* This program is free software. It comes without any warranty, to
 * the extent permitted by applicable law. You can redistribute it
 * and/or modify it under the terms of the Do What The **** You Want
 * To Public License, Version 2, as published by Sam Hocevar. See
 * http://sam.zoy.org/wtfpl/COPYING for more details. */

Thanks to Olfen, Maj, Titan, Adde_P, DerRaphael, Sean and anyone else I may have used code from. I will try to put more credits in the source later.

Comments, Bugs, Suggestions welcome. Feel free to make your own changes and modify it to your hearts content.


_________________

ʞɔпɟ əɥʇ ʇɐɥʍ


Last edited by ahklerner on Wed Apr 09, 2008 8:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
ahklerner



Joined: 26 Jun 2006
Posts: 1317
Location: USA

PostPosted: Tue Apr 08, 2008 7:58 pm    Post subject: Reply with quote

Added license to first post
_________________

ʞɔпɟ əɥʇ ʇɐɥʍ
Back to top
View user's profile Send private message
widow
Guest





PostPosted: Wed Apr 09, 2008 4:12 am    Post subject: Reply with quote

It works Smile
Awesome ahk work.
Back to top
Guest






PostPosted: Wed Apr 09, 2008 4:15 am    Post subject: Reply with quote

i wonder whats the difference between this and the others Laughing
Back to top
tank



Joined: 21 Dec 2007
Posts: 2416
Location: Louisville KY USA

PostPosted: Thu Jul 17, 2008 11:49 pm    Post subject: Reply with quote

you have once again earned my profound respect
_________________
Basic Webpage Controls with JavaScript / COM - Tutorial by Jethrow
Back to top
View user's profile Send private message
Guest






PostPosted: Fri Jul 18, 2008 5:19 am    Post subject: Re: MiniFTP [a mini FTP client made in ahk] Reply with quote

ahklerner wrote:
License

...BEST...LICENSE...EVER!...I of course normally don't read or care about licenses...but when I hovered on it & saw "wtfpl" in the url...I HAD to click!...
Back to top
n-l-i-d
Guest





PostPosted: Tue Mar 16, 2010 3:54 pm    Post subject: Reply with quote

I tried adding more info headers to the listview.

I'm having issues with getting the correct date from files (FileTimeToLocalFileTime and FileTimeToSystemTime).

Like you can see, the timestamps it returns are complete gibberish.



I tried adapting the code from the following postings:

- SKAN's ProcessCreationTime function
- FileGetTime with milliseconds
- The different attempts at DllCall: Basic FTP Functions

The minor changes I made to MiniClient.ahk to add the extra headers:

Code:
line 83:
Gui, 1:Add, ListView, x170 y%yOffset% w480 h200 gFileSelect AltSubmit vMiniFTP_ServerList hwndMiniFTP_hFileList -TabStop, Name | Size | Attrib | Path | Creation Time | Last access time | Last write time

line 356:
LV_Add("",GetItem(pFiles, ThisSelection . "_" . A_Index  . "_Name"), GetItem(pFiles, ThisSelection . "_" . A_Index . "_Size") . " " . GetItem(pFiles, ThisSelection . "_" . A_Index . "_SizeType"), GetItem(pFiles, ThisSelection . "_" . A_Index . "_Attrib"), GetItem(pFiles, ThisSelection . "_" . A_Index . "_Path"), GetItem(pFiles, ThisSelection . "_" . A_Index . "_CreationTime"), GetItem(pFiles, ThisSelection . "_" . A_Index . "_LastAccessTime"), GetItem(pFiles, ThisSelection . "_" . A_Index . "_LastWriteTime"))



Different attempts at changing/adapting the FileTimeToStr function in FTP.ahk (none of which seem to work)

Code:
/*

FileTimeToStr(FileTime) {
   VarSetCapacity(SystemTime, 16, 0)
   DllCall("FileTimeToSystemTime", "uint", &FileTime, "uint", &SystemTime)
   Return NumGet(SystemTime,2,"short")
      . "/" . NumGet(SystemTime,6,"short")
      . "/" . NumGet(SystemTime,0,"short")
      . " " . NumGet(SystemTime,8,"short")
      . ":" . NumGet(SystemTime,10,"short")
      . ":" . NumGet(SystemTime,12,"short")
      . "." . NumGet(SystemTime,14,"short")
}

*/

/*

; FileTimeToSystemTime: http://msdn2.microsoft.com/en-us/library/ms724280.aspx
;~ typedef struct _SYSTEMTIME {
;~   WORD wYear;
;~   WORD wMonth;
;~   WORD wDayOfWeek;
;~   WORD wDay;
;~   WORD wHour;
;~   WORD wMinute;
;~   WORD wSecond;
;~   WORD wMilliseconds;
;~ } SYSTEMTIME;
FileTimeToStr(ByRef @FileTime)
{
   VarSetCapacity(SystemTime, 16, 0)
   DllCall("FileTimeToLocalFileTime", "uint", &@FileTime, "uint", &@FileTime)
   DllCall("FileTimeToSystemTime", "uint", &@FileTime, "uint", &SystemTime)

   str .= NumGet(SystemTime, 0, "ushort")
   str .= StrLen(Word := NumGet(SystemTime,  2,"ushort")) == 1 ? ("0" . Word) : Word
   str .= StrLen(Word := NumGet(SystemTime,  6,"ushort")) == 1 ? ("0" . Word) : Word
   str .= StrLen(Word := NumGet(SystemTime,  8,"ushort")) == 1 ? ("0" . Word) : Word
   str .= StrLen(Word := NumGet(SystemTime, 10,"ushort")) == 1 ? ("0" . Word) : Word
   str .= StrLen(Word := NumGet(SystemTime, 12,"ushort")) == 1 ? ("0" . Word) : Word
   return str
}
*/

/*
FileTimeToStr(FileTime) {                       
 DllCall( "FileTimeToLocalFileTime", Int64P,FileTime, Int64P,Local ), AT := 1601
 AT += % Local//10000000, S
 Return AT
}
*/

;/*
; FileTimeToSystemTime: http://msdn2.microsoft.com/en-us/library/ms724280.aspx
;~ typedef struct _SYSTEMTIME {
;~   WORD wYear;
;~   WORD wMonth;
;~   WORD wDayOfWeek;
;~   WORD wDay;
;~   WORD wHour;
;~   WORD wMinute;
;~   WORD wSecond;
;~   WORD wMilliseconds;
;~ } SYSTEMTIME;
FileTimeToStr(ByRef @FileTime)
{
   VarSetCapacity(SystemTime, 16, 0)
   DllCall("FileTimeToLocalFileTime", "uint", &@FileTime, "uint", &@FileTime)
   DllCall("FileTimeToSystemTime", "uint", &@FileTime, "uint", &SystemTime)

;/*
   str .= NumGet(SystemTime, 0, "ushort")
   str .= StrLen(Word := NumGet(SystemTime,  2,"ushort")) == 1 ? ("0" . Word) : Word
   str .= StrLen(Word := NumGet(SystemTime,  6,"ushort")) == 1 ? ("0" . Word) : Word
   str .= StrLen(Word := NumGet(SystemTime,  8,"ushort")) == 1 ? ("0" . Word) : Word
   str .= StrLen(Word := NumGet(SystemTime, 10,"ushort")) == 1 ? ("0" . Word) : Word
   str .= StrLen(Word := NumGet(SystemTime, 12,"ushort")) == 1 ? ("0" . Word) : Word
   return str

;*/

 Loop 16   {       ; Extracting and concatenating 8 words from a SYSTEMTIME structure
  Word := Mod(A_Index-1,2) ? "" :  *( &SystemTime +A_Index-1 ) + ( *(&SystemTime +A_Index) << 8 )
  Time .= StrLen(Word) = 1 ? ( "0" . Word ) : Word  ; Prefixing "0" for single digits
           }

Return SubStr(Time,1,6) . SubStr(Time,9,8) ; YYYYMMDD24MISS

}

;*/


/*

FileTimeToStr( File, Mode="M" ) {    ; Topic: www.autohotkey.com/forum/viewtopic.php?t=49194
 ;If ( VarSetCapacity($,342,0)  && ( H:=DllCall( "FindFirstFile", Str,File, UInt,&$ ) ) ) {
 ;DllCall( "FindClose", UInt,H )
 VC:=&$+4, VA:=&$+12, VM:=&$+20, FT:=V%Mode%
 LFT:=&$+318 ,  DllCall( "FileTimeToLocalFileTime", UInt,FT, UInt,LFT )
 ST:=LFT+8   ,  DllCall( "FileTimeToSystemTime", UInt,LFT, UInt,ST )
 Loop 7
  T .= StrLen( N:=NumGet(ST+0,(A_Index-1)*2,"UShort") ) < 2 ? "0" N : N
Return SubStr(T,1,6) . SubStr(T,9,8) . SubStr( "00" NumGet( ST+0,14,"UShort" ), -2 )
}

*/


Anybody? Sad
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group