V1 - DirGetParent

Ask for help, how to use AHK_H, etc.
burque505
Posts: 1734
Joined: 22 Jan 2017, 19:37

V1 - DirGetParent

06 May 2017, 16:43

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
HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: V1 - DirGetParent

06 May 2017, 19:27

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
burque505
Posts: 1734
Joined: 22 Jan 2017, 19:37

Re: V1 - DirGetParent

07 May 2017, 12:05

Ahah! Thanks for the info and for the link, and thanks especially for AutoHotkey_H and AutoHotkey.dll.

Return to “Ask for Help”

Who is online

Users browsing this forum: No registered users and 18 guests