Speaking user interface (SUI) Re: Speaking tooltip
"valery_vi" <[email protected]>
| Newsgroups | gmane.comp.windows.autoit.user |
|---|---|
| Message-ID | <[email protected]> |
1. small bug: $ttY = $ttSize[0] should be replaced to $ttY = $ttSize[1] 2. I'm looking for classname of default tooltip window, too. My trials to use 'TOOLTIPS_CLASS' (see for example http://www.codeproject.com/csharp/balloonshow.asp) is failed. Does it exist? If so then we can catch tooltip window by it's classname instead of tricky title. Regards, Valery --- In [email protected], "valery_vi" <shehrer1@...> wrote: > > Hi, > > IMHO found a simple way to make speaking interface. > It rewritten from my lvedit script: > > ;================================================= > ; lvEdit - simple way for lv editing in AutoIt v.3.2.xx > ; You can edit first column of listview, only. > ; It beeps when tooltip is about to be displayed, too > ; So you can add instead of function Beep any handler with: > ; SoundPlay, Speak engine or others > ; > ; Enjoy > ; Valery Ivanov > ; > #include <GuiConstants.au3> > Const $WM_COMMAND = 0x0111 > Global $hEdit, $Update = 0, $Changed = 0 > Dim $User32, $hWnd, $LV, $Caption = 'LV inline update' > Dim $EditId = "Edit1", $EditMode = 0, $EditValue = '' > Dim $hTT=0 > > Opt("WinTitleMatchMode", 4) > > $User32 = DllOpen("user32.dll") > > $hWnd = GUICreate($Caption, 400, 200) > $LV = GUICtrlCreateListView("Items", 10, 10, 380, 180, > $LVS_EDITLABELS, $LVS_EX_GRIDLINES) > GUICtrlSetTip (-1,'_' &'Items') > for $i = 1 To 4 > GUICtrlCreateListViewItem("To update - click previously selected > item. To save - ENTER. To escape - ESC", $LV) > next > GUICtrlSendMsg($LV, 0x101E, 0, -1) > > GUISetState(@SW_SHOW) > > GUIRegisterMsg($WM_COMMAND, "WM_COMMAND_HANDLER") > while 1 > $msg = GUIGetMsg() > select > case $msg = $GUI_EVENT_CLOSE > exitLoop > case else > if $EditMode then > if not ControlCommand($hWnd, "", $EditId, "IsEnabled", "") then > $EditMode=0 > if $Update then > $EditValue = ControlGetText($hWnd, "", $EditId) > $Update = 0 > $Changed = 1 > endif > $IsEnter = DllCall($User32, "int", "GetAsyncKeyState", "int", > 0x0D) > if $Changed and $IsEnter[0] then > $item = GUICtrlRead($LV) > $IsOK = MsgBox(4, 'LV inline update', 'Do you want replace > item to ' & $EditValue & '?') > if $IsOK <> 7 then GUICtrlSetData($item, $EditValue) > $EditMode = 0 > $Changed = 0 > endif > endif > endselect > > ; catch tooltip apearing > $hTT = WinGetHandle('_') > if $hTT <> '' then HandlerToolTips($hTT) > If (not $EditMode) and ControlCommand($hWnd, "", > $EditId, "IsEnabled", "") Then > $EditMode = 1 > $EditValue = ControlGetText($hWnd, "", $EditId) > $hEdit = ControlGetHandle($hWnd, "", $EditId) > endif > wend > exit > > ;============================= > ; Handler of tooltip appearing > ; > func HandlerToolTips($hTT) > local const $TTM_SETTIPBKCOLOR = ($WM_USER + 19) > local const $TTM_SETTIPTEXTCOLOR = ($WM_USER + 20) > Global $ttXprev,$ttYprev > local $ttX,$ttY > $ttSize = WinGetPos("") > $ttX = $ttSize[0] > $ttY = $ttSize[0] > if $ttX = $ttXprev and $ttY = $ttYprev then return > ; Beep tooltip > Beep(500, 100) > ; Repaint tooltip > DllCall > ($User32,"int","SendMessage","hwnd",$hTT,"int",$TTM_SETTIPBKCOLOR,"in > t",0xFF,"int",0) > DllCall > ($User32,"int","SendMessage","hwnd",$hTT,"int",$TTM_SETTIPTEXTCOLOR," > int",0xFFFFFF,"int",0) > $ttXprev = $ttX > $ttYprev = $ttY > endfunc > > ;============================= > func WM_COMMAND_HANDLER($hWnd, $Msg, $wParam, $lParam) > local $EN_UPDATE = 0x0400 > if ($hEdit=$lParam) and (BitShift($wParam, 16)=$EN_UPDATE) then > $Update = 1 > return $GUI_RUNDEFMSG > endfunc > > This script uses tooltip options of control. Here listview has > tooltip 'Items' with underscore character. Message loop is waiting > the window with title where underscore character is first. It > is "event" to handle by function HandlerToolTips. The last one can > make beeps and repaint tooltip window. But you can substitute this > handler on any actions: > 1. Speak tooltip content and hide tooltip window. > 2. Extend tooltip features > 3. Create other window or switch on other options. > > Thus we can make so-called speaking user interface (SUI) instead of > GUI for PC application without monitors. > > Any ideas? > Valery > > > --- In [email protected], "valery_vi" <shehrer1@> wrote: > > > > Hi, > > > > lod3n from AutoItScript wrote: > > > > Subject:UDF _text2mp3(), requires SAPI, and lame.exe (mp3 encoder) > > http://www.autoitscript.com/forum/index.php?showtopic=33737 > > > > "... > > This UDF could be used with IE.au3 to convert a news web page to > an > > audio file, or to convert an ebook to a audio book. > > ... > > " > > > > I agree with words from discussion of this topic: > > "Can make some projects for people with weak eyes. Very useful!" > > > > Your ideas? > > > > Valery > > > > > > --- In [email protected], "valery_vi" <shehrer1@> wrote: > > > > > > BTW About talking PC software for blind > > > > > > From Jonathan's Birmingham - 18 to 20 July. > > > > > > http://www.pcmag.co.uk/personal-computer- world/news/2160526/free- > > > talking-pc-software-blind > > > > > > Is it "made by AutoIt"? > > > > > > > > > --- In [email protected], "valery_vi" <shehrer1@> wrote: > > > > > > > > Is there subject? > > > > > > > > Goal of it - > > > > Speak about content of control with mouse pointer. > > > > > > > > 1. It can be useful for blind to recognize button, eg of > > AKeyboard > > > to > > > > simplify typing. > > > > 2. It can be useful for speaking tutorials. > > > > 3. Weird idea! To control PC without monitor. > > > > > > > > Valery > > > > > > > > > > Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AutoItList/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/AutoItList/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/