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

  • From: Jitendra Kumar <jeet.invincible@xxxxxxxxx>
  • To: jawsscripts <jawsscripts@xxxxxxxxxxxxx>
  • Date: Sun, 24 Dec 2017 10:34:57 +0530

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

Other related posts: