Hi,
There is also one thing I haven't found yet.
I knew this would happen.
Does jaws scripting include a way to handle float variables, i.e. 7.25?
Thanks,
Bryan
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx <jawsscripts-bounce@xxxxxxxxxxxxx> On
Behalf Of Csaba Árpádházy-Godo
Sent: Saturday, November 14, 2020 3:51 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: custom dialogs
Hi Brian,
to work your script properly you have change the following line:
iCPH = sCalls/sHours to iCPH = StringToInt (SCalls)/ stringToInt (sHours).
Because sHours and sCalls are string variables, JAWS can't divide them to get
an integer result. It is possible if every participant of the division are
integers.
2020. 11. 14. 5:12 keltezéssel, Bryan Schulz (Redacted sender b.schulz for
DMARC) írta:> Hi chaba, > > Nice, thanks for the pointer.
Here is why I wanted the input box:==1) then NextWord ()
Script AverageCalls ()
; control alt a
var string sCalls, string sHours, int iCPH ;calls per hour > SaveCursor ()
InvisibleCursor () > RouteInvisibleToPC () > JAWSPageUp () > PCCursor() > If FindString (GetCurrentWindow (), "och:", s_top, s_unrestricted
GetWord ()sHours)
Let sCalls = GetWord ()
InputBox ("How many hours have you worked?", "Enter hours worked",
iCPH = sCalls / sHoursOne control is an edit box in which you can enter information. Another control
IntToString (iCPH)
SayString ("your average is " + IntToString (iCPH) + " calls per hour") >
Else > PCCursor () > SayString ("OCH not found") > PCCursor () > EndIf
RouteInvisibleToPC () > RestoreCursor () > EndScript > > Thanks, >Bryan > > > -----Original Message----- > From:
jawsscripts-bounce@xxxxxxxxxxxxx <jawsscripts-bounce@xxxxxxxxxxxxx> On
Behalf Of Csaba Árpádházy-Godo > Sent: Friday, November 13, 2020 12:58 PM
To: jawsscripts@xxxxxxxxxxxxx > Subject: [jawsscripts] Re: custom dialogs> > Hi Brian!
The function you looking for is InputBox () > > Function: InputBox >
Description > This function displays a simple dialog box containing four
controls.
The other two controls are the OK and Cancel buttons. 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.
Returns
Type: Int
Description: Returns 1 if the OK button was pressed. Returns 0 if the cancel
button was pressed.
Parameters
Param 1:
Type: String
Description: The text of the message that you would like to be displayed >
in the prompt of the Edit Box.
Include: Required
Param 2:
Type: String
Description: The text of the Dialog Box's title.
Include: Required
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 > > > Version > This function is available in the following
releases:
JAWS 4.51 and later
HTH
Chaba
2020. 11. 13. 19:27 keltezéssel, Bryan Schulz (Redacted sender b.schulz >
for DMARC) írta:
Hi,__________
Would there be a way to present a small custom window asking the user to
calculation?input a number then use that number in a variable to perform a
Bryan
__________
View the list's information and change your settings at >>
http://www.freelists.org/list/jawsscripts
View the list's information and change your settings at >
http://www.freelists.org/list/jawsscripts
__________
View the list's information and change your settings at >
http://www.freelists.org/list/jawsscripts