Jump to content

Recommended Posts

Posted

I know how to block the keybord & mouse, but I dont want this.

I'm making this script with the Loquendo's SAPI. And the result

is a windows + advertenses by voice :D

I mean, if you want to delete something, the SO aks you if you

are sure. If there is an error, it tells you the error...

Its just for fun :P

I didn't ment to block the Keyboard or mouse, I ment to block the control from getting input until it is over speaking.

Posted

Ahh. I think it would be more easy to restart the function :D

Is there any function like in bat ?

echo off

:start

my command

my command 2

goto start

exit

?

I don't know, that is the problem if you where using Select and cases it was easier because you can say: End Select.

Posted

Ahh. I think it would be more easy to restart the function :D

Is there any function like in bat ?

echo off

:start

my command

my command 2

goto start

exit

?

Goto is pointless. Get out of those goto habits fast.

While 1
    _MyFunc ()
    _MyFunc2 ()
WEnd

Exit

Func _MyFunc ()
    
EndFunc

Func _MyFunc2 ()
    
EndFunc
Posted

I MADE IT !!!

MUAHHAHAHHAHHAHAHAHAHAHHAHA

Here goes the entire code:

AutoItSetOption("TrayIconHide", 1)

AdlibEnable("MyAdLibFunc")

$i = 0
Global $m1
While 1
    Sleep(10)
WEnd

Func MyAdLibFunc()
    If WinExists("[CLASS:#32770]") Then


        $texto = ControlGetText("[CLASS:#32770]", "", "Static2")
        If $m1 = $texto Then
            _TalkOBJ("")
        Else
            _TalkOBJ($texto)
            
        EndIf
    EndIf
EndFunc

Func _TalkOBJ($s_text)
    Local $o_speech
    If $s_text = "" Then Return
    $o_speech = ObjCreate("SAPI.SpVoice")
    $o_speech.Speak($s_text)
    $o_speech = ""
    $m1 = ControlGetText("[CLASS:#32770]", "", "Static2")
    ;MsgBox(0, "$m1:", $m1)
    Return $m1
EndFunc

Thanks all for the help

U R THE BEST !!!

no problem. next time remember what to do before posting...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...