[jawsscripts] Re: urgent if possible please how2make inputBox info feed in2findString?
- From: "Donald Marang" <donald.marang@xxxxxxxxx>
- To: <jawsscripts@xxxxxxxxxxxxx>
- Date: Mon, 25 May 2009 09:02:33 -0400
As a quick response and expansion of the last response, look at the
following:
Script MultiScreenFind ()
var
handle hwnd,
int iSafety,
int iWhichScreen,
String sFindThis
If InputBox ("find what?", "Find", sFindThis) Then
; then user types their data into box and hit enter, and I then want to
feed
this data into findString, and for jaws cursor to be located on it, then
carry out other things:
FindString (hwnd, sFindThis, s_top,
s_unrestricted")
; Avtualy the Find statement should be the condition of another If statement
to handle the "not found" condition
Else
; nothing entered in InputBox
EndIf
I entered this directly entered this in mail, so it is not tested. I just
thought an example of passing this variable by reference in an If statement
would help. Passing a variable by reference allows the function to change
the variable and return the variable. Normal parameters are local to the
function and cannot return the value. Technically, this means that a
pointer to the value is passed to the function rather than the actual value.
Don Marang
----- Original Message -----
From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Tuesday, May 26, 2009 8:09 AM
Subject: [jawsscripts] urgent if possible please how2make inputBox info feed
in2findString?
> oh mighty scripters.
>
> I'm writing kinda fast as I've been trying to configure my email client
> before ausi bed times for the last hour or so from being away and using
> someone else's server etc. and I think I've got it now. But, I really am
> stumped on such a simple thing, but I can't figure this out! all I wish to
> do, is make the inputBox that people pointed me to on this list, feed the
> input the user types in, back into a findString function, such that I can
> execute this code I've been rabbiting on about over the past few weeks,
> but
> now it's really really crunch time for me to get it in or it's never gunna
> happen! and the supervisor's think that it really would be helpful for
> efficiency for this vision impaired client on this job, if I could do what
> I'd like to do. bottom line is, I just want to be able to solicit input
> from the user for what they're looking for, and make that input
> dynamically
> feed into the findString findString function!
>
> But, although I've read the fsdn on it, I just can't for the life of me
> work
> out how to do this!
>
> as you'll all know, the fsdn help on inputBox says:
>
>
> 'If you enter text into the Edit box and press the OK button, the text you
> typed in the Edit box is returned to the calling function by way of the
> third variable of the function, which is a string variable that is passed
> by
> reference to the calling function.'
>
> then a little lower down in the param descriptions, it says:
>
> 'Param 3:
> Type: String
> Description: This parameter is passed to the calling funcction or script
> by
> reference. If you type text in the Edit box and press the OK button, this
> parameter returns the text that you typed to JFW. If you do not enter text
> into the Edit box or you press the Cancel button, this parameter contains
> a
> NULL string,
> Include: Required
> * Returns data by reference.'
>
>
>
>
>
> ok so I then tried to figure out, how to make the findString function,
> somehow call, whatever that exactly means, this inputBox function, by
> putting the whole inputBox function thing as the second parameter of the
> FindString function. but then it complained the second param of findString
> should be of type string not int. and then you see, it claims the whole
> inputBox actually, returns, again whatever that exactly means, an int
> value,
> of 0 if user hits cancel, and 1 if they hit ok! which I presume is why
> findString is complaining about it returning the wrong kind of data! but
> it
> just got through telling me, that it returned the input user string, to
> the
> "calling function!" so man i'm confused! again!
>
>
>
> telline mt thatbeing
>
> So, I just don't get this whole, "by reference," thing above!
>
>
>
> If I just type code like the following:
>
>
>
> Script MultiScreenFind ()
>
>
>
> var
>
> handle hwnd,
>
> int iSafety,
>
> int iWhichScreen
>
>
>
> InputBox ("find what?", "Find", "")
>
> ; then user types their data into box and hit enter, and I then want to
> feed
> this data into findString, and for jaws cursor to be located on it, then
> carry out other things:
>
> FindString (hwnd, "Here's where user input data has to go but how?",
> s_top,
> s_unrestricted")
>
>
>
> any tips so greatly appreciated! I"m sorry I'm just so pathetically lame
> at
> this!
>
>
>
> geoff c.
>
>
>
>
>
>
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
__________
Visit and contribute to The JAWS Script Repository http://jawsscripts.com
View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts
Other related posts: