Skip to content

Commit

Permalink
Adds clearing files when Dolphin NetPlay isn't running
Browse files Browse the repository at this point in the history
  • Loading branch information
rainbowism committed Nov 26, 2015
1 parent 6595c9b commit ddfef9a
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 37 deletions.
101 changes: 64 additions & 37 deletions DolphinTags.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,71 @@
SetTitleMatchMode, 2
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

#IfWinActive Dolphin NetPlay ahk_exe Dolphin.exe
while True
file := FileOpen("user1.txt", "w")
file.Length := 0
file.Close()
file := FileOpen("user2.txt", "w")
file.Length := 0
file.Close()
file := FileOpen("user3.txt", "w")
file.Length := 0
file.Close()
file := FileOpen("user4.txt", "w")
file.Length := 0
file.Close()

while True
{
ControlGet, Names, List, , ListBox1, Dolphin NetPlay
If(Names == "")
{
file := FileOpen("user1.txt", "w")
file.Length := 0
file.Close()
file := FileOpen("user2.txt", "w")
file.Length := 0
file.Close()
file := FileOpen("user3.txt", "w")
file.Length := 0
file.Close()
file := FileOpen("user4.txt", "w")
file.Length := 0
file.Close()
}
Loop, Parse, Names, `n, `r
{
ControlGet, Names, List, , ListBox1, Dolphin NetPlay
Loop, Parse, Names, `n, `r
IfInString, A_LoopField, [1] :
{
StringReplace, TempName, A_LoopField, [1] :, ■
StringSplit, Player1Name, TempName, ■
file := FileOpen("user1.txt", "w")
file.Write(Player1Name1)
file.Close()
}
IfInString, A_LoopField, [2] :
{
StringReplace, TempName, A_LoopField, [2] :, ■
StringSplit, Player2Name, TempName, ■
file := FileOpen("user2.txt", "w")
file.Write(Player2Name1)
file.Close()
}
IfInString, A_LoopField, [3] :
{
StringReplace, TempName, A_LoopField, [3] :, ■
StringSplit, Player3Name, TempName, ■
file := FileOpen("user3.txt", "w")
file.Write(Player3Name1)
file.Close()
}
IfInString, A_LoopField, [4] :
{
IfInString, A_LoopField, [1] :
{
StringReplace, TempName, A_LoopField, [1] :, ■
StringSplit, Player1Name, TempName, ■
file := FileOpen("player1.txt", "w")
file.Write(Player1Name1)
file.Close()
}
IfInString, A_LoopField, [2] :
{
StringReplace, TempName, A_LoopField, [2] :, ■
StringSplit, Player2Name, TempName, ■
file := FileOpen("player2.txt", "w")
file.Write(Player2Name1)
file.Close()
}
IfInString, A_LoopField, [3] :
{
StringReplace, TempName, A_LoopField, [3] :, ■
StringSplit, Player3Name, TempName, ■
file := FileOpen("player3.txt", "w")
file.Write(Player3Name1)
file.Close()
}
IfInString, A_LoopField, [4] :
{
StringReplace, TempName, A_LoopField, [4] :, ■
StringSplit, Player4Name, TempName, ■
file := FileOpen("player4.txt", "w")
file.Write(Player4Name1)
file.Close()
}
StringReplace, TempName, A_LoopField, [4] :, ■
StringSplit, Player4Name, TempName, ■
file := FileOpen("user4.txt", "w")
file.Write(Player4Name1)
file.Close()
}
Sleep, 500
}
Sleep, 1000
}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DolphinTags
===========

Reads names from Dolphin NetPlay and stuff.

0 comments on commit ddfef9a

Please sign in to comment.