Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Interpret buttonbar as menu
Goto page Previous  1, 2, 3 ... 15, 16, 17, 18  Next
 
Post new topic   Reply to topic    Total Commander Forum Index -> Plugins and addons: devel.+support (English) Printable version
View previous topic :: View next topic  
Author Message
Balderstrom
Power Member
Power Member


Joined: 11 Oct 2005
Posts: 2024

PostPosted: Sun Aug 16, 2009 6:53 pm    Post subject: Reply with quote

I thought, -S %S was TCMenu syntax, not internally TC Syntax. TCMenu requires the -Letter flag to handle %Letter

TCMenu:
Command: %APPDATA%\GHISLER\GUI\TCMenu.exe
PARAMS: %%APPDATA%%\GHISLER\GUI\ToolBars\EDIT.BAR -S %S

Without TCMenu, a button looks like:
Command: chp.exe cmd.exe /c MultiFileOpen.cmd
params:%S

Basically, the [..] is pretty much breaking most of the things I would continue to use TCMenu.exe for.

Even my scripts have to acknowledge when they receive nothing it means [..] and treat it as if it is actually the current active directory.

If TC would just send the active current directory when the cursor is on [..] I wouldn't even need to code an exception for it.
Back to top
View user's profile Send private message Send e-mail
Samuel
Power Member
Power Member


Joined: 29 Aug 2003
Posts: 1610
Location: Brandenburg, Germany

PostPosted: Sun Aug 16, 2009 11:48 pm    Post subject: Reply with quote

Probably not clear. Its the syntax of TCMenu, but TC sends the command.

When the two files are selected TC executes the command:
Code:
%APPDATA%\GHISLER\GUI\TCMenu.exe %APPDATA%\GHISLER\GUI\ToolBars\EDIT.BAR -S C:\File1.txt C:\File2.txt


If ".." is selected TC executes the command: (with no parameters)
Code:
%APPDATA%\GHISLER\GUI\TCMenu.exe


Instead of (What you probably think):
Code:
%APPDATA%\GHISLER\GUI\TCMenu.exe %APPDATA%\GHISLER\GUI\ToolBars\EDIT.BAR -S


Edit: Seems like you already understood the problem before.
_________________
QuickSearch eXtended | ButtonBar eXtended | www.familie-plentz.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
VadiMGP
Power Member
Power Member


Joined: 05 Apr 2003
Posts: 651
Location: Israel

PostPosted: Mon Aug 17, 2009 12:04 am    Post subject: Reply with quote

2Balderstrom
Sorry, but I really cannot do anything. Smile
TCMenu need to substitute parameters and if some of them are missing - I cannot execute the command. You speak about very simple case only - when parameters field contains single parameter (%S). But what I have to do if there will be more complex parameters combination? (i.e. "abc=%P def=<%S> ghi=%T") What should be passed for execution if some parameters are present and some parameters are missing?

You can avoid TCMenu substitution if you define em_ command and put all parameters inside em_ command definition.
Back to top
View user's profile Send private message
Balderstrom
Power Member
Power Member


Joined: 11 Oct 2005
Posts: 2024

PostPosted: Mon Aug 17, 2009 12:49 am    Post subject: Reply with quote

@VadiMGP,
Thank you... It took a handful of trials to grok what you meant exactly, but I got it to work Smile

To make TCMenu work when the cursor is on [..] and your Button has a parameter, that TCMenu is expecting, ie %S ::

Button on Main ButtonBar
Quote:
Command: %APPDATA%\GHISLER\GUI\TCMenu.exe
Parameters: %%APPDATA%%\GHISLER\GUI\ToolBars\EDIT.BAR

Contents of EDIT.BAR
Quote:
[Buttonbar]
Buttoncount=2
button1=%APPDATA%\GHISLER\GUI\icons\Editors.icl,6
cmd1=em_openNotePad2
param1=

Contents of usercmd.ini
Quote:
[em_openNotePad2]
button=
cmd=chp.exe cmd /c MultiFileOpen.cmd "%PROGRAMFILES%\¤EDITors\NotePad2K\notepad2.exe"
param=%S


Or when not doing something as seemingly obscure as the MultiFileOpen.cmd and using chp (CreateHiddenProcess), just place your executable path there, ie:
Quote:
cmd=%PROGRAMFILES%\SomeProgram\SomeProgram.exe


Again, many thanks VadiMGP.
Back to top
View user's profile Send private message Send e-mail
Balderstrom
Power Member
Power Member


Joined: 11 Oct 2005
Posts: 2024

PostPosted: Fri Aug 27, 2010 3:03 am    Post subject: Reply with quote

I had a heck of a time getting %P and %T passed thru, quoting doesn't seem to be working right when there were 2 separate paths being sent.

I tried numerous things, the final that worked was including an asterisk and ONE quote; and passing the result to cmd.exe to process/strip out the asterisk (*).
Quote:
Command: %TCDATA%\GUI\TCMenu.exe
Parameters: %%TCDATA%%\GUI\ToolBars\†\compareDirs.bar -D %X "%P*%T

Item#1 in compareDirs.bar
Quote:
cmd1=%wuBIN%\exCMD\TCMenu_SyncTool.cmd
param1=%D
iconic1=1
button1=%TCmd%,32
menu1=Sync Dirs (L-R)

Code:
::
:: TCMenu_SyncTool.cmd
::
FOR /F "usebackq tokens=1-2 delims=*" %%F IN ('%*') DO (
   START "" "%TCMD%" /S=S: /L="%%~F" /R="%%~G
)

Which sends:
START "" "C:\Program Files\TotalCMD\TotalCMD.exe" /S=S: /L="__LEFT-PATH__" /R="__RIGHT-PATH__"



NOTE: Some of the many things attempted:
Parameters: ... compareDirs.bar -X %X -P %P -T %T
Parameters: ... compareDirs.bar -D %X -P %P -T %T
Parameters: ... compareDirs.bar -D %X%P %T

And many different quoting placements, i.e. -D "%X%P %T, or "%P" "%T"
No matter what was tried I couldn't get both paths through unscathed.
Back to top
View user's profile Send private message Send e-mail
VadiMGP
Power Member
Power Member


Joined: 05 Apr 2003
Posts: 651
Location: Israel

PostPosted: Sat Aug 28, 2010 5:44 am    Post subject: Reply with quote

2Balderstrom
Please, read again 1st post of this topic. Wink
TCMenu fulfilled his destiny. RIP.
I think it is better to use built-in TC drop-down menu feature.

Christian, may be it is time to remove TCMenu from your tools page as obsolete tool?
http://www.ghisler.com/tools.htm
Back to top
View user's profile Send private message
rilley
Junior Member
Junior Member


Joined: 24 Aug 2008
Posts: 37

PostPosted: Thu Feb 16, 2012 4:56 am    Post subject: tcmenu 1.9 Reply with quote

Hello,

I hope I found the right thread to ask,

I am using TC 8 B 18 with tcmenu 1.9, I have a problem, If I need to use TCMENU under an archive, it gives me "This function cannot be use with packed files"

How can I make the TCMENU to work even if is in an archive file...

THANKS!
Back to top
View user's profile Send private message
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 4548
Location: Russian Federation

PostPosted: Thu Feb 16, 2012 6:35 am    Post subject: Reply with quote

rilley, just specify %Z once anywhere in the parameter string of TCMenu. Don't forget that TCMenu bar's buttons requires another parameters lists.
_________________
VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo…
Back to top
View user's profile Send private message Send e-mail
rilley
Junior Member
Junior Member


Joined: 24 Aug 2008
Posts: 37

PostPosted: Thu Feb 16, 2012 8:55 am    Post subject: Reply with quote

Thank you MVV, the %Z param did the trick

[em_set_tc1]
Cmd=%COMMANDER_PATH%\Plugins\Media\TCmenu\TCmenu.exe
Param="%%COMMANDER_PATH%%\skins\DEFAULT01.bar" -$ %Z

Another question: How about the position of the tcmenu object? How do you set it to start around the cursor mouse?

PS: my bar menu go to the middle of the screen, not the cursor position....
Back to top
View user's profile Send private message
Balderstrom
Power Member
Power Member


Joined: 11 Oct 2005
Posts: 2024

PostPosted: Thu Feb 16, 2012 12:08 pm    Post subject: Reply with quote

I don't believe that's possible. I was hoping MGP would release an updated version for TC8 (although I haven't tested under TC8 32bit)... Under Win7-64 and TC8 64bit all of the TCMenu's get aligned to the bottom of the screen.
Back to top
View user's profile Send private message Send e-mail
rilley
Junior Member
Junior Member


Joined: 24 Aug 2008
Posts: 37

PostPosted: Thu Feb 16, 2012 12:35 pm    Post subject: Reply with quote

Sorry, I was trying to say that it is align to the bottom of the screen,

And if could be a chance to align around the cursor position.....
Back to top
View user's profile Send private message
Balderstrom
Power Member
Power Member


Joined: 11 Oct 2005
Posts: 2024

PostPosted: Thu Feb 16, 2012 2:15 pm    Post subject: Reply with quote

I think it's probably because the ControlName of the buttonBar has changed in TC8-64 --- would likely be an easy fix.

Maybe MVV could mention it on the Russian TC boards, that's where VadiMGP hangs out...

I hate google-translating my requests for there as I've no idea how accurate it will be... I know when I've translated the thread there on TwinKey the machine language translators have some serious issues with Russian jokes/metaphors, nuances and various syntax - to the point where some posts made nearly no sense at all.
Back to top
View user's profile Send private message Send e-mail
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 4548
Location: Russian Federation

PostPosted: Fri Feb 17, 2012 12:52 am    Post subject: Reply with quote

Balderstrom,
Well, usually machine translators convert EN to RU much better than RU to EN (EN requires specific word order and many other nuances while RU allows more flexibility because of variable word endings etc).

BTW I can't understand how TCMenu detects menu position. It works in same strange way for TC 7.04a, TC 8b19, TC 7.56a. Sometimes it is shown just under mouse cursor, sometimes only X position of cursor is used (menu is shown at the bottom of the screen)...

However it seems that problem has been fixed in last beta version (may be found here).
_________________
VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo…
Back to top
View user's profile Send private message Send e-mail
rilley
Junior Member
Junior Member


Joined: 24 Aug 2008
Posts: 37

PostPosted: Fri Feb 17, 2012 3:30 am    Post subject: Reply with quote

@@However it seems that problem has been fixed in last beta version (may be found here).


I`ve tried tcmenu 2 beta 17, and is not fixed Sad


PS: I am using win 7 64 bit, with TC 8 beta 18 32 bit version
Back to top
View user's profile Send private message
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 4548
Location: Russian Federation

PostPosted: Fri Feb 17, 2012 4:09 am    Post subject: Reply with quote

I have tested it with TC8b19x32 on Win7x64Pro SP1.
_________________
VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo…
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Plugins and addons: devel.+support (English) All times are GMT - 6 Hours
Goto page Previous  1, 2, 3 ... 15, 16, 17, 18  Next
Page 16 of 18

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group