[jawsscripts] Re: Require help in a script to get out of while loop

  • From: Jackie McBride <abletec@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Sun, 24 Dec 2017 06:40:37 -0700

Jitendra, you're defeating your purpose, ie,
Let I = InputBox ("the account holder's  name", "Add account", title)
If I then
While StringIsBlank (Title)

So what you're basically saying here is that if i exists (which it
does because you've created the input box) & i is blank, keep bringing
up the dialog box. So u might wish to do some key pressed events or
message monitoring so that when the esc key is pressed, the dialog is
cancelled.

HTH.

On 12/23/17, Jitendra Kumar <jeet.invincible@xxxxxxxxx> wrote:

Hello friends, below is a script given, if I press cancel from the
JAWS dialog without typing anything, it is OK, but if I press OK, the
dialog is recreated, this is what I want, but I should be able to
cancel the dialog, which is not happening if I press OK with an empty
edit box.
Script AddAcount ()
;For adding the account number and the name.
;First edit box is for the name, second for the number.
;use this script to add accounts, then only you get them using the
ShowAccounts script.
;For testing, we attached Alt+Grawv.
Var
String title,
string text,
int I,
int i2
Let I = InputBox ("the account holder's  name", "Add account", title)
If I then
While StringIsBlank (Title)
Say ("No name has been specified, please try again", 13 )
Let I = InputBox ("the account holder's  name", "Add account", title)
Endwhile
Let I2 = InputBox ("the account number", "Add account", text)
Else
SayMessage (13, "no Holder's name has been specified", "no message has
been specified")
Return
Endif
If I2 then
While StringIsBlank (text)
Say ("Name can not be saved without an account number, please try again", 13
)
;the dialog should be recreated only if user presses OK without typing in
it.
Let I2 = InputBox ("the account number", "Add account", text)
Endwhile
IniWriteString ("accounts", title, text, "acs.ini", 1)
SayMessage (13, "the entry against, "+title+" "+text+"has been added.","" )
Else
SayMessage (13, "no message has been specified", "no message has been
specified")
Return
EndIf
EndScript
__________�

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts




-- 
Remember! Friends Help Friends Be Cybersafe
Jackie McBride
Helping Cybercrime Victims 1 Person at a Time
https://brighter-vision.com
__________�

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: