Author Topic: tracking keystroks  (Read 847 times)

Incurable-Rash

  • Full Member
  • ***
  • Posts: 181
tracking keystroks
« on: August 23, 2020, 12:34:22 PM »
what is the best way to track the keystrokes to a certain point in a panel a when I close it have it return to its starting point

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: tracking keystroks
« Reply #1 on: August 23, 2020, 03:28:07 PM »
The most reliable built-in method for detecting keystrokes should be to map them to a command using "When I press keys".

If you want to keep track of a position in a menu, you'll have to map out all the branches, and set up a system to traverse them.

The simplest way to set up such a system would probably be to manually map it out using conditions, E.G. when the current position is X, and the key corresponding to down is pressed, change the position to location Y instead.

E.G. the command mapped to the "down" key, could look like
Code: [Select]
Begin Text Compare : [menuPosition] Equals 'menuItem1'
    Set text [menuPosition] to 'menuItem2'
Else If Text Compare : [menuPosition] Equals 'menuItem2'
    Set text [menuPosition] to 'menuItem3'
Else If Text Compare : [menuPosition] Equals 'menuItem3'
    Set text [menuPosition] to 'menuItem1'
End Condition
assuming wraparound scrolling, where pressing down on the last menu item goes back up to the first item.

Incurable-Rash

  • Full Member
  • ***
  • Posts: 181
Re: tracking keystroks
« Reply #2 on: August 25, 2020, 07:49:08 PM »
Thanks I will give it a shot. Am I correct to assume that if the panel does not wrap around for all tabs, I will have to come up with a back spacing version? One panel has 4 tabs tabs but one is not used unless a target ship is locked onto, otherwise it wraps on only 3 tabs

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: tracking keystroks
« Reply #3 on: August 25, 2020, 09:35:55 PM »
If the menu structure changes based on ingame states, you'd need a way to actually check the current ingame state (E.G. EDDI does have a "Ship targeted" event), otherwise you can't keep your local menu structure synchronized with the ingame menu structure.

Incurable-Rash

  • Full Member
  • ***
  • Posts: 181
Re: tracking keystroks
« Reply #4 on: August 26, 2020, 06:08:18 PM »
No matter what I am looking for VA to tell me or keep track of it relies on a third party program to get that information, which has cause me problems in the past. I think I need to go back to trying to figure out how to create an inline or some such program to get the information out of the current journals that the game creates instead of asking another third party program to do it. I am loaded down with such programs, to do pieces of what I am looking for, such as AHK. Will I get a wider field of helpful information about doing that in VA discord channel or am I on my own so to speak?

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: tracking keystroks
« Reply #5 on: August 26, 2020, 09:49:20 PM »
You can certainly try Discord - you'll run into folks with varying degrees of experience (it just depends on who is around at the time).