Greetings,
I need a button with two operation: when it is pressed normally, a code in Standard Function (opus or external) mode be executed and when it is pressed in combination with CTRL, another code in MS-DOS Batch Function mode be executed. Is it possible? I cannot found any modifier to fire MS-DOS Batch Function under Standard Function (opus or external) (or vise versa). Or might an external BAT file is the only way?
What are the actual commands?
@filesonly
@keydown:none
@Set Pat = {RS|Enter your selected pattern}
SET FLATVIEW=Grouped
SELECT PATTERN={$Pat} TYPE=files MAKEVISIBLE
@keydown:ctrl
@externalonly
Title Converting a NRG Image to ISO Image
Color 1E
Echo.
Echo.
Echo.
@sync C:\NRG2ISO\DOSnrg2iso.exe "{s}{o|noext}.nrg" "{d}{o|noext}.iso"
Echo. a
I think you can remove the @externalonly and then just make the button run as an MS-DOS button. The set/select commands can be part of a DOS button so long as @externalonly isn't used.
You should also add @nofilenamequoting since you've got the quotes added by hand.
Superb as always. Just one more question: When we can use DOpus commands under MS-DOS mode without any problem, why there is a Standard mode too? What is the problem if we always use MS-DOS mode with @runmode hide in any situation and for every command?
Because DOS Batch is an abomination that you don't want to go near unless actually necessary.
Oh! and a missed question: when a modifier is used under a keydown, the other part of the code that is defined under another keydown will be affected by it too?
Each keydown starts a new section, independent of the previous one.
Thanks. This question was because you told "The set/select commands can be part of a DOS button so long as @externalonly isn't used", so I thought modifiers are global; because the set/select commands was used under another keydown in my code.
Thank you again.
Oh, the modifiers may be global. I'm not sure to be honest.