Page 1 of 1

V1 - DirGetParent

Posted: 06 May 2017, 16:43
by burque505
Hi, this function comes in handy.

Just as a heads-up, the link for DirGetParent and DirDelete at https://hotkeyit.github.io/v2/docs/commands/
both point to https://hotkeyit.github.io/v2/docs/comm ... Delete.htm.
DirGetParent is at https://hotkeyit.github.io/v2/docs/comm ... Parent.htm.

I don't think the command version of DirGetParent is working in V1, but I'm certainly happy to have the function version working in V1 :bravo: .

I tried the following code with AHK_H 32A, AHK_ 32U, and AHK_H 64U, all V1.1.25:

Code: Select all

MsgBox %A_ahkversion%
BaseDir = C:\Users\burque505
;~ DirGetParent, ParentDir, %BaseDir%
ParentDir := DirGetParent(BaseDir)
Msgbox % ParentDir
!x::ExitApp
The function version works great, the command version throws an error.

I don't have any AHK V2 versions, so I haven't tested that.

Regards,
burque505

Re: V1 - DirGetParent

Posted: 06 May 2017, 19:27
by HotKeyIt
Thanks for the hint, I have updated docs.
Since this is an ahk function you can't call it like command in v1, you can do that only in v2!
The same applies to all ahk functions included in ahk_h, see: https://github.com/HotKeyIt/ahkdll/tree ... ces/reslib

Re: V1 - DirGetParent

Posted: 07 May 2017, 12:05
by burque505
Ahah! Thanks for the info and for the link, and thanks especially for AutoHotkey_H and AutoHotkey.dll.