Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variables without values #6

Open
LateBanana opened this issue Nov 20, 2023 · 0 comments
Open

Variables without values #6

LateBanana opened this issue Nov 20, 2023 · 0 comments

Comments

@LateBanana
Copy link

When I reload a script that contains #include , I get the error

Warning: This variable appears to never be assigned a value.

Specifically: local varSetCapacity

	---- D:\the good stuff... 3\AutoHotKey\Lib\toStr.ahk
	087: }
	090: {
▶	091: hFile := fileObj.handle , varSetCapacity(lpszFilePath, 260 * 2 + 1) , cchFilePath := 260 * 2 , dwFlags := 0x0 , ret := dllCall("GetFinalPathNameByHandleW", "Ptr", hFile, "Str", lpszFilePath, "UInt", cchFilePath, "UInt", dwFlags)
	097: If (ret > 260 * 2)
	097: {

For more details, read the documentation for #Warn.

and

Warning: This variable appears to never be assigned a value.

Specifically: local lpszFilePath

	---- D:\the good stuff... 3\AutoHotKey\Lib\toStr.ahk
	087: }
	090: {
▶	091: hFile := fileObj.handle , varSetCapacity(lpszFilePath, 260 * 2 + 1) , cchFilePath := 260 * 2 , dwFlags := 0x0 , ret := dllCall("GetFinalPathNameByHandleW", "Ptr", hFile, "Str", lpszFilePath, "UInt", cchFilePath, "UInt", dwFlags)
	097: If (ret > 260 * 2)
	097: {

For more details, read the documentation for #Warn.

I am running v2 and forced your script to run it too with #Requires AutoHotkey v2.0. What should I change in your script to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant