Properties of an array value? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
chinagreenelvis
Posts: 133
Joined: 19 Oct 2015, 16:21

Properties of an array value?

Post by chinagreenelvis » 21 Jan 2022, 00:58

Code: Select all

ObjRelease(ListedGames)
ListedGames := Object()
Loop, Files, %SearchFolder%\*.*, FR
{
	SplitPath, A_LoopFileFullPath, , , , FileNameNoExt
	ListedGames.Push(A_LoopFileFullPath)
	For Index, ListedGame in ListedGames
	{
		If (ListedGame = A_LoopFileFullPath)
		{
			ListedGames[A_Index].FileNameNoExt := FileNameNoExt
			MsgBox, % ListedGames[A_Index].FileNameNoExt
		}
	}
}
Not sure what I'm doing wrong here, but the messagebox returns a blank in this section of my code. Any help is appreciated.

amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Properties of an array value?  Topic is solved

Post by amateur+ » 21 Jan 2022, 03:05

Code: Select all

ObjRelease(ListedGames)
ListedGames := [{}]
Loop, Files, %SearchFolder%\*.*, FR
{
	SplitPath, A_LoopFileFullPath, , , , FileNameNoExt
	ListedGames.Push({FileFullPath: A_LoopFileFullPath})
	For Index, ListedGame in ListedGames
	{
		If (ListedGame.FileFullPath = A_LoopFileFullPath)
		{
			ListedGames[Index].FileNameNoExt := FileNameNoExt
			MsgBox, % ListedGames[Index].FileNameNoExt
		}
	}
}
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.

chinagreenelvis
Posts: 133
Joined: 19 Oct 2015, 16:21

Re: Properties of an array value?

Post by chinagreenelvis » 21 Jan 2022, 03:24

Interesting, thanks very much!

Post Reply

Return to “Ask for Help (v1)”