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 

[Func] RelativePath & AbsolutePath
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Titan



Joined: 11 Aug 2004
Posts: 5376
Location: /b/

PostPosted: Sat May 26, 2007 10:03 am    Post subject: Reply with quote

Thanks, here they are:

Code:
PathCombine(dir, file) {
   VarSetCapacity(dest, 260, 1) ; MAX_PATH
   DllCall("Shlwapi.dll\PathCombineA", "UInt", &dest, "UInt", &dir, "UInt", &file)
   Return, dest
}

UrlCombine(base, rel) {
   len := VarSetCapacity(dest, 2084, 1) ; INTERNET_MAX_URL_LENGTH
   DllCall("Shlwapi.dll\UrlCombineA", "Str", base, "Str", rel
      , "UInt", &dest, "UInt", &len
      , "UInt", 0x20000000) ; URL_ESCAPE_UNSAFE
   Return, dest
}


v1.1 released.
_________________

Back to top
View user's profile Send private message Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 3644
Location: Belgrade

PostPosted: Thu Dec 20, 2007 2:51 pm    Post subject: Reply with quote

In case somebody is interested how to get full path name from relative path:

Code:
GetFullName( fn ) {
   static buf, i
   if !i
      i := VarSetCapacity(buf, 512)
   DllCall("GetFullPathNameA", "str", fn, "uint", 512, "str", buf, "str*", 0)
   return buf
}

_________________
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
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