Skip to content

Commit

Permalink
#Include VD.ahk -> #Include %A_LineFile%\..\VD.ahk: relative to f…
Browse files Browse the repository at this point in the history
…ileLocation instead of workingDir; fix FuPeiJiang#25
  • Loading branch information
FuPeiJiang committed Dec 24, 2022
1 parent 7b5cd3b commit 2fbf4a3
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ also has:

here's quick nice example: "get desktopNum of all windows"
```autohotkey
#Include ..\VD.ahk
#Include %A_LineFile%\..\..\VD.ahk
foundProcesses := ""
; Make sure to get all windows from all virtual desktops
Expand Down
4 changes: 2 additions & 2 deletions VD examples.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ gui, show,, VD.ahk examples WinTitle
;END of gui stuff

;include the library
#Include VD.ahk
#Include %A_LineFile%\..\VD.ahk
; or
; #Include _VD.ahk
; #Include %A_LineFile%\..\_VD.ahk
; ...{startup code}
; VD.init()

Expand Down
4 changes: 2 additions & 2 deletions VD.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ dummyFunction1() {
static dummyStatic1 := VD.init()
}
; in YOUR app
; #Include VD.ahk
; #Include %A_LineFile%\..\VD.ahk
; or
; #Include _VD.ahk
; #Include %A_LineFile%\..\_VD.ahk
; ...{startup code}
; VD.init()

Expand Down
4 changes: 2 additions & 2 deletions _VD.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@

class VD {

; #Include VD.ahk
; #Include %A_LineFile%\..\VD.ahk
; or
; #Include _VD.ahk
; #Include %A_LineFile%\..\_VD.ahk
; ...{startup code}
; VD.init()

Expand Down
2 changes: 1 addition & 1 deletion notes/test VD_IsAppPinned.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetBatchLines, -1
#KeyHistory 0

#Include ..\VD.ahk
#Include %A_LineFile%\..\..\VD.ahk

VD_Init()
; VD_AppIdFromHwnd(WinExist("A"))
Expand Down
2 changes: 1 addition & 1 deletion other examples/foundProcesses_min.ahk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Include ..\VD.ahk
#Include %A_LineFile%\..\..\VD.ahk

foundProcesses := ""
; Make sure to get all windows from all virtual desktops
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Process, Priority,, H
SetWinDelay -1
SetControlDelay -1

#Include ..\VD.ahk
#Include %A_LineFile%\..\..\VD.ahk
VD_init()

arrayOfWindowsInfo:=[] ;to store {desktopNum:number, str:INFO}
Expand Down
2 changes: 1 addition & 1 deletion other examples/run in VD lock.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetBatchLines -1
#KeyHistory 0

#Include ..\VD.ahk
#Include %A_LineFile%\..\..\VD.ahk

VD.startShellMessage()
VD.goToDesktopNum(1)
Expand Down
2 changes: 1 addition & 1 deletion other examples/run in VD.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetBatchLines -1
#KeyHistory 0

#Include ..\VD.ahk
#Include %A_LineFile%\..\..\VD.ahk

VD.startShellMessage()
VD.Run("""C:\Program Files (x86)\Hourglass\Hourglass.exe""","","","","Hourglass.exe",2)
Expand Down

0 comments on commit 2fbf4a3

Please sign in to comment.