Internal command for confirmation dialogue?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Helix751
Senior Member
Senior Member
Posts: 231
Joined: 2004-06-16, 21:16 UTC
Location: Chile

Internal command for confirmation dialogue?

Post by *Helix751 »

Hi. I need a confirmation dialogue before launching a (dangerous) command with a button, to avoid running it unwantedly.

Something like a standard Windows [Ok] [Cancel] dialogue.

I thought I could find some in the internal commands list but there's nothing for this.

Is there a way to get this done?
Regards,
Sergio

TCmd license #12059
TC11.03x86/x64 | Win11 Pro
User avatar
petermad
Power Member
Power Member
Posts: 14806
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Internal command for confirmation dialogue?

Post by *petermad »

2Helix751
Put a ? in the start of the Parameters field of the button - then you will get a dialog, that you can cancel.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2308
Joined: 2020-01-18, 04:03 UTC

Re: Internal command for confirmation dialogue?

Post by *Fla$her »

2Helix751
Example: nircmd.exe qboxcom "Are you sure you want to continue?" " Total Commander" win sendmsg foreground 1075 3302
Instead of the question and the command index (3302), specify your data.
Overquoting is evil! 👎
User avatar
Helix751
Senior Member
Senior Member
Posts: 231
Joined: 2004-06-16, 21:16 UTC
Location: Chile

Re: Internal command for confirmation dialogue?

Post by *Helix751 »

petermad wrote: 2022-11-05, 12:41 UTC 2Helix751
Put a ? in the start of the Parameters field of the button - then you will get a dialog, that you can cancel.
This seems to be a nice alternative. I was aware of the '?' parameter dialogue but this is a clever use for it.
Fla$her wrote: 2022-11-06, 08:36 UTC 2Helix751
Example: nircmd.exe qboxcom "Are you sure you want to continue?" " Total Commander" win sendmsg foreground 1075 3302
Instead of the question and the command index (3302), specify your data.
Thanks for this, too. Is the command index a TCmd internal command code? If so, do I have to define a User command with the command I want to lauch upon accepting the dialogue?
Regards,
Sergio

TCmd license #12059
TC11.03x86/x64 | Win11 Pro
Fla$her
Power Member
Power Member
Posts: 2308
Joined: 2020-01-18, 04:03 UTC

Re: Internal command for confirmation dialogue?

Post by *Fla$her »

Helix751 wrote: 2022-11-06, 20:12 UTCIs the command index a TCmd internal command code?
Yep.
Helix751 wrote: 2022-11-06, 20:12 UTCIf so, do I have to define a User command with the command I want to lauch upon accepting the dialogue?
If you need a custom command, then you will have to configure a command for Start menu that will have its own index.
Overquoting is evil! 👎
User avatar
Stefan2
Power Member
Power Member
Posts: 4157
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Internal command for confirmation dialogue?

Post by *Stefan2 »

Helix751 wrote: 2022-11-06, 20:12 UTC Is the command index a TCmd internal command code?
If so, do I have to define a User command with the command I want to lauch upon accepting the dialogue?


For internal commands like 3302 see the text file named TOTALCMD.INC

If you want to create an own command, you would have to create a UserDefinedCommand in usercmd.ini
But to send a UDC from extern to TC you must utilize another send method which nircmd , afaik, do not support. (with AHK it is possible)
..sorry, long time not done..

Alas That's why the idea "to configure a command for Start menu" as that commands have internal command numbers too,
for that again see TOTALCMD.INC >>> cm_UserMenu1=701;Start first menu item in Start menu , here you would use 701 instead of 3302.





more behind the link in my sig
Fla$her
Power Member
Power Member
Posts: 2308
Joined: 2020-01-18, 04:03 UTC

Re: Internal command for confirmation dialogue?

Post by *Fla$her »

Stefan2 wrote: 2022-11-07, 07:37 UTCFor internal commands like 3302 see the text file named TOTALCMD.INC
It's easier to look through cm_CommandBrowser.
Stefan2 wrote: 2022-11-07, 07:37 UTCAlas the idea "to configure a command for Start menu" as that commands have internal command numbers too
Why alas?
Overquoting is evil! 👎
User avatar
Stefan2
Power Member
Power Member
Posts: 4157
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Internal command for confirmation dialogue?

Post by *Stefan2 »

Fla$her wrote: 2022-11-07, 07:46 UTC Why alas?
Sorry ;-) , wrong assuming on my side, I thought that word has a different meaning.






 
Post Reply