[BUG] SplithPath v2 all versions

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
_3D_
Posts: 277
Joined: 29 Jan 2014, 14:40

[BUG] SplithPath v2 all versions

14 May 2020, 01:53

https://lexikos.github.io/v2/docs/commands/SplitPath.htm
I apologize to everyone. There is 1 more argument that I miss. All is working like a charm.

Code: Select all

url:= "protocol://www.domain.com/path/file.ext"
;splitpath(url, nam, dir, ext, drv)
 splitpath(url, nam, dir, ext, nex, drv)
;MsgBox(url "`n" nam "`n" dir "`n" ext "`n" drv) ;parsing url not correct
 MsgBox(url "`n" nam "`n" dir "`n" ext "`n" nex "`n" drv) ;ALL IS FINE
Last edited by _3D_ on 14 May 2020, 14:38, edited 1 time in total.
AHKv2.0 alpha forever.
just me
Posts: 9574
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [BUG] SplithPath v2 all versions

14 May 2020, 03:29

SplitPath wrote:Support for URLs: If Path contains a colon-double-slash, such as http://domain.com or ftp://domain.com, OutDir is set to the protocol prefix + domain name + directory (e.g. http://domain.com/images) and OutDrive is set to the protocol prefix + domain name (e.g. http://domain.com). All other variables are set according to their definitions above.

Code: Select all

urltag := "://"
url:= urltag . "www.someurl.com/somedir/somename.ext"
splitpath(url, nam, dir, ext, drv)
MsgBox(url "`n" nam "`n" dir "`n" ext "`n" drv) ;parsing url correct

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: Marium0505 and 46 guests