Thanks Aaron. It took me a while to figure out what you were doing with the xml stuff, but I got it!
Jeff Weiss From: Aaron Smith [mailto:[email protected]] Sent: Thursday, July 14, 2011 4:11 PM To: [email protected] Subject: Re: UpDown dialog control UpDowns are used to increment/decrement a value respectively. The QuickStart script has an example that automatically adjusts the screen, keyboard, and mouse voices with an up/down: Case "ud_screen_rate" If dEvent = updownChange Then Dim oldVal, newVal oldVal = dObj.Control("edit_screen_rate").Text newVal = 0 Dim udObj : Set udObj = dObj.EventInfo If Not udObj Is Nothing Then newVal = CInt(oldVal + udObj.Delta) End If If newVal > 0 And newVal <= 100 Then DesktopWindow.Settings2.Global.Screen.Rate = newVal DesktopWindow.Settings2.Global.Keyboard.Rate = newVal DesktopWindow.Settings2.Global.Mouse.Rate = newVal dObj.Control("edit_screen_rate").Text = newVal End If DialogProc = True Exit Function End If Aaron On 7/14/2011 4:22 PM, Jeff Weiss wrote: I don't understand what the UpDown control is supposed to do in a dialog. I would appreciate some explanation of this control. Below is the .vbs and the .xml files that I am trying to use. The dialog will come up with the editBox and two buttons. If somebody could show me how to make the upDown control do something useful I would appreciate it! ' DialogUpDown Dim myHotkey : Set myHotkey = Keyboard.RegisterHotkey("Alt-Control-Shift-I","MyUpDown") Dim isVisible : isVisible = 0 Sub MyUpDown() If isVisible = 0 Then Queue "DisplayDialog" End If End Sub Sub DisplayDialog() Dialog "DialogUpDown.xml", "DialogUpDown", "DialogEventHandler" End Sub Function DialogEventHandler(dObj, dEvent, dId, dControl) DialogEventHandler = False Select Case dId Case "UpDown" DialogEventHandler = True Exit Function Case "btn_ok" If dEvent = buttonClicked Then edit_sample1(dObj) ' dObj.Control("UpDown").Text Sleep 200 DialogEventHandler = True Exit Function End If Case "btn_close" If dEvent = buttonClicked Then Speak "Closing dialog" Sleep 1000 DialogEventHandler = True IsVisible = 0 dObj.Close Exit Function End If Case Else If dEvent = dialogCreated Then isVisible = 1 DialogEventHandler = True Exit Function End If End Select End Function Sub edit_sample1(dObj) Dim textToSpeak TextToSpeak = dObj.Control("edit_sample1").Text Speak "You entered " & textToSpeak L = Len (TextToSpeak) Speak "your text is " & L & " characters long. " End Sub ' Here is the .xml file <?xml version="1.0" encoding="UTF-8" standalone="no"?> <wescriptui> <options> <languageorder> WE,OS,en-us </languageorder> </options> <language id="en-us"> <dialog id="DialogUpDown"> Dialog Up Down <group> <group orientation="vertical"> <editbox id="edit_sample1" height="200" width="200" lines="multiple" textalign="left" restrictions="none" readonly="no" returns="yes" maxlength="1000" scroll="vertical"> </editbox> <updown id="ud_sample1" buddy="edit_sample1"> </updown> </group> <group> <button id="btn_ok" system="ok" default="yes" widthclass="btn"> OK </button> <button id="btn_close" system="cancel" widthclass="btn" width="+10"> Close </button> </group> </group> </dialog> </language> </wescriptui> Jeff Weiss, CVRT Rehabilitation Teacher Lions World Services for the Blind 2811 Fair Park Blvd. Little Rock, AR 72204 http://www.lwsb.org The Mission of LWSB is to educate adults who are blind or visually impaired for careers and independent lives. -- Aaron Smith Web Development * App Development * Product Support Specialist GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825 260-489-3671 * gwmicro.com To insure that you receive proper support, please include all past correspondence (where applicable), and any relevant information pertinent to your situation when submitting a problem report to the GW Micro Technical Support Team.
