' AVCS CORE System Inline-Function for VoiceAttack - Load AVCS Profile Names List Variables for Get Choice Box
' by SemlerPDX Aug2020
' VETERANS-GAMING.COM
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Data
Imports System.Drawing
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.Linq
Imports System.Xml.Linq
Imports System.Threading.Tasks
Public Class VAInline
dim profile as string = ""
dim usersProfile as string = ""
dim coreProfile as string = ""
dim profileList as string = ""
dim usersList as string = ""
dim contents() as string
dim entry() as string
Public Sub Main()
if ((VA.GetText("~avcs_core_profile")) IsNot nothing)
coreProfile = VA.GetText("~avcs_core_profile")
end if
if ((VA.GetText("~avcs_profiles_list")) IsNot nothing)
'Split contents of profiles list into array separated by the newline
contents = VA.GetText("~avcs_profiles_list").Split(new string() {Environment.NewLine},StringSplitOptions.None)
for each line as string in contents
if (not(line = ""))
'In each line, isolate Var Name/Val via '=' and format string for Get Choice Box
entry = line.Split("=")
if ((entry) IsNot nothing)
if (not(((entry(0).StartsWith("AVCS_PROFILE_AVCSCORE")) and (not(entry(1).Contains(coreProfile))))))
profileList = entry(1) + ";" + profileList
end if
end if
end if
next 'loop around to the next line in the profiles list
for profileIndex as integer = 0 to 10
if ((vaProxy.Utility.ParseTokens("{PROFILE:" + profileIndex.ToString() + "}")) IsNot nothing)
usersProfile = vaProxy.Utility.ParseTokens("{PROFILE:" + profileIndex.ToString() + "}")
if (not(usersProfile = ""))
if (not(usersProfile.StartsWith("AVCS")))
usersList = usersProfile + ";" + usersList
end if
end if
end if
next
VA.SetText("~avcs_profiles_list", profileList)
VA.SetText("~avcs_user_profiles_list", usersList)
end if
End Sub
End Class
Comments
0 B
|0 👍
/0 👎
0 B
|👍
/👎