you select the player you want to play. There is a search box where you can search from the big list of players to choose, and there is a
Lock In button to confirm your select.
I've made groups for each "role" in that game and put each player in there.
Dim tank As New List(Of String) Dim adc As New List(Of String) Dim jungle As New List(Of String) Dim support As New List(Of String) Dim apmid As New List(Of String)
I've also added each player to each group.
adc.AddRange({"ashe", "caitlyn", "corki", "draven", "ezreal", "graves", "kog'maw", "miss fortune", "sivir", "tristana", "twitch", "varus", "vayne"})
tank.AddRange({"alistar", "amumu", "leona", "nautilus", "rammus", "sejuani", "shen", "taric", "volibear"})
apmid.AddRange({"ahri", "anivia", "annie", "brand", "cassiopeia", "diana", "fiddlesticks", "heimerdinger", "karthus", "kassadin", "kennen", "leblanc", "lux", "malzahar", "morgana", "orianna", "rumble", "ryze", "swain", "syndra", "veigar", "viktor", "vlad", "xerath", "ziggs", "zilean", "zyra"})
jungle.AddRange({"hecarim", "skarner", "evelynn"})
support.AddRange({"janna", "karma", "lulu", "sona", "soraka", "taric"})
Now I have "Select Case strText" which detects what the user said (I've added each player's name to the
Speech Dictionairy, strText = the recognized text, what the uesr said).
Case adc.ToString
Dim selectedChampion As String = strText
SetCursorPos(1063, 186) 'Search box.
wait(100)
mouse_event(MOUSEEVENTF_LEFTDOWN, 1063, 186, 0, 0)
mouse_event(MOUSEEVENTF_LEFTDOWN, 1063, 186, 0, 0)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
SendKeys.Send(selectedChampion)
wait(200)
SetCursorPos(481, 250) 'Selects the champion.
wait(200)
mouse_event(MOUSEEVENTF_LEFTDOWN, 481, 250, 0, 0)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
wait(200)
SetCursorPos(1029, 552) 'Clicks the "Lock In" button.
mouse_event(MOUSEEVENTF_LEFTDOWN, 1029, 552, 0, 0)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
My question is will that work? I can't test it right now so that's why I'm asking. I'm not sure about the
adc.toString which is supposed to recognize a player's name from the "adc" group and then do the code.
I'm also not sure about selectedChampion for hte strText.
EDIT: Also, I'm not using SendKeys.Send, that was just to show you the code. I'm using keybd_event, Just a quick question:
can I send a full word using keybd? Because with sendKeys it's possible, but with keybd I can only send one key at a time. The problem
with sendKeys is that it's not reliable and I can't use it on the game I'm trying to use it on.

New Topic/Question
This topic is locked



MultiQuote







|