Jump to content

LoopII loops revenge


 Share

Recommended Posts

Hi Rbhkamal or anyone who can help

Trying to do the same thing with this but using the modified wav file from sound recorder but I can't figuire out how to access the box (Autoit info window copied bellow) Also been trying to keep details of the file name and add "temp" to it after the sound recorder tried to call it a variable $"filename"=*.wav.

Can I just tag all this (when it works) to the end of the loop so that one file at a time is modified by sound recorder then passed to the input box of the transcribe window of the speech program which then outputs a text file (I would like to keep filename details with each record)

I hope you can help with some of this.

Thanks Wol :D

Global $n

;For $n = 1 To 5 Step 1

Opt("WinWaitDelay",100)

Opt("WinTitleMatchMode",4)

Opt("WinDetectHiddenText",1)

Opt("MouseCoordMode",0)

WinWait("DragonBar","Show or hide extras")

If Not WinActive("DragonBar","Show or hide extras") Then WinActivate("DragonBar","Show or hide extras")

WinWaitActive("DragonBar","Show or hide extras")

ControlClick("DragonBar", "Show or hide extras", "&Sound")

Send("{down 3}")

Send("{enter}")

WinWait("Transcribe from...","Audio File From &Poc")

If Not WinActive("Transcribe from...","Audio File From &Poc") Then WinActivate("Transcribe from...","Audio File From &Poc")

WinWaitActive("Transcribe from...","Audio File From &Poc")

ControlClick("Transcribe from...", "&File:",11217)

WinWait("Open","Files of &type:")

If Not WinActive("Open","Files of &type:") Then WinActivate("Open","Files of &type:")

WinWaitActive("Open","Files of &type:")

If Not WinActive("Files of &type:", "") Then WinActivate("Files of &type:", "")

WinWaitActive("Files of &type:", "")

Sleep( 500 )

ControlSetText( 'Files of &type:' , '' , 1148 , ControlGetText( 'Files of &type:' , '' , 1148 )&'_'&$n )

$Title = ControlGetText( 'Files of &type:' , '' , 1148 ) & 'XXXXXXXXX.wav - Sound Recorder'

ControlClick( 'Save As' , '' , 'Button2' )

WinWait( $Title , '' , 5 )

WinKill( $Title )

AUTOIT WINDOW INFO

Press CTRL-ALT-F to pause the display.

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: Transcribe from...

Class: #32770

Size: X: 310 Y: 151 W: 536 H: 362

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 543 Y: 302

Cursor ID: 5

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0xFFFFFF Dec: 16777215

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: 160 Y: 104 W: 204 H: 28

Control ID: 11217

ClassNameNN: Edit1

Text:

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

Source

&Audio File

Audio File From &Pocket PC

Through the &Line In Jack

&File:

&Browse...

F&ile:

B&rowse...

&Transcribe

A&dvanced...

Cancel

Help

Select where Dragon NaturallySpeaking will get your transcription

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

Edited by wol
Link to comment
Share on other sites

...I can't figuire out how to access the box (Autoit info window copied bellow)...

One way to debug your code would be to change this one line:

ControlClick("Transcribe from...", "&File:",11217)

to this

MsgBox(0, "",ControlClick("Transcribe from...", "&File:",11217))

and see if you get a 1 or a 0 in the MsgBox.

from the help file under ControlClick:

Return Value

Success: Returns 1.

Failure: Returns 0.

Also, the help file mentions this:

"The control might first need to be given focus with the ControlFocus command."

...so, you might want to add

ControlFocus("Transcribe from...", "&File:",11217)

before that ControlClick line.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...