Executable item on a toolbar

I have a small problem associated with Opus 10, and a program icon on a toolbar I’ve been using for quite a while.

I had set up an icon for NoteTab Pro 7 on the toolbar, and configured it so that when the focus was on a text file in the file listing window, single clicking on that icon would open that file with NoteTab Pro 7.

I’ve had some problems with NoteTab Pro 7 lately, so I decided to change back to the standard version of NoteTab for now. So I right clicked “customize” on the toolbar, and then right clicked on that icon, and selected “edit”. I went into the properties window for the icon, and simply changed the entry in the field for the executable to the standard version of NoteTab. The path was the same.

But when I now put the focus on a file in the file listing, and then click on the NoteTab Icon, NoteTab opens, with a blank screen - and does not open the file in question.

So obviously I’ve done something wrong - but what? All I did was change the executable.

Ron Hirsch

Probably, your button does not pass selected file as a command line parameter to NoteTab Pro 7. Maybe when changing the executable's path you removed the setting to pass the file path?

wth, can't find how to edit my post :slight_smile:

Anyway, @Ron, post your button command, so we can see whats up.

Your command should look like this:

"full_path_to_the_NoteTab.exe" {filepath$}

I'm now using NoteTab 7, as the Pro version has been acting very strangely, and can take a loooooong time to lad. The regular version 7 is now being used.

I did a screen cap of the edit window, but I don't see the way to add in the jpg file. to this response.

And it is not clear where the string you noted should be.

The string I have in the function field is
C:\Program Files (x86)\NoteTab 7\NoteTab.exe

Ron


Your path to the NoteTab executable is different but the rest should be the same.

If you want to attach an image you need to use the Post Reply button, not Quick Reply. In the Post Reply dialog you will see an option to upload attachment.

Regards, AB

[quote="Ron Hirsch"]The string I have in the function field is
C:\Program Files (x86)\NoteTab 7\NoteTab.exe[/quote]
Yep, you're not passing the file.

Put this into the Function field of your button:

"C:\Program Files (x86)\NoteTab 7\NoteTab.exe" {filepath$} @nodeselect @filesonly

I assume, you're new to command line, if not, just ignore everything below. If you bare with me, I'll try to explain how this works, so you can make all kinds of buttons. Computers are extremely fast and powerful, but at the same time extremely dumb, and need to be told exactly what to do. Your pc has no ability whatsoever to understand what you want it to do if you did not tell it. When/if the time comes, when this won't be the case, those computers will be called Skynet and we're all gonna be f***ed :slight_smile:

Let's examine your command:

Let's go through the list:
[ol]
[li]Directory Opus and NoteTab are completely separate beasts and they have no knowledge of each others wants and needs, so when you want to launch NoteTab from DOpus, you provide a path to the NoteTab executable.[/li]
[li]After the path to the executable, you put all the command line arguments/parameters that you want to pass on to that program. In your case all you need to pass on is a path of a file, which you want to be open when NoteTab starts. Here, instead of providing a regular path (eg.: "c:\my files\whatever.txt"), you provide a special dopus argument {filepath$}, which means: a path to the currently selected file(s). Read about it in dopus help: Reference > Command Reference > External control codes > Codes for passing filenames.
Most of the programs out there support command line arguments. You should look for the descriptions of all available command line parameters and what they do in the programs help files. Check out Command-line interface - Wikipedia. [/li]
[li]these have nothing to do with NoteTab and command line. These are modifiers which DOpus uses to let as have even more control over how buttons work. Read about them in DOPus help file: Reference > Command Reference > Command modifier reference.[/li][/ol]

You should read DOPus help file on creating and modifying buttons. It is a little bit confusing for a beginner, but you won't regret it, trust me. And watch leo's videos on DOpus: Leo Davidson - YouTube

Hope this helps.

Thanks for all the info.

As I mentioned, on my main machine, this was all working, for a long time. All I had to do was click on a file in the file listing, and then click on my icon for NoteTab, and that file opened. And this still works that way on my backup machine with the info I provided.

I don't know why it stopped working on my main machine. The only thing I changed in that window was the executable file name.

In any event, I just now copied the material suggested into the advanced window, and now everything is back "normal", and the filename is now passed to NoteTab, and it does open as it should.

Thanks again.