Jump to content

Directory Finding In An Already Open "save As" Dialogue


Recommended Posts

The program I'm making this script for has a function that it automatically opens the save dialogue to the last folder a file was saved to. Since I'm not actually invoking the "Save As" in the script or from the program for this, I need to know if it is possible for me to tell the "Save As" dialogue once it's open to go to a specific folder to save the file that I want to save.

The end all of this function, what I need to do is the following. I need to detect the folder that the current active file belongs to and use that, go into one particular folder named "audio" within that folder, and there is where I want the "Save As" dialogue to end up.

I read, understand, and have executed the _SplitPath() function, but I don't understand how to incorporate it in an existing script to complete this. When I activate it, it is only telling me the path of the actual script rather than the open window even if I give it the active window call.

How can I go about all of this?

Link to comment
Share on other sites

when you do the opendialog your going to define the int directory meaning the initial directory so for the at the current script dir with and then into audio it would be like this

FileSaveDialog("Save As",@scriptdir & "\audio","YOURFILE (*.*)",1,"YOUR DEFAULT FILE NAME")
Edited by thatsgreat2345
Link to comment
Share on other sites

That's the thing. I'm not actually doing any specific opening of the dialogue. It's a specific function that has to be given to the program, that THEN opens the "save as" dialogue. If I open the "save as" dialogue, I wont be able to do the specific function. That is why I have to tell the dialoge what folder to go to AFTER it is open.

....that's if I understand whay you are saying to do with that script. Or does that script actually do what I'm saying?

Link to comment
Share on other sites

It's an audio exporting function. Once I tell the program "I want to export track 6 of the session" it then automatically calls the "save as" dialogue. Here's the main part of this function---once save is hit within the "save as" dialogue, all the audio files on that track are then combined and mixed to one full sized track---that is why it must be called through the specific program function and not just "save as". And that's why I need to change the directory once the "Save As" dialogue is open through this script.

Edited by Champak
Link to comment
Share on other sites

Because different multitrack sessions will have different folders, and there is no way....as far as I see to use those techniques to save. That's why I need to grab the location of the open file on screen. And then once the dialogue opens, tell it where to go.

Link to comment
Share on other sites

WOW, this is BEYOND EMENSELY EMBARRASING!!!! I've been using computers for 15 years and NEVER knew that you could type the entire path to where you want to save a path in the save as dialogue. Always thought you had to find the folder and then type in the name. Unbelievable :"> . I don't even know what made me try it out...probably your insistence to go back and check it out. Thanks.

Anyway, so now that I have that clear, I still don't know how to invoke the _PathSplit to show the path of the open window, and not the script that is running it.

Link to comment
Share on other sites

  • Moderators

Is this a file that is an actual application, or is opened with another application?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Yes. I want to detect the location of a file that is open in another open application....the application/file that the script is currently working on.

This might help then:

http://www.autoitscript.com/forum/index.ph...ndpost&p=165980

My only concern is that if your opening a txt file, It will show the path of the application "notepad". So if the application is in the same folder as the file/window your opening then it would work.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

So basically it will only get the path of the application, and not the file that is open?.....the open file is what I need.

Thanks

Like I said... I didn't know if the application was in the same folder or not. And your welcome.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...