wol Posted July 13, 2006 Share Posted July 13, 2006 Hello all Anybody know how to keep details of a file name so it can be used through a script (maybe as a $) I'm to thick to sort it out . I need to work on a file with 2 programs then record details of file in a word doc at the end. Thanks for any help Link to comment Share on other sites More sharing options...
Briegel Posted July 13, 2006 Share Posted July 13, 2006 If I really understand what you want, you need to have ExtProp.au3.A very nice UDF from Simucal.good luck Link to comment Share on other sites More sharing options...
wol Posted July 13, 2006 Author Share Posted July 13, 2006 Thanks I may be able to use some of that. I'm suprised that Autoit has no function to get a filename. I want to load a file into one program, modify it then load it into another program then save the output (word doc) with the filename Link to comment Share on other sites More sharing options...
Developers Jos Posted July 13, 2006 Developers Share Posted July 13, 2006 (edited) Thanks I may be able to use some of that. I'm suprised that Autoit has no function to get a filename. I want to load a file into one program, modify it then load it into another program then save the output (word doc) with the filenameThere's not much you can't do in AutoIt3, but i for one have no idea what it is you want to accomplish...Maybe explain in steps what you want to get done .... Edited July 13, 2006 by JdeB SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 13, 2006 Share Posted July 13, 2006 Hi, how would you address a file, if you haven't got the path with name? First file in folder or what? So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Briegel Posted July 13, 2006 Share Posted July 13, 2006 Thanks I may be able to use some of that. I'm suprised that Autoit has no function to get a filename. I want to load a file into one program, modify it then load it into another program then save the output (word doc) with the filenameIf you want to load a file into one program you have the filename.Or if you search for the file you have to use FileFindFirstFile ( "filename" ) and FileFindNextFile ( search ). Link to comment Share on other sites More sharing options...
/dev/null Posted July 13, 2006 Share Posted July 13, 2006 Thanks I may be able to use some of that. I'm suprised that Autoit has no function to get a filename. I want to load a file into one program, modify it then load it into another program then save the output (word doc) with the filenameWhat do you mean by "no function to get a filename"? Where do you want to get the filename from? Usually you will know the name of the file you are working with !??! CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
wol Posted July 13, 2006 Author Share Posted July 13, 2006 I'll try to explain what I,m trying to do.. 1Open directory containing .wav files 2.load a file into sound recorder and clip 10 secconst off the front of the file 3. Load the file into a speech recognition program which outputs a word file of the contents. Here is where I want the original file name to identify the contents i.e. Fred .wav....todays date......what fred said So far I have made Autoit exe modules to open both programs but can't tie it together then make the whole thing do the same to the next file and so on. Thanks for any help Link to comment Share on other sites More sharing options...
The Kandie Man Posted July 13, 2006 Share Posted July 13, 2006 Can you post what you have so far? I would hate to write something that you have already done or improperly make it so that it won't integrate with your script. "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
wol Posted July 13, 2006 Author Share Posted July 13, 2006 (edited) Ok I,ll heres what I've got so far some of it has semi colon on front while I tried other Ideas. As you can see I've no Idea what I'm doing....Many thanks for the help xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Main xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Run("C:\Program Files\ScanSoft\NaturallySpeaking8\Program\natspeak.exe") WinWaitActive("Dragon NaturallySpeaking 8.0 Activation") Send("{SPACE 2}") sleep("50000") ;DELAY FOR SPEECH BAR INITIALISATION (ADJUST TO SUIT COMPUTER) run("C:\Dial 36 macro\FOD Test 2.exe") xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx FOD Test 2 xxxxxxxxxxxxxxxxxxxxxxx Opt("WinTitleMatchMode", 4) Global $m Global $n For $n = 1 To 5 Step 1 Run("C:\WINDOWS\system32\sndrec32.exe") WinWait("Sound - Sound Recorder", "Position:") If Not WinActive("Sound - Sound Recorder", "Position:") Then WinActivate("Sound - Sound Recorder", "Position:") WinWaitActive("Sound - Sound Recorder", "Position:") ControlSend('Sound - Sound Recorder' , '' , 203 , "!f{s}") WinWait("Save As", "") If Not WinActive("Save As", "") Then WinActivate("Save As", "") WinWaitActive("Save As", "") Sleep( 500 ) ControlSetText( 'Save As' , '' , 1148 , ControlGetText( 'Save As' , '' , 1148 )&'_'&$n ) $Title = ControlGetText( 'Save As' , '' , 1148 ) & '.wav - Sound Recorder' ControlClick( 'Save As' , '' , 'Button2' ) WinWait( $Title , '' , 5 ) WinKill( $Title ) ;For $m = 1 To 5 Step 1 ;run("C:\Dial 36 macro\Load S R TEST.exe") Sleep( 500 ) MsgBox( 0 , "Done" , 'File Number:'& $n , 3) Next ;next xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Load S R TEST xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Global $filename Global $n For $n = 1 To 5 Step 1 $filename=("*.wav") 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") ControlFocus("Transcribe from...", "Edit1",11217) ControlSetText( 'Transcribe from...' , '' , 11217 , ControlGetText( 'Transcribe from...' , '' , 11217 )&'_'&$filename ) $Title = ControlGetText( 'Transcribe from...' , '' , 11217 ) & '.wav - Sound Recorder' ControlClick("Transcribe from...","","Button7");OK TO HERE********* ;ControlClick("DragonPad - Document", "", "!f{s}")) next Edited July 14, 2006 by wol Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 14, 2006 Share Posted July 14, 2006 Ok I,ll heres what I've got so far some of it has semi colon on front while I tried other Ideas. As you can see I've no Idea what I'm doing....Many thanks for the help First, may I recommend the use of code, codebox, and autoit tags? You set WinTitleMatchMode = 4, but then use the basic default "Title", "Text" method in your script. You could probably get rid of that statement and leave the default mode 1. There is a line that baffles me: $filename=("*.wav")$filename What is it that should be doing? If you mean to find the first .wav file, and then each one after it, check out the FileFindFirstFile() and FileFindNextFile() functions. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
wol Posted July 14, 2006 Author Share Posted July 14, 2006 Thanks for the help I was not joking when I said I don't know what I'm doing Ive only started using Autoit for about a week.Im trying to do what i've layed out on my post #8 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now