Author Topic: is this possible with VA?  (Read 4743 times)

KingKoz

  • Guest
is this possible with VA?
« on: February 08, 2018, 11:06:19 AM »
I am new to VA and just learning it. I play Dungeons and Dragons Online. After logging into the game using the provided client, I am presented with a character select screen. There are buttons on the right side of the screen with the names of my characters. However, I have 19 characters. Is it possible to have VA find the button of the character I want to play then click it? I know I can use coordinates and move the cursor and click. That works great for the 1st 5 characters (shows me 5 per page) but causes issues for selecting characters on pages 2-4 because the game always starts with the last character played highlighted. So, I thought maybe there is a way to say "select character12's name" and have VA find the name by looking for the name.

I was looking at the option Mouse/Move/Move to text/token-based coordinates but don't understand how it works. The option only allows me to enter the X and Y coordinates. How do I do the first part "move to text"? I must be missing something because I can't seem to find the info on this command in the HELP documents.

Koz

iceblast

  • Sr. Member
  • ****
  • Posts: 372
Re: is this possible with VA?
« Reply #1 on: February 08, 2018, 01:22:30 PM »
To my knowledge, VA can't read the screen the way you would like it to. If the game had a data file you could read and feed it to VA to use it somehow to give you the info you need to move to that character, otherwise, I think you're out of luck.

If the characters were always static on the list, then you wouldn't have a problem. This might be something you'll have to do by hand.

KingKoz

  • Guest
Re: is this possible with VA?
« Reply #2 on: February 08, 2018, 01:52:37 PM »
Thank for the suggestion Iceblast. I got it to work using mouse move to coordinates (each page can have same coordinates) on the first page. Then I thought I would just move to the top of the scrollbar and click once (to make sure list started from the top) then I moved to the bottom of the scrollbar and clicked once to move to the next page. I did this for the other pages and this is where I had severe issues with VA. If VA had the capability to look for text and move the cursor that would solve my problem. Then it would be a matter of just saying "select charactername".

I thought the option in the Add a Mouse Action/Move to text/token-based coordinates was the way to do it but apparently not.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: is this possible with VA?
« Reply #3 on: February 08, 2018, 04:34:47 PM »
This type of feature will not be implemented, as it would be problematic in online games:
VA does not have that kind of capability natively, as that may be cause for TOS bans for some games.

Even so, OCR("Optical Character Recognition", I.E. recognizing onscreen text) is not a simple task, especially when you're not reading high contrast text on a uniform background(E.G. black text on white paper); It would likely be either too inaccurate, or too slow to use in any real-time application.

KingKoz

  • Guest
Re: is this possible with VA?
« Reply #4 on: February 08, 2018, 05:24:11 PM »
I can understand that. Can you please explain to me the option on the editor under MOUSE/Move tab Move to text/token-based coordinates? To me, it makes it sound like what I want to do but obviously it is not. I guess its the "move to text" part that is confusing me.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: is this possible with VA?
« Reply #5 on: February 08, 2018, 06:59:24 PM »
Quote from: VoiceAttackHelp.pdf page 84
Move to text / token-based coordinates
This option allows you to specify your X and Y coordinates as tokens so you can, 'programmatically' set your mouse positions.
If your X and Y tokens resolve to values that can be interpreted as integers, the position will be used. Otherwise, no movement will occur (info will be displayed in the log).
If the evaluated coordinate is outside the boundaries of the area, the boundary will still be used.
See the section on Tokens later in this document to find out what's available to you. Note: all variable types can be expressed using tokens.

The "text" part likely refers to A. Tokens always resolve to text, and B. Anything you enter into that field(including numbers), would be text(because the textbox internally returns a text/character-based datatype, rather than an actual number like the numericupdown controls the "Move to coordinates" option uses).


This feature is intended for use with advanced actions like conditions, so you can set coordinates when the command actually executes, rather than "hardcoded" into the profile.

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Re: is this possible with VA?
« Reply #6 on: February 09, 2018, 08:36:18 AM »
This may not be particularly easy, but to some extent you might be able to use onscreen pixel colors to determine what character is in a particular static slot. This inline function provides the means to detect the RGB or hexadecimal color of the pixel under the mouse and store the info. If your list of 19 characters is static (or the spots where their portraits, names, other pixel features will always appear when cycled through) then you could:
  • use VA to loop through each pixel in the slot to obtain the color data for a given character, then repeat for all the characters to collect a database of sorts of pixel mapping
  • compare a given slot against the pixel map to identify the character
Of course I don't know the TOS for your game, and having a 3rd party app read onscreen data may violate that. Ultimately you'd have to check out your TOS or contact the developer about what you want to do. Though the way I see it if you're not intercepting or manipulating internal game processes and just letting VA read a pixel's color there might not be a problem. But again, better to be safe and check it out.

Gangrel

  • Caffeine Fulled Mod
  • Global Moderator
  • Full Member
  • *****
  • Posts: 216
  • BORK FNORK BORD
Re: is this possible with VA?
« Reply #7 on: February 10, 2018, 03:05:01 AM »
I *believe* Autohotkey can do OCR, now the thing is (as Exergist has said) is how "allowed" stuff like that will be allowed by the developers.

Side note: How it would work is that you would have to have VoiceAttack act as the trigger for the AHK script (by keypress for example).

I will leave the underlaying logic up to you, but just to let you know... VA cannot do it natively, but there are ways around it.