[jawsscripts] Re: urgent if possible please how2make inputBox info feed in2findString?
- From: Gordon.Luke@xxxxxxxxxxxxxxxx
- To: jawsscripts@xxxxxxxxxxxxx
- Date: Mon, 25 May 2009 13:55:39 +0100
Hi Geoff
Stay calm my friend and we'll get you through this.
In their simplest form byref variables are just variables that are
populated by the function themselves - not by you having to use a let
statement i.e. the function you call does all that work for you. They
enable you to get more than one piece of information back from a function
at the same time. Thus in the Input function case you don't just get back
whether the user pressed OK or Cancel but you also get what the value was
that they entered. Thus your code should be something like this:
Script MultiScreenFind ()
var
handle hwnd,
int iSafety,
int iWhichScreen,
string sFind
if InputBox ("find what?", "Find", sFind) then
; User has pressed OK
; 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, sFind, s_top, s_unrestricted)
...
endif
...
I hope this helps. Let us know how you get on. Good luck.
Gordon Luke
Capita IT (CAIM)
"Geoff Chapman"
<gch@xxxxxxxxxxxx
t.au> To
Sent by: <jawsscripts@xxxxxxxxxxxxx>
jawsscripts-bounc cc
e@xxxxxxxxxxxxx
Subject
[jawsscripts] urgent if possible
please how2make inputBox info feed
in2findString?
26/05/2009 13:09
Please respond to
jawsscripts@freel
ists.org
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
------------------------------------------------------------
This email is confidential and should not be used by anyone who is not
the original intended recipient. Prudential cannot accept liability
for statements made which are clearly the sender's own and not made
on behalf of the Prudential. In addition, no statement should be
construed as giving investment advice within or outside the United
Kingdom
Prudential plc, incorporated and registered in England and Wales.
Registered Office at Laurence Pountney Hill, London, EC4R 0HH.
Registered number 1397169. Prudential plc is a holding company,
subsidiaries of which are authorised and regulated by the Financial
Services Authority (FSA)
'Prudential' is a trading name of The Prudential Assurance Company
Limited, which is incorporated and registered in England and Wales.
Registered Office at Laurence Pountney Hill, London, EC4R 0HH.
Registered number 15454. Authorised and regulated by the Financial
Services Authority. 'Prudential' is also used by other companies within
the Prudential Group, which between them provide a range of financial
products including life assurance, pensions, savings and investment
products
'Prudential' is also a trading name of Prudential Distribution Limited,
which is incorporated and registered in Scotland. Registered Office at
Craigforth, Stirling, FK9 4UE. Registered number SC212640. Authorised
and regulated by the Financial Services Authority.
A list of other Prudential companies together with their registered
statutory details can be found in 'About Prudential' on
http://www.prudential.co.uk
An email reply to this address may be subject to interception or
monitoring for operational reasons or for lawful business practices.
------------------------------------------------------------
__________
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: