Application Toolbar Button Parameters [done]

Share any ideas you have on improving Explorer++
twinsen
Posts: 109
Joined: Mon Dec 27, 2010 3:17 pm

Application Toolbar Button Parameters [done]

Post by twinsen »

I'd like the application toolbar buttons to have a parameters section in the dialog.
The configurable parameters could support %dir% and %files% (for current directory / selected files). %files% is less important, since the context menu works ok for now.
This would make it easier to integrate external applications without having to copy/paste the directory from the address bar.
You could just add the parameter support directly into the command text box, rather than having a separate one (if its easier). At the moment you can't even have a constant parameter, it just does nothing and the icon disappears.
Last edited by twinsen on Sat Jan 15, 2011 7:04 pm, edited 1 time in total.

twinsen
Posts: 109
Joined: Mon Dec 27, 2010 3:17 pm

Re: Application Toolbar Button Parameters

Post by twinsen »

I've now implemented it.
When creating an application button, you just put extra information in the "Command" text box.

Demo exe: http://members.iinet.net.au/~bertdb/rya ... n_1.6.1.7z

Instructions:
* Put the path in quotes
* Put one of these after the path:
%dir%
%selected_files%

Examples:

grepWin
"D:\Programs\grepWin\grepWin-1.4.3_portable.exe" -searchpath:"%dir%"

metapad
"D:\Programs\Metapad\metapad.exe" %selected_files%

explorer
"C:\WINDOWS\explorer.exe" %dir%

Cmd (works same as the existing cmd explorer++ button)
"c:\windows\system32\cmd.exe" /k pushd "%dir%"

Bat file examples:
BatFileExamples.7z
(380 Bytes) Downloaded 445 times
Create M3U (creates an mp3 list for current directory)
"D:\Programs\CreateM3U.bat" "%dir%"

ConvertToPng (converts selected files to png with ImageMagick)
"D:\Programs\ConvertToPng.bat" %selected_files%

References:
* grepWin: http://code.google.com/p/grepwin/downlo ... nloadCount
* ImageMagick http://www.imagemagick.org/script/binar ... 41#windows

Code:
See patch below.
Last edited by twinsen on Sun Jan 16, 2011 6:39 pm, edited 5 times in total.

ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Application Toolbar Button Parameters

Post by ajs »

Hi twinsen, well done.
if you could post a patch it would be great!

By the way, talking about something else, I am working on the f2-shift f2 file rename fucntion. I am 50% through, I should have a patch ready by tonight or tomorrow at most.

ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Application Toolbar Button Parameters

Post by ajs »

Hi twinsen,
sorry for asking again, could you prepare a patch for this change?
It is very interesting and I am keen to merge it to my local development branch as soon as possible ;)

twinsen
Posts: 109
Joined: Mon Dec 27, 2010 3:17 pm

Re: Application Toolbar Button Parameters

Post by twinsen »

I was hoping to fix the right click crash so I don't have to maintain two branches.
I suppose if it takes too long I could at least do my 1.2 changes in revision 143 so I can release patches as soon as I do a feature.

I think feature only changed one file, so it shouldn't take long to make a patch.

twinsen
Posts: 109
Joined: Mon Dec 27, 2010 3:17 pm

Re: Application Toolbar Button Parameters

Post by twinsen »

Here is the patch.
Pending changes:
* Remove "SearchAndReplace" and replace with non-wstring version.
* Change GetCommandPath/GetCommandParameters to not use wstrings internally.
AppToolParameters_Revision_163.7z
(2.24 KiB) Downloaded 427 times

ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Application Toolbar Button Parameters

Post by ajs »

thanks Twinsen,
I will try it this weekend (tomorrow I am busy all day and can't do any development :( )
I hope David can find some time to commit some of our patches. The list is getting longer and longer and keep track of everything is a little messy right now :D

ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Application Toolbar Button Parameters

Post by ajs »

Twinsen, great patch, love that!
I have added it to the list of patches to be committed.
I may do some "extension work" in the future, but not sure when.

ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Application Toolbar Button Parameters [done]

Post by ajs »

I am going to rework and extend this patch, so please do not commit it any longer

ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Application Toolbar Button Parameters [done]

Post by ajs »

Replaced by patch 50 and 51 (the last one still to be done)
http://www.explorerplusplus.com/forum/v ... ?f=7&t=736

Post Reply