[jawsscripts] Re: custom dialogs

  • From: Jonathan Cohn <jon.c.cohn@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Sat, 14 Nov 2020 15:59:21 -0500

I have never seen a way to do this. 
                Best wishes,
Jonathan Cohn



On Nov 14, 2020, at 15:49, Bryan Schulz (Redacted sender "b.schulz" for 
DMARC) <dmarc-noreply@xxxxxxxxxxxxx> wrote:

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:

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
==1) then NextWord ()
GetWord ()
Let sCalls = GetWord ()
InputBox ("How  many hours have you worked?", "Enter hours worked",
sHours)
iCPH = sCalls / sHours
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. 
One control is an edit box in which you can enter information. Another 
control is a Static Text window containing the prompt of the edit box.
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  
input a number then use that number in a variable to perform a 
calculation?

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

__________ 

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

Other related posts: