Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider becoming a contibuting member by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

i need to make a batch file that will change a rom in daomon tools,,,

i can do all of it if i know the command that will pause the batch file untill a certain key is pressed,

is there a switch that follows the pause command or something

any ideas

Posted
batch file? AHK file? AI file? There are a lot of choices, but if you use batch, you can use "pause"

Pause will wait for any key to continue... Not a specific key... AHK would really be the way to go.. but if you want to try dos Id try the choice command (NOTE: This is just an example.... Obvoiusly you make your choice keys mount an image ;) )

Waits for the user to choose one of a set of choices.

CHOICE [ /C[:]choices ] [ /N ] [ /S ] [ /T[:]c,nn ] text

/C:choices Specifies allowable keys.

Default for English versions is YN

/N Do not display choices an ? at end of prompt string.

/S Treat choice keys as case sensitive.

/T:c,nn Default choice to c after nn seconds.

text Prompt string to display.

ERRORLEVEL is set to the offset of the key the user presses on choices.

Examples:

1. The command:

CHOICE Do yo really want to quit

Will display the following line:

Do yo really want to quit? [YN]

If the user presses Y, CHOICE exits with return code ("errorlevel") 1 (1st character in choices), if the user presse N, CHOICE exits with return code 2 (2nd character in choices).

2. CHOICE /C:ABCDN /N /T:N,10 Format drive A:, B:, C:, D: or None?

IF ERRORLEVEL 1 SET DRIVE=drive A:

IF ERRORLEVEL 2 SET DRIVE=drive B:

IF ERRORLEVEL 3 SET DRIVE=drive C:

IF ERRORLEVEL 4 SET DRIVE=drive D:

IF ERRORLEVEL 5 SET DRIVE=None

ECHO You chose to format %DRIVE%

The CHOICE command in this example will prompt the user with the following line:

Format drive A:, B:, C:, D: or None?

If the user presses C, CHOICE exits with a return code ("errorlevel") 3 (3rd character in choices).

The IF ERRORLEVEL checks for 1, 2 and 3 are true (see the errorlevel page for an explanation of errorlevels), so the variable DRIVE will be set to "drive A:" first, then to "drive B:", and finaly to "drive C:".

So the ECHO command will display the line:

You chose to format drive C:

Posted
Pause will wait for any key to continue... Not a specific key... AHK would really be the way to go.. but if you want to try dos Id try the choice command (NOTE: This is just an example.... Obvoiusly you make your choice keys mount an image ;) )

Waits for the user to choose one of a set of choices.

CHOICE [ /C[:]choices ] [ /N ] [ /S ] [ /T[:]c,nn ] text

/C:choices Specifies allowable keys.

Default for English versions is YN

/N Do not display choices an ? at end of prompt string.

/S Treat choice keys as case sensitive.

/T:c,nn Default choice to c after nn seconds.

text Prompt string to display.

ERRORLEVEL is set to the offset of the key the user presses on choices.

Examples:

1. The command:that

CHOICE Do yo really want to quit

Will display the following line:

Do yo really want to quit? [YN]

If the user presses Y, CHOICE exits with return code ("errorlevel") 1 (1st character in choices), if the user presse N, CHOICE exits with return code 2 (2nd character in choices).

2. CHOICE /C:ABCDN /N /T:N,10 Format drive A:, B:, C:, D: or None?

IF ERRORLEVEL 1 SET DRIVE=drive A:

IF ERRORLEVEL 2 SET DRIVE=drive B:

IF ERRORLEVEL 3 SET DRIVE=drive C:

IF ERRORLEVEL 4 SET DRIVE=drive D:

IF ERRORLEVEL 5 SET DRIVE=None

ECHO You chose to format %DRIVE%

The CHOICE command in this example will prompt the user with the following line:

Format drive A:, B:, C:, D: or None?

If the user presses C, CHOICE exits with a return code ("errorlevel") 3 (3rd character in choices).

The IF ERRORLEVEL checks for 1, 2 and 3 are true (see the errorlevel page for an explanation of errorlevels), so the variable DRIVE will be set to "drive A:" first, then to "drive B:", and finaly to "drive C:".

So the ECHO command will display the line:

You chose to format drive C:

that actually sounds like the thing im after,,,

i'll look into it thanx

Guest
This topic is now closed to further replies.
×
×
  • Create New...