Does/can DOpus automatically change the Windows Working Directory to be the same as the directory in the pathbar?
Yes, when you run a command it will have its working directory set to the current folder, unless you override it as part of the command.
Does that include just changing folders, or say opening a file within Dopus by double clicking on it?
Probably both but I'm not 100% sure and would have to test it somehow to be positive.
Why does it matter? Is something not working?
Does that include just changing folders, or say opening a file within DOpus by double clicking on it?[/quote]
I think it all depends on what commands or programs you are running. Take for example this (MS-DOS Command) toolbar button:
@Echo Off
CLS
Echo. Current Folder = %CD%
Pause
Go %SystemRoot%
Echo. Current Folder = %CD%
Pause[/code]
Before clicking this button, I listed my Install partition root (I:). Upon clicking the button, Opus immediately launched a Cmd.exe Command Console, which echoed:
code Current Folder = I:
Press any key to continue . . .[/code]
In the background, Opus changed the current lister to "C:\Windows" (%SystemRoot%). However this change was not picked up by the Cmd.exe shell. So the second Echo command's output is exactly the same as the first.
If I correctly remember what Jon told me a few years ago, Opus queues up its own commands and executes them. Then it queues up all MS-DOS batch commands, writes them to a temporary batch file, then executes it. (I may have the order these two queues are executed in wrong, but the queuing part is correct.) After the initial launch of the temporary MS-DOS batch Opus writes--where Opus converts Opus arguments in MS-DOS commands to values (like {file$}), and sets the current directory (%CD%) to the active Opus lister path--Opus no longer interacts with the temporary command script it wrote and launched.
If you want to see what Opus actually writes in its command scripts, you can empty your %Temp% folder before clicking on an MS-DOS command button, then look inside %Temp% after clicking on such a button for files named "dop0x.bat", where 0x = a unique hexadecimal number. Each click generates a new copy of the script. If you open this file, you will see exactly how Opus writes the commands before executing them.
[quote="nudel"]Probably both but I'm not 100% sure and would have to test it somehow to be positive.
Why does it matter? Is something not working?[/quote]
Not that something is not working, but just the irritating operation of some programs.
For example, using Acrobat, if I right click on a .doc and 'Convert to PDF' or equivalent, it goes through the process and then prompts me to save the file in, of course, any folder except the one that contains the original! Which for me is always the folder I want the PDF to go to. Now this could be that either Acrobat is using the Working directory, but DOpus is not setting it, or DOpus is setting the Working folder but Acrobat is ignoring it, or both. It is not just Acrobat that does this, there are other programs I use that do the same thing. Alot of programs do work correctly, but I don't know if it is because they default to the folder that contained the file, or are using the Working directory.
I will try to do some more tests and report back.
Does the same thing action up the current folder from within Windows Explorer?
What a sentence. Let me try that again.
If you attempt the same context-menu action from within Windows Explorer, does it pick up the current folder?
[quote="kenalcock"]What a sentence. Let me try that again.
If you attempt the same context-menu action from within Windows Explorer, does it pick up the current folder?[/quote]
No, it works the same as with DOpus. I think what I am trying to do will work. I think that each program chooses its folder based on the programmers preference.
I will try looking at some other way of controlling the save file dialog box to achive the same result.
I have found a registry key that can be modified to change the common dialog places bar (http://windowsxp.mvps.org/PlacesBar.htm).
I can write a program that will change this registry value to anything I want.
Is there any way in DOpus, to configure some operation such that the program is called, with the current DOpus directory as an argument, whenever I navigate through folders?
[quote="Stumpii"]No, it works the same as with DOpus. I think what I am trying to do will work. I think that each program chooses its folder based on the programmers preference.
I will try looking at some other way of controlling the save file dialog box to achieve the same result.[/quote]
The Places Bar can be customized in TweakUI. This customization will allow you to choose 5 and only 5 locations to add to the Places Bar. TweakUI limits location choices for the Places Bar to only the system folders listed in the TweakUI program.
You might try PlacesBar Tweaker™ Version 1.0 (freeware) which works well for customizing the Places Bar to add any folder path.
You are correct in that each program has a "mind of its own" about what folder to default to when opening or saving a folder. For example Internet Explorer saves separate folder paths for "Save Picture As" and "Save Target As" context menu actions. (If you right-click on the Opus icon on this page you will see what I'm talking about.)
While you could easily create an Opus context menu command or toolbar button command to pass the current path to a called program, this will not matter unless the program you wish to launch accepts such a parameter. It is a limitation of each application, not of Opus, or even of Windows.
You can also just manually edit the registry values under:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\comdlg32\PlacesBar
If you want a custom path, you must delete the current placeN (where N = {0, 1, 2, 3, 4}) DWORD value and insert a REG_SZ value. Then you can type the complete path as shown in the screen grab below
The system folders are best customize through TweakUI. (I do not know where one can find a reference table of each DWORD and which system folder it corresponds to. Although this would not be hard to figure out--just change one place to a know location, and record the DWORD value.
I should also note that not every application actually uses this common dialog for Save As or Open. For example Opus has its own internal file requester dialog. So your mileage may vary.
The screen grab mentioned above.
Thanks for your help. I have a program now that will set the registry value to the current '{sourcepath}' when a toolbar button is pressed. It works really well. Most new programs use the common dialog, so that is cool.
Still need to work out how to get DOpus to run the command on every directory change though.
You can't currently auto-run anything on directory changes, but you might be able to include the change-dir or set-registy stuff in a command which then also launches the PDF converter.