In IDA's Graph View, when we select some register (for example, esp in the image below), every location that the register occurs is highlighted.Is it possible to read what the selected operand is? (I want to work with registers at the moment, but it would be nice to be able to know any selected value).I am able to get the address of the instruction using idaapi.get_screen_ea(), but am unable to proceed further.
IDA Python - Find highlighted register
idapython
You can use idaapi.get_highlighted_identifier()This function returns highlighted text. All the IDAPython reference can be found at here, at Hex-Rays site