Program that knows what elements you click on website - programming-languages

I'm trying to create a program where i can select the input boxes on website and list them into a listbox. i can use the C and delphi language but neither of them i can do this. I'm not trying to make a whole new browser, but just want to be able to do this. In a way it is like, when google chrome puts an orange box around the input boxes. it recognizes that it is a box you can type in. How do i recognize with a program what text box i have selected with my mouse? thx :)

You should look into GreaseMonkey for firefox. It allows you to run custom javascript on web sites, allowing you to transform pretty much whatever you want on the page.
https://addons.mozilla.org/en-US/firefox/addon/748/

Related

Swiftui popup when clicking text

I just started learning swiftui and im trying to figure out how to recreate the following popup when clicking on a word:
What i want to recreate is the ability to have this sort of popup directly under or above the specific word, whenever clicking on it.
How is this functionality called in swiftui? Now my best guess is that it uses a Menu which calls a function when clicking on it, that then displays popup, which is customized to make it look like it does now. Is that correct?
If not, can you point me to the right documentation or names of this functionality.

How to save text direction default in web sites?

I wonder if there a way to save text direction default- right to left (RTL) or vise versa (left to right-LTR) in different web pages. So when i open specific web site the text direction will be automatically LTR or RTL. I use google chrome so i tried to search in the properties and didn't find any option to save text direction default. I red change text direction of textbox automatically and How can I automatically set text direction based on input text language? and other questions and search in my windows xp Language preference but didn't find what i'm looking for.
Thanks in advance for any help.
UPDATE:
I'm using a program called "Lang Over 5" that changed text orientation using "F10" button. But i can't save default text orientation in web sites with it.
It likely cannot be done for different webpages/sites unless someone has created an add-on module that I'm unaware of. Here are two options that you can do, however:
1) Use two different browsers, set each to the proper language settings that you want.
2) If you are set on using Chrome for both, you may be able to run multiple instances as is shown here: http://blog.buddywork.com/post/15839021578/how-to-run-multiple-instances-of-chrome

How to create a user-impaired accessible website: surfing without a mouse?

I have created a webpage using Backbone.js and Marionette.js that mostly consists of a bootstrap accordion view that displays a list of items when the accordion header is clicked. Each item can also be clicked, which will show a hidden div of detailed information that pertains to that particular item.
I would like to make this site accessible to people who might not be using a mouse (Maybe they're visually impaired and using a screen reader? Maybe they just don't like clicking things? Either way.) I'm thinking that this would mean being able to press the Tab key to get to the accordion, pressing Space or Enter to open the accordion, Tabbing down (or down arrow key?) through the list items, and then using Space or Enter to show the selected item's hidden div.
I'm finding it difficult to find information on how to add a feature like this, since searches like "How to make an accessible website that can be used without a mouse" mostly turns up blogs on what a developer should do to add accessibility to a page, and not much on how to do it.
Currently, the page doesn't really respond to any keyboard buttons. Any tips or resources you could share would be extremely appreciated. I've been fiddling with ARIA role tags, but I'm either not doing it right or it's not the answer here.
You have to use tabindex
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement.tabIndex
Screen readers automatically read whatever element is the activeElement

How can I add a button at the end of a listView?

Iwould like to add a button at the end of a listView in the same way as the bing apps do (see picture for example).
I looked for hours in google and in the microsoft documentation but canøt find anything that can give me an idea of how to do this.
Did anyone achieved this?
thanks
If you run that app (Health & Fitness), then run Visual Studio and use Debug > Attach to Process, you can open the DOM Explorer and examine how that UI is implemented.
What you'll see in this case is that it's not using a ListView at all, but rather it's own custom control that's just based on a CSS grid. That is, just because there's a grid-like view doesn't mean it's a ListView. You can always use straight HTML/CSS layout to achieve these sorts of things, which is all that's happening here. As such, it just makes separate div's for those two "More" elements.
Now if you do want to use a ListView, there are a few things you can do. First of all, if you want to render any item in a ListView differently than others, you have to make sure to use a different template. What this means is that you use an item rendering function rather than a declarative template, which then enables you to examine the item data and programmatically decide what kind of rendering to perform.
Second, if you want to have items of different sizes, then you need to use cell spanning. In Windows 8.0/WinJS 1.0 this is a property of the GridLayout. In Windows 8.1/WinJS 2.0 you instead use the CellSpanningLayout.
I have all the details for both rending functions and cell spanning written up in Chapter 7 of my second edition preview of Programming Windows Store Apps with HTML, CSS, and JavaScript, which is a free ebook from Microsoft Press so it doesn't cost you anything. :)

System wide right click context hook

**Hello..
i am creating English To Gujarati Dictionary WinForm Application.
I need to set a system wide hook to the right click context menu on for text selection.
it means when this application is running,and if user selects word from any program and right click on it gujarati meaning of that word should be displayed as menu item.
How to do this?
or any other options like Registery Programming,shell extentions etc...?
i have to do this,even if you say its not possible.
so please help me.**
Hooking the mouse activity is the easy part. See SetWindowsHookEx, and lots of questions regarding hooking in SO. This way, you can tell when the mouse is right-clicked.
Getting the selected text is the harder part. See WindowFromPoint, for starters. You'd have to recognize the control, and if appropriate get the selected text from it. This will not always be possible using simple Win32 functions, if the control is complex.
Adding the translation to the right-click menu is probably the impossible part. Adding stuff to explorer context menu is not a problem, because explorer provides that possibility. But various applications will have various right-click menus, without a way to extend them. They might not even use Win32 for the menus, for whatever reason. A better option, IMO, would be one of the following:
Forget about changing the right-click menu. Open a window next to the point of selection with whatever content you want, and let the application show its own right-click menu.
If the user right-clicks while, say, pressing shift, show your own right-click menu, and don't pass the message to the application. So the user will see only one menu, which is yours. The user must of course be aware of this combination.

Resources