In the hotSpot creation wizards, you are often asked to remove dynamic information
from various strings that are obtained from the application. Typically,
these are used as window names, or object names, when HSC attempts to
insure that it is clicking in the correct location. It is therefore quite
important to edit these strings to remove information that will change over time.
This is covered pretty well in the main documentation. Clearly, a document name
is one such example. For example, if the window name is:
Untitled - Notepad
you would not want to use that as a window name, unless you only wanted your spot to work when notepad is opened with a blank, default document. If you used notepad to open a specific file, like MyText.txt, then the window name will change to:
MyText.txt - notepad.
To have the spot work for all documents, the string, when offered in the wizard, should be edited down to simply:
totally removing the filename. HSC would then change its strategy to not require an exact match, but to simply require that any window title it finds must contain the string "- Notepad" as a part of the name. Or, if you blank the string entirely, HSC will conclude that no match is required at all, and will accept anything for that field.
However, a less obvious example is where an application version number is part of the window title. You may, or may not, wish to include that. But, the key is to be conscious of what will change, and what will not.
In some cases, the string obtained by the wizard is so long, that it can even impair the ability of JAWS to speak the prompt, which instructs you to remove the dynamic information. If you find yourself in the wizard, but focused in an edit box with a bunch of text that seems like it may have come from your application, then you are probably at a dynamic information removal step. And, it is now important to consider the string offered, and do this editing.
Again, because some strings are quite long, depending on your application, the operation of the edit box can be confusing. This is outside the control of HSC. Some versions of JAWS behave quite oddly when the edit box is populated with more text than will fit on screen. Just pressing control+shift+end, followed by delete, may or may not be enough to entirely blank the string. Be more assertive with the home and end keys to make sure you have seen the entire string, before dismissing it.
If you have defined a spot incorrectly, and wish to repair it manually, you can actually edit the .hsc file with a text editor, and correct relevant fields. Typically, these are the windowname, application window name, topLevelWindow name, and object name. If you are deleting characters from any of these strings, HSC can no longer look for exactequality, but needs to just require that the string it finds contains the characters listed in your .hsc file, as a subset. To make HSC realize that, you need to put a caret "^" just to the right of the equal sign.
To allow HSC to accept any title, no matter what, delete all characters to the right of the equal sign, and replace with an asterisk "*".
To require that the title must be blank, replace all characters with a dollar sign "$".
Usually, HSC will not say "hotSpot failed". It will happily perform the requested action, just at the wrong place. Usually, unexpected actions will result, or nothing at all will happen.
The problem usually derives from the fact that the hotSpot is basing it's position reference on the wrong reference item. By default, HSC uses the top left corner of a window as it's positioning reference. This means that the windowColumn and WindowRow attributes of the spot are actually distances in pixels from that top left corner. But, as the window is resized, minimized, or maximized, it is stretched, and the distances between items inside the window can change. In cases like that, it might be necessary to use a different corner as the reference. Or, perhaps, you can instruct the hotSpot to search for an item, such as a string of text, a graphic name, or pixel of a certain color first, and then to move x pixels in some direction from there to find the actual click location.
You can use HSC mods f2 to just move the jaws cursor to the spot location without performing the action.
If you like, bookmark the location with alt+shift plus numPad home. Now, mouse around and find the proper location.
You can use Adjust HotSpot Location, in the actions menu, to correct the spot for now.
But, the problem will reoccur until it's root cause it understood.
The key question to be answered is:
what item, that jaws can find, is a constant distance from the location you want to click?
If it's a different corner of the same window, you can use the definition editor to alter the item called ReferenceCorner. Remember, hold down the hsc mods, and press f11 or f12, then release all keys to change, and hear the meaning of, numeric fields like that.
In some cases, it might mean that you have specified the incorrect positioning method when you created the spot. Application relative is the most commonly used. But, sometimes, the location you want is actually inside some child window. As the child window moves, so to does the location of interest. But, if your hotSpot is always relative to the application at large, it does not track the movements of the child window. Current Window Relative positioning may work in a case like that.
When you define the spot initially, specifying current window relative positioning, HSC will perform a test, to see if the window can be uniquely located. If there are other windows with the same identifying information, then identification is ambiguous, and HSC will tell you that. Cases have been seen where, for some reason, HSC gets it wrong, and thinks the window is not unique, when it actually is. So, it's worth a screen refresh, and a retry. But, if the same error is reported, then current window relative is not an option.
TopLevel positioning is typically good for spots inside a dialog. But again, experimentation may be the only way to find what is best.
To change the positioning method, the best way is to just delete the spot, and redefine it from scratch.
Put the Jaws cursor on the reference graphic or text, and use the hsc mods plus g advanced wizard to define the spot.
Tell it to search near bye for that item. Now, the spot will track along as the reference item moves.
Then, use the hsc mods plus numPad home and end to set a reference on the hotspot location. then, move the jaws cursor to the spot you actually want to click, and use hsc mods plus NumPad end to find out how far that location is from the reference. All that remains, is to use the definition editor to set the horizontal and vertical text offset items to the distance numbers you learned with the mouse exploration keys.
this makes HSC search for the reference item, and then move a fixed distance to the actuall spot.