No, in that case I think the number is negative if the left most bit is 1. and there's no good way to do this in jaws script because unlike c++ you can't access the individual bits.
Marlon Brandão de Sousa wrote:
Hello, Thanks for this explanation! You are the first to show me something I really understand instead of providing tons of strange teories and graphical ilustrations to explain how to do things when it comes to bite math. I, however, still have a problem: unfortunately, accordingly with what I read in the documentation, the highword isn't a constant telling scroll up or down, it is instead something referred as delta, which isn't still fully understood by me. This thing called delta, I have good reazons to beleave, will point howmuch of the mouse wheel is rolled up or down. So, let's say, if I scroll up the wheel a lot then the delta value is bigger, if I scroll up the wheel only a little bite then the value is a small number. But the problem is the following: What will define if the wheel was scrolled up or down is the sign of the delta value, if delta is negative then the wheel was scrolled down, if positive then it was scrolled up. So I'll need to build the number using a highword which can be positive or negative. Do your instructions still apply in case of a highword is negative? Marlon 2008/2/7, Jared Stofflett <stofflet@xxxxxxx>:Do you know how to convert from decimal to hex? If not I'm sure you can find programs to do it, I use matlab simply to save time. I'm using hex instead of binary simply because it's much more readable. As far as I know jaws script doesn't offer any binary operations so your quite limited but I'll do my best. Also this example assumes that an integer is 32 bits but I'm not sure what length it is in jaws script. It looks like you'll only need to pass in two decimals either weel up or weel down and not need to change the flags. Lets assume that having all 0's in the low word will work for your flags so the entire low word will be 0. Lets also assume that mouse up is 16 and mouse down is 327. Then you only need two integers. We know that in hex the high word is the first two places and the low word is the last two. In hex 16=f so your high word would be 000f to give us a total of 16 bits. Your low word would be 0000 for another 16 bits which equal 0. So convert the hex number 000f0000 to decimal and you get 983040 so your integer to represent mouse up would be 983040 Lets do the same for mouse down, accept our high word needs to contain 327 so 327 in hex is 147 We only have three hex digits but need 4 to fill out the word so our high word will be 0147 the low word is 0000 that means to represent a mouse down you need the decimal version of 01470000 which is 21430272 If you need different values for the low word because you need certain flags just repeat the process I illistrated for the high word on the low word as well and convert that 8 digit hex number to decimal. This process should work for either jaws script or c/c++ but make sure your data type is 32 bits long. If you have any other questions feel free to ask. Marlon Brandão de Sousa wrote:Hello, I am cross sending this message because it is related to jaws scripting and to programming. First of all, I don't use my mouse a lot. I, however, like to issue a ls command in cygwin or a dir command on dos prompt and use the mouse wheel to listen automatically to the file names jaws will read when the screen scrolls. But, for now, my mouse won't be available, so I am building a jaws script to move the mouse wheel, without a mouse!! First of all I built a script using the function findGraphic(getAppMainWindow(getFocus()), "scroll up symbol", s_top, s_unrestricted), followed by a leftMouseBotton() function call, and it works nicely to find the scroll up symbol and click it. I, however, want to really simulate a mouse wheel and not do a graphic clicker script. I looked the header file winuser.h, and found that the wm_mouseWheel message is 522 decimal. Looking the message documentation, I discovered that the highword of wParam should indicate if the wheel is gtoing up or down, and the lowWord will contain mouse flags. The problem is that, at the moment, I don't know how to build the decimal number I will need to send as the wParam. How can I build a decimal with a given number in the highword of the byte? Thanks Marlon__________ View the list's information and change your settings at //www.freelists.org/list/programmingblind
__________View the list's information and change your settings at //www.freelists.org/list/programmingblind