NVDA Addon assistance

SO, I've been following along with the NVDA Developer guide, and I'm currently working on the NVDA plus S to read the line number, although I changed it to NVDA shift S to avoid conflicts.
Well, here's my problem. Here's the function...
    @script(gesture="kb:NVDA+shift+s")
    def script_sayLineNumber(self, gesture):
        # Suppose line number is in the form "  ln 1".
        lineNumList = api.getStatusBar().name.split()
        lineNum = lineNumList[2] + lineNumList[3]
        ui.message(lineNumList)
Alright, now, the problem. When pressing the keystroke, I get
Traceback (most recent call last):
  File "scriptHandler.pyc", line 208, in executeScript
  File "C:\Users\tgill\AppData\Roaming\nvda\addons\notepad_beeper\appModules\notepad.py", line 28, in script_sayLineNumber
    lineNum = lineNumList[2] + lineNumList[3]
IndexError: list index out of range
And when having NVDA output what it is finding, the only thing I get is "Status bar", not the information on it. Any tips, tricks etc etc?

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Ty via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : stewie via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : stewie via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : nidza07 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ty via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ty via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : nidza07 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Simter via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ty via Audiogames-reflector

Reply via email to