diff --git a/Japanese Conjugation Helper/Module1.vb b/Japanese Conjugation Helper/Module1.vb index cec5045..a7f3899 100644 --- a/Japanese Conjugation Helper/Module1.vb +++ b/Japanese Conjugation Helper/Module1.vb @@ -402,10 +402,6 @@ Module Module1 HTML = Client.DownloadString(New Uri(WordURL)) Dim AddingTemp As String - If HTML.IndexOf("No matches for") <> -1 Then - Console.WriteLine("Looking for similar words...") - End If - If HTML.IndexOf("zen_bar") <> -1 And Anki = False Then TranslateSentence(Word) End If @@ -438,7 +434,6 @@ Module Module1 Dim WordChoice As Integer = 10000 Dim ActualSearch2ndAppearance As String Dim Definition1 As String = "" - If WordIndex <> 1 Then 'scraping of words and definitions ------------------------------------------------------------------------------------------- For LoopIndex = 0 To Max - 1 Array.Resize(FoundWords, FoundWords.Length + 1) @@ -500,7 +495,6 @@ Module Module1 Next 'end of multiple word scrapping ___________________________________________________________________________ - Console.WriteLine("Finalizing...") Array.Resize(FoundDefinitions, FoundDefinitions.Length - 1) Array.Resize(FoundWords, FoundDefinitions.Length) Array.Resize(FoundWordLinks, FoundDefinitions.Length) @@ -531,7 +525,7 @@ Module Module1 Console.Clear() Console.WriteLine("Which definition would you like details for? Type a number, 0 to cancel.") Console.WriteLine() - + Console.WriteLine() Dim TotalWordsFound As Integer = 0 For looper = 1 To FoundWords.Length If IsNothing(FoundWords(looper - 1)) = False Then @@ -617,7 +611,7 @@ Module Module1 Max = 0 'because we are in the "else" part of the if statement which means that the user inputted no number or 1 WordChoice = 0 End If 'end of one word scrapping and all scrapping _______________________________________________________________________________________________________________________ - Console.WriteLine("Building information...") + If WordChoice = 0 Then WordChoice = 1 End If @@ -629,6 +623,8 @@ Module Module1 SelectedDefinition(Add - 1) = SelectedDefinition(Add - 1).Replace(""", QUOTE) & Add Next + + Dim StartingHTML As Integer StartingHTML = HTML.IndexOf(ActualSearchWord) HTMLTemp = Mid(HTML, StartingHTML) @@ -642,7 +638,7 @@ Module Module1 End If Dim FullWordType As String = TypeSnip Dim TypeSnipEnd As Integer = TypeSnip.IndexOf(",") 'This is to check if there is more than one word type - + Console.Clear() @@ -745,8 +741,6 @@ Module Module1 End If NumberCheckT = NumberCheckT.Replace(" ", "") - Console.Clear() - If NumberCheckT = NumberCheckD Then If Definition < DefG1 + 1 Then If Definition <> 0 Then @@ -1360,6 +1354,7 @@ Module Module1 Console.WriteLine("Copied " & QUOTE & KanjisLine & QUOTE & " to clipboard") Console.ReadLine() + ElseIf LastRequest.ToLower = "anki" Or LastRequest.ToLower = "copy anki" Or Anki = True Then If FoundTypes.IndexOf("!") = FoundTypes.Length Then FoundTypes = Left(FoundTypes, FoundTypes.Length - 1) @@ -1406,8 +1401,12 @@ Module Module1 If NumberCheckT = NumberCheckD Then + If Definition <> 0 Then + AnkiCopy = vbCrLf & AnkiCopy + End If + If Definition < 10 Then - AnkiCopy = AnkiCopy & (Left(AnkiString(Type), AnkiString(Type).Length - NumberCheckT.Length)) + AnkiCopy = AnkiCopy & (Left(AnkiString(Type), AnkiString(Type).Length - NumberCheckT.Length)) & vbCrLf ElseIf Definition > 9 And AnkiString(Type).IndexOf("aux") <> -1 Or Definition > 9 And AnkiString(Type).IndexOf("irr") Then AnkiCopy = AnkiCopy & vbCrLf & (Left(AnkiString(Type), AnkiString(Type).Length - NumberCheckT.Length)) @@ -1422,9 +1421,9 @@ Module Module1 AnkiCopy = AnkiCopy & vbCrLf - AnkiCopy = AnkiCopy & Definition + 1 & ". " & Left(SelectedDefinition(Definition), SelectedDefinition(Definition).Length - NumberCheckD.Length).Replace(BArea, "") & BArea + AnkiCopy = vbCrLf & AnkiCopy & Definition + 1 & ". " & Left(SelectedDefinition(Definition), SelectedDefinition(Definition).Length - NumberCheckD.Length).Replace(BArea, "") & BArea Else - AnkiCopy = AnkiCopy & vbCrLf & Definition + 1 & ". " & Left(SelectedDefinition(Definition), SelectedDefinition(Definition).Length - NumberCheckD.Length).Replace(BArea, "") + AnkiCopy = vbCrLf & AnkiCopy & Definition + 1 & ". " & Left(SelectedDefinition(Definition), SelectedDefinition(Definition).Length - NumberCheckD.Length).Replace(BArea, "") End If End If @@ -1449,7 +1448,7 @@ Module Module1 If BArea.IndexOf("kana") = -1 Then If Definition <> 0 Then - 'AnkiCopy = AnkiCopy & vbCrLf + AnkiCopy = AnkiCopy & vbCrLf End If AnkiCopy = AnkiCopy & vbCrLf & Definition + 1 & ". " & Left(SelectedDefinition(Definition), SelectedDefinition(Definition).Length - NumberCheckD.Length).Replace(BArea, "") & BArea Else