Okay, I have been exploring. I enter the file for the mp4 and when I enter it plays. If I enter another movie, the last movie I enter is the one that always plays. So if I have 10 movies entered, it will only play the last title that I entered. Meaning... that all 10 title, no matter their file chosen for the mp4, play the last movie entered. They don't play what they are to play lol... grrr.... Not only that, when I exit the program, it does save all the text and information needed in the file. But when I reload the program, none of the movies play at all. They play the last one I entered until I exit, but then they won't play nothing.
I figured it had to be upon updating file upon exit that was the issue, but I find no issue whatsoever.
Code: Select all
UpdateFile()
{
FileDelete, MovieList.txt
WinGet, Min, MinMax, MovieList
If Min = -1
WinRestore, MovieList
WinGetPos, X, Y, Width, Height, MovieList
Width -= 16
Height -= 38
FileAppend, x%x% y%y% w%Width% h%Height% `n, MovieList.txt
Loop % LV_GetCount()
{
RowNum := A_Index
Loop, 3
{
LV_GetText(Text, RowNum, A_Index)
TrimText := Trim(Text)
FileAppend, "%TrimText%"`,, MovieList.txt
}
LV_GetText(Text, RowNum, 4)
TrimText := Trim(Text)
FileAppend, "%TrimText%"`n, MovieList.txt
}
}
Then I thought it was how the file was loaded, but I also find no error there.
Code: Select all
IfExist, MovieList.txt ;Add data from MovieList.txt to ListView
{
Loop, Read, MovieList.txt
{
If (A_index = 1 and SubStr(A_LoopReadLine, 1, 1) = "x")
{
WinPos := A_LoopReadLine
Continue
}
Else
{
Loop, Parse, A_LoopReadLine , CSV
{
RowData%A_Index% := A_LoopField
}
LV_Add("", RowData1,RowData2,RowData3,RowData4)
}
}
}
So I am not finding error upon saving the file and then reloading the program, unless I am missing something that is obvious LOL.. I do that sometimes. The only other thing I could think of is how it's adding the file... It does play the last movie I enter into the program... but it only plays that movie for ALL the entries I put into the program. SO I looked at the code for adding, and I also find nothing wrong there.
Code: Select all
AddItem:
Gui, Submit, NoHide
If SelectedRow = 0
{
LV_Add("", Trim(Title1),Trim(Year1),Trim(NewVar),Trim(playmovie))
}
else
{
LV_Modify(SelectedRow,"", Year1,Title1,NewVar,playmovie)
LV_ModifyCol(1,"Sort")
SelectedRow := 0
GuiControl, ,Button1, Add to list
}
So now, I"m completely exhausted with trying to figure this out. I don't see any errors in the code. Everything is pointing to where it needs to be. The files is saving the correct image location and mp4 location. I'm lost now lol
Sorry for such a long post, but had a lot to cover. Any help appreciated, thank you.