SemlerPDX

Count Command Variations in Windows Clipboard - VoiceAttack

Aug 14th, 2020 (edited)
911
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.34 KB | None | 0 0
  1. ' Count all Dynamic Command Variations
  2. '  by SemlerPDX Mar2020
  3. '  VETERANS-GAMING.COM
  4.  
  5.  
  6. Imports Microsoft.VisualBasic
  7. Imports System
  8. Imports System.Collections
  9. Imports System.Collections.Generic
  10. Imports System.Data
  11. Imports System.Drawing
  12. Imports System.Diagnostics
  13. Imports System.Windows.Forms
  14. Imports System.Linq
  15. Imports System.Xml.Linq
  16. Imports System.Threading.Tasks
  17.  
  18. Public Class VAInline
  19.     dim phraseCount as Int32 = 0
  20.     dim phrase as string
  21.     dim phrases() as string
  22.     dim phrasesDynamic as string = ""
  23.    
  24.     Public Sub Main()
  25.        
  26.         phrasesDynamic = vaProxy.Utility.ParseTokens("{CLIP}")
  27.  
  28.         if ((not(phrasesDynamic = "")) and (not(phrasesDynamic = " ")) and (not(phrasesDynamic.Contains(vbNewLine))))
  29.             phrases = vaProxy.Utility.ExtractPhrases(phrasesDynamic, true, true)
  30.             if (phrases IsNot nothing)
  31.                 for each phrase in phrases
  32.                     if (not(phrase = ""))
  33.                         phraseCount += 1
  34.                     end if
  35.                 next
  36.             else
  37.                 VA.WriteToLog("AVCS ERROR: Unspecified Phrase extraction error at vaProxy.Utility","red")
  38.             end if
  39.         else
  40.             VA.WriteToLog("AVCS ERROR: Dynamic Command Phrase not found in Windows Clipboard","red")
  41.         end if
  42.          
  43.         if (phraseCount > 0)
  44.             VA.SetInt("~count", phraseCount.ToString())
  45.             VA.WriteToLog("VoiceAttack Dynamic Command Variations: " + phraseCount.ToString(),"yellow")
  46.         end if
  47.    
  48.     End Sub
  49. End Class
Add Comment
Please, Sign In to add comment