dreamzboy Posted April 20, 2007 Share Posted April 20, 2007 Hi, :"> I'm new to scripting. I can program in C, but this is a total new ball game to me. Any help is much appreciated. First of all, I read the tutorial on this website on opening a text file, write something in it and then close it. Now, what if I wanted to save it in a specific directory? So I got to here: Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send("This is a test...") WinClose("Untitled - Notepad") WinWaitActive("Notepad", "The text in the Untitled file has changed") Send("!y") WinWaitActive("Save As") ControlClick("Save As", "Save &in:", "", "Desktop") Send("notepad_test.txt","File name:") Send("!s") But obviously that didn't work. I can save the file to default directory just fine, but not on my desktop (or wherever I wanted it to be). I've looked at 20 or so pages in the search but found nothing. I know the error is "ControlClick" but I don't know how to direct the mouse to choose "Desktop". Any help is much appreciated. Thanks. Link to comment Share on other sites More sharing options...
Valuater Posted April 20, 2007 Share Posted April 20, 2007 better to save it and then copy/move it to any folder you want... see FileCopy -------------------------------------------------------------------------------- Copies one or more files. FileCopy ( "source", "dest" [, flag] ) Parameters source The source path of the file(s) to copy. Wildcards are supported. dest The destination path of the copied file(s). flag [optional] this flag determines whether to overwrite files if they already exist. Can be a combination of the following: 0 = (default) do not overwrite existing files 1 = overwrite existing files 8 = Create destination directory structure if it doesn't exist (See Remarks). 8) Link to comment Share on other sites More sharing options...
Cyber Posted April 20, 2007 Share Posted April 20, 2007 send the full path ... WinWaitActive("Save As") Send("c:\programs\asdasd\gnappo.txt") Send("{ENTER}") ... Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key Link to comment Share on other sites More sharing options...
dreamzboy Posted April 20, 2007 Author Share Posted April 20, 2007 Thank you so very much from the both of you, especially with the quick response. got it to work beautifully. Continue learning... from the first script that is. Link to comment Share on other sites More sharing options...
Cyber Posted April 20, 2007 Share Posted April 20, 2007 you welcome Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key 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