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,
==1) then NextWord ()
Nice, thanks for the pointer.
Here is why I wanted the input box:
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 / sHours<jawsscripts-bounce@xxxxxxxxxxxxx> On Behalf Of Csaba Árpádházy-Godo
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
Sent: Friday, November 13, 2020 12:58 PMOne control is an edit box in which you can enter information. Another
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 entertext into the Edit box and press the OK button, the text you typed in
cancel button was pressed.
Returns
Type: Int
Description: Returns 1 if the OK button was pressed. Returns 0 if the
calculation?
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
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