Skip to content

Added C# and AutoHotkey examples for controller client DLL#7010

Closed
DojoMike wants to merge 2 commits into
nvaccess:masterfrom
DojoMike:master
Closed

Added C# and AutoHotkey examples for controller client DLL#7010
DojoMike wants to merge 2 commits into
nvaccess:masterfrom
DojoMike:master

Conversation

@DojoMike

@DojoMike DojoMike commented Mar 24, 2017

Copy link
Copy Markdown

Hey there,
First off, let me just say you guys are awesome!! I really appreciate your hard work to make NVDA as amazing as it is. Thank you very much!

Anyway, I'm new to contributing on GitHub, so please don't hesitate to correct me if I'm way out in left field someplace, but it's my understanding that pull requests are the way to go. This pull request provides 2 more examples of how to use the NVDA controller client DLL; the languages are C# ("c sharp") and AutoHotKey. The AutoHotKey example is similar to the other examples, and the C# is a complete wrapper class for the DLL (since C# uses classes for everything).

@feerrenrut feerrenrut self-requested a review April 10, 2017 08:16
@feerrenrut

Copy link
Copy Markdown
Contributor

@DojoMike Thanks for the contribution. If you haven't done so already, please take a look at the developer guide and the contributor guide.

@feerrenrut feerrenrut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! I picked up a few things but nothing major.

I understand that the other example files do not have copyright headers, but please add the following to your two new files, replacing <FILENAME.EXT> with the filename and <YOUR NAME> with your name.

#<FILENAME.EXT>
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2007-2017 NV Access Limited, <YOUR NAME>
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.

Thanks!

Comment thread extras/controllerClient/x86/example_autohotkey.ahk
/// Tells NVDA to speak a string of text
/// </summary>
/// <param name="text">The text to speak</param>
/// <param name="interrupt">If true, NVDA will stop whatever it's saying at th emoment and immediately speak the string</param>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: "th" needs an e to be "the"

}

/// <summary>
/// Tells NVDA to braille a string of text (UNTESTED)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is labelled as untested because you do not have a braille display? To test braille output consider: https://github.com/nvaccess/nvda/wiki/Testing-braille-output-without-a-braille-display

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this great link! I don't read Braille well enough to invest in a custom device, but this should help me put the examples through some additional testing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, let me know when you are happy with this and we can incubate the changes (which is the process of merging your changes into the next branch for a period of 2 weeks to allow testing from a wider audience before merging to master)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DojoMike did you test this? If you are happy with it, please remove the (UNTESTED) comment and we can progress this issue. Thanks!

/// Tells NVDA to braille a string of text (UNTESTED)
/// </summary>
/// <param name="text">The text to braille</param>
/// <param name="interrupt">If true, NVDA will stop whatever it's brailling at th emoment and immediately braille the string</param>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: The "e" from "the" is on the "emoment"

@jcsteh

jcsteh commented Apr 12, 2017 via email

Copy link
Copy Markdown
Contributor

@DojoMike

Copy link
Copy Markdown
Author

Hey there,

Sorry for the late response. I will be out of town this weekend, but will read the guides (thank for those btw) and make the requested changes as soon as possible. Thanks!

}

/// <summary>
/// Tells NVDA to braille a string of text (UNTESTED)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DojoMike did you test this? If you are happy with it, please remove the (UNTESTED) comment and we can progress this issue. Thanks!

@derekriemer

Copy link
Copy Markdown
Collaborator

I'm about to embark on a project with school and I need the controller client from c# for this (it's for an a11y class actually and we're prototyping some pretty neat things, more info on that later). I'm happy to provide you with a test of the braille code if you want.

@DojoMike

Copy link
Copy Markdown
Author

@derekriemer Yes, please do test this! Things kinda went sideways with my workload and I almost forgot all about this. But fans of the DLL (like myself lol) should definitely have access to the examples. Thanks!

PS: Just out of curiosity, where is the source code for the DLL itself? Someday when I've studied up on all the guides I still have to read, and have a better understanding of how it all works under the hood, I'd like to see if I can contribute to that too. :)

@feerrenrut

Copy link
Copy Markdown
Contributor

@DojoMike In anticipation of derekriemer's testing, could you please remove the "untested" comment? As for the source code of the DLL, I believe this is implemented in python, within source/NVDAHelper.py.

@DojoMike

Copy link
Copy Markdown
Author

Okay, so... noobie question here... how I get my repo caught up with all the latest changes since I last worked on this? Sorry, this is suuuuper new territory for me, cuz I have a repo on my desktop that has a remote (here on github) which has another remote (NVDA) so it's a bit more convoluted than a simple "git pull", especially since github has a completely different UI from Git GUI (or even Git Bash). I've Googled around for a bit but mostly found unrelated forum posts. At this point the best strategy I can dream up is:

  1. Copy my existing code to text files
  2. Delete this repo
  3. Create a new fork
  4. Make my changes to the updated repo
  5. Re-submit the pull request? lol idk... so sorry about all this
    Or, much easier:
  6. You guys copy my code and do with it what you will. I don't even care if it has my screen name on it; it's the contribution to NVDA that matters most IMO. :)

PS: DLLs in Python? How is that even possible? I've written DLLs in C, C++, and C#, and I know there's a ".pyd" file (conceptually similar to a DLL but not the same thing). Anyway thanks for hangin' in there with me.

@derekriemer

Copy link
Copy Markdown
Collaborator

The code @feerrenrut is seeing is a callback in NVDAHelper.dll (or one of the helper dll's. I think it uses rpc under the hood, although I don't know where the controller source lives.

@derekriemer

derekriemer commented Apr 20, 2018

Copy link
Copy Markdown
Collaborator

For git, you need to do the following.
Assume you have two remotes, one called nvaccess and origin. nvaccess points at the nvaccess repo and origin is your branch.

git checkout master 
git fetch nvaccess
git merge nvaccess/master
or, instead of those two steps, do this.
git pull nvaccess master
git checkout <your topic branch>
git merge master
//make changes
git add source/foo source/bar source/baz
git commit -m "blah blah blah blah blah"
git push -u origin <branch name> #only need -u once, to set the topic branches upstream remote to origin.

Now in future, git push suffices.
Be careful, I've done a git push origin master on several occasions. It will protect you unless you do a force push (don't do that).

@ehollig

ehollig commented Oct 3, 2018

Copy link
Copy Markdown
Contributor

Any progress on this PR @DojoMike or do you need any assistance?

@Adriani90

Copy link
Copy Markdown
Collaborator

@DojoMike do you have any update on this?

@LeonarddeR

Copy link
Copy Markdown
Collaborator

@DojoMike: This is a last heads up to kindly ask you whether you're intending to finish your work on this. If not, I'm afraid we have to close this. Having said that, happy for anyone who wants to take this.

@Adriani90

Copy link
Copy Markdown
Collaborator

cc: @abdel792, @DataTriny, @dglee42, @codeofdusk maybe anyone of you could be interested in taking this over?

@abdel792

Copy link
Copy Markdown
Contributor

Hi @DojoMike,

I join Reef in thanking you for this interesting contribution.

I hope it will be added soon.

Kind regards.

@DataTriny

DataTriny commented May 16, 2019 via email

Copy link
Copy Markdown
Contributor

@DataTriny

Copy link
Copy Markdown
Contributor

Hello everyone,
As I promissed, I worked on the C# example and just submitted #9600.

@feerrenrut feerrenrut closed this May 21, 2019
@Adriani90

Copy link
Copy Markdown
Collaborator

@feerrenrut you closed this one, as far as I understand there are also AutoHotkey examples for controller client to be added. It this not intended? PR #9600 adds the C# examples which is one part of this work. @DataTriny many thanks for your work.

@feerrenrut

Copy link
Copy Markdown
Contributor

@Adriani90 That is true, but we seem to have lost contact with the author of this, and we don't have access to push to this branch (and thus rectify this PR). I can't see any point in keeping a PR open that we can not merge. Anyone who is willing to create a new PR for the autoHotKey examples is welcome to do so.

@DataTriny

Copy link
Copy Markdown
Contributor

You're welcome @Adriani90.
Just to clarify: I wont work on the AutoHotkey example because I am not familiar with it, and don't have the time to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants