
https://gamejolt.com/games/calm-until-n ... -rpg/20411 here's the link..
And anyone who would like to help me in my game dm me I need some help in batch. I'm fairly new in batch, just 6 months.
Moderator: DosItHelp
Code: Select all
@echo off
setlocal enableExtensions disableDelayedExpansion
pushd "Z:"
for /f "tokens=* delims=" %%a in ('dir /a:d /b /s "*"') do (
for %%b in ("%%~a\*.bat") do (
findstr /M /I "echo" "%%~fb"
)
)
popd
goto :eof
Code: Select all
%__AppDir__%findstr.exe /IS "Echo" Z:\*.bat
Have you consider using a game engine? https://www.youtube.com/watch?v=Wi3izdqbwcwVats wrote: ↑03 Jun 2021 06:56https://www.facebook.com/groups/textpuz ... 929744615/
I want to do this in batch. Uh, I understand that the glowy effect is not possible. But can anyone please design one with the colours, any colors would work.![]()
Please it should only take 10 seconds or less.
Thanks in advance!
I had also made one but it is not that good.
You could concievable use steffans printbmp tool at: viewtopic.php?t=9869Vats wrote: ↑04 Jun 2021 05:13Thanks terry,
one more question, in my game I am making a coin feature, and i want a coin image beside its left. Is there any bitmap ( pixel like ) figure or view i can add to it and how? I know i can add bmps in a . bat with a tool ( forgot its name ), but is there any possible way, with a tool or something?
Heres the code for the multi select menu. The choice command is used to make selections, and the key pressed is used as the index for the array of possible selections passed to the menu macro upon expansion. To facilitate multiple selections, a loop is used to repeat the menu until the user makes the selection to continue.Edit: @terry how did u make a multi select batch menu, and if you have discord send me your tag, i am avaliable there
Code: Select all
::: Multi-Use Menu :: Author - T3RRY :: Version 4.2 :: October 2020 ::
::: %Menu% macro - accepts up to 36 options for selection as quoted Args in list form.
::: parameters to call functions with via a given menu can be supplied using Substring modification as exampled.
::: - Multiple selection of menu items achieved using loops.
::: Default is to assume a menu option is a label to be called. If the label doesn't exist error is suppressed and the option is added as a quoted ...
::: ... string to the #Sel Variable for assessment - builds a list of selected options [ that can be deselected ] when used in a loop.
::: Windows 10 users will experience faster display of menus thanks to VT codes
::: Users not running Windows 10 are compensated with more dynamic color output from :C_Out when using the menu.
::: "&&" and "||" conditional operators are used heavily to control script flow, and are used with findstr as an alternative to ...
::: ... If Not "!Errorlevel!" == "0" (Command)Else (other command) statements.
@Echo off & Goto :Main
:::::::::::::::::::::::::: [* Balances Environment stack on script completion *]
:End [Endlocal ^& Set "_End=Y" ^& Exit /B 0]
Color 07 & %CLOSE%
:::::::::::::::::::::::::::::::::::::::::::::: Findstr based Colorprint function
::: No longer used within menu macro
::: Unsupported Chars: "<" ">" ":" "\" "/" "?" "&"
:C_out [BG:a-f|0-9][FG:a-f|0-9] ["Quoted Strings" "to print"]
Set "Str_=%*" & Set "_Str=" & For %%G in (!Str_!)Do Set "_Str=!_Str! %%~G"
Set "C_Out=%~1"
Set "_Str=!_Str:%1 =!" & For /F "Delims=" %%G in ("!_Str!")Do Set "_Str=%%~G"
For %%G in (!_Str!) Do Set ".Str=%%G"
If /I "!.Str!" == "Exit" (Set "C_Out=04") Else If /I "!.Str!" == "Next" (Set "C_Out=02") Else If /I "!.Str!" == "Continue" (Set "C_Out=02") Else If /I "!.Str!" == "Back" (Set "C_Out=05") Else If /I "!.Str!" == "Return" (Set "C_Out=05")
<nul set /p ".=%DEL%" > " !_Str!"
findstr /v /a:!C_Out! /R "^$" " !_Str!" nul
del " !_Str!" > nul 2>&1
Echo/
Exit /B 0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Key variable and Macro definition
:main
::::::::::::::::::::: [ For readablities sake - %Menu% macro is built from the following ]:
rem ::: Order of definition must be preserved.
rem [* prepare default findstr color for non windows 10 users *]
For /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (set "DEL=%%a")
rem [* default color args for Picked / Not Picked options. Overriden to Echo with Ascii Escape codes if Windows 10 *]
rem [* Color /? for the full combination of colors - BG + FG colors must differ. [BG:a-f|0-9][FG:a-f|0-9] *]
Set "ColText=For %%l in (1 2)Do if %%l==2 (Set "_Str="&(Set "C_Out=!Oline:~0,2!" & Set "_Str=!Oline:~3!")&(For %%s in (!_Str!)Do Set ".Str=%%s")&(If /I "!.Str!" == "Exit" (Set "C_Out=04") Else If /I "!.Str!" == "Next" (Set "C_Out=02") Else If /I "!.Str!" == "Continue" (Set "C_Out=02") Else If /I "!.Str!" == "Back" (Set "C_Out=05") Else If /I "!.Str!" == "Return" (Set "C_Out=05"))&( <nul set /p ".=%DEL%" > " !_Str!" )&( findstr /v /a:!C_Out! /R "^$" " !_Str!" nul )&( del " !_Str!" > nul 2>&1 )& Echo/)Else Set Oline="
Set "_Win10="
Set "_End="
rem [* Test if Windows 10 If true Overide defaults _nP and _P with Echo and VT codes for faster execution with windows 10 *]
wmic OS get OSArchitecture,caption | FIND "10" >nul && ((For /F %%a in ('echo prompt $E ^| cmd')do Set "\E=%%a")&Set "_Win10=_")
If Defined _Win10 (
Set "_nP=Echo/%\E%[90m"& Set "_P=Echo/%\E%[33m"
Echo/Menu Color mode: [L]egacy [W]indows [D]isabled & For /F "Delims=" %%C in (' Choice /N /C:LWD ')Do (
If "%%C" =="L" (
Set "_nP=For %%l in (1 2)Do if %%l==2 (Set "_Str="&(Set "C_Out=!Oline:~0,2!" & Set "_Str=!Oline:~3!")&(For %%s in (!_Str!)Do Set ".Str=%%s")&(If /I "!.Str!" == "Exit" (Set "C_Out=04") Else If /I "!.Str!" == "Next" (Set "C_Out=02") Else If /I "!.Str!" == "Continue" (Set "C_Out=02") Else If /I "!.Str!" == "Back" (Set "C_Out=05") Else If /I "!.Str!" == "Return" (Set "C_Out=05"))&( <nul set /p ".=%DEL%" > " !_Str!" )&( findstr /v /a:!C_Out! /R "^$" " !_Str!" nul )&( del " !_Str!" > nul 2>&1 )& Echo/)Else Set Oline=08"
Set "_P=For %%l in (1 2)Do if %%l==2 (Set "_Str="&(Set "C_Out=!Oline:~0,2!" & Set "_Str=!Oline:~3!")&(For %%s in (!_Str!)Do Set ".Str=%%s")&(If /I "!.Str!" == "Exit" (Set "C_Out=04") Else If /I "!.Str!" == "Next" (Set "C_Out=02") Else If /I "!.Str!" == "Continue" (Set "C_Out=02") Else If /I "!.Str!" == "Back" (Set "C_Out=05") Else If /I "!.Str!" == "Return" (Set "C_Out=05"))&( <nul set /p ".=%DEL%" > " !_Str!" )&( findstr /v /a:!C_Out! /R "^$" " !_Str!" nul )&( del " !_Str!" > nul 2>&1 )& Echo/)Else Set Oline=06"
)
If "%%C" =="D" (Set "_nP=Echo/"& Set "_P=Echo/")
)
) Else (
Set "_nP=For %%l in (1 2)Do if %%l==2 (Set "_Str="&(Set "C_Out=!Oline:~0,2!" & Set "_Str=!Oline:~3!")&(For %%s in (!_Str!)Do Set ".Str=%%s")&(If /I "!.Str!" == "Exit" (Set "C_Out=04") Else If /I "!.Str!" == "Next" (Set "C_Out=02") Else If /I "!.Str!" == "Continue" (Set "C_Out=02") Else If /I "!.Str!" == "Back" (Set "C_Out=05") Else If /I "!.Str!" == "Return" (Set "C_Out=05"))&( <nul set /p ".=%DEL%" > " !_Str!" )&( findstr /v /a:!C_Out! /R "^$" " !_Str!" nul )&( del " !_Str!" > nul 2>&1 )& Echo/)Else Set Oline=08"
Set "_P=For %%l in (1 2)Do if %%l==2 (Set "_Str="&(Set "C_Out=!Oline:~0,2!" & Set "_Str=!Oline:~3!")&(For %%s in (!_Str!)Do Set ".Str=%%s")&(If /I "!.Str!" == "Exit" (Set "C_Out=04") Else If /I "!.Str!" == "Next" (Set "C_Out=02") Else If /I "!.Str!" == "Continue" (Set "C_Out=02") Else If /I "!.Str!" == "Back" (Set "C_Out=05") Else If /I "!.Str!" == "Return" (Set "C_Out=05"))&( <nul set /p ".=%DEL%" > " !_Str!" )&( findstr /v /a:!C_Out! /R "^$" " !_Str!" nul )&( del " !_Str!" > nul 2>&1 )& Echo/)Else Set Oline=06"
Echo/Menu Color mode: [L]egacy [D]isabled & For /F "Delims=" %%C in (' Choice /N /C:LD ')Do If "%%C" =="D" (Set "_nP=Echo/"& Set "_P=Echo/")
)
)
rem [* Menu supports 36 choices using _O array index with substring modification on _Cho var to index choice selection of Array Elements *]
Set "_Cho=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Set "DisplayArray=(Echo/!#Sel!| Findstr /LIC:"%%~G" > Nul 2> Nul && ( %_P% [!_Cho:~%%z,1!] X %%~G ) ) || ( %_nP% [!_Cho:~%%z,1!] - %%~G )"
Set "#Sel=_Nil"
Set "ClearArray=(For /F "Tokens=1,2 Delims==" %%i in (' Set Opt[ 2^> Nul ')Do "Set %%i=")"
Set "ResetVars=(Set "#L=F" & Set "OptL=" & Set "_O=0")"
Set "CLOSE=POPD & Endlocal & Set "_End=Y" & Exit /B 0"
Set "BuildArray=((If !_O! GTR 35 (Call :C_Out 04 "Maximum options [!_O!] Exceeded" & (Timeout /T 5 /NOBREAK) & %CLOSE%))&Set "OptL=!OptL!!_Cho:~%%z,1!"&Set "Opt[!_Cho:~%%z,1!]=%%~G")"
Set "MakeChoice=(For /F "Delims=" %%C in ('Choice /N /C:!OptL!')Do findstr.exe /BLIC:":!Opt[%%C]!" "%~F0" > nul 2> nul && Call :!Opt[%%C]! "Param" 2> Nul || (For %%. in (!#Sel!)do if "!Opt[%%C]!" == "%%~." (Set /A "_F=(!_F!+1) %%2" & If "!_F!" == "0" For /F "Delims=" %%r in ("!Opt[%%C]!")Do If Not "!#Sel!" == "" (Set "#Sel=!#Sel:"%%r"=!") Else (Set "#Sel=_Nil"))) Else (Set "#Sel=!#Sel! "!Opt[%%C]!""))"
Set "MakeChoice=(For /F "Delims=" %%C in ('Choice /N /C:!OptL!')Do findstr.exe /BLIC:":!Opt[%%C]!" "%~F0" > nul 2> nul && Call :!Opt[%%C]! "Param" 2> Nul || ((Echo/"!#Sel!"| Findstr /LIC:"!Opt[%%C]!" > Nul 2> Nul && (For /F "Delims=" %%r in ("!Opt[%%C]!")Do If Not "!#Sel!" == "" (Set "#Sel=!#Sel:"%%r"=!")Else (Set "#Sel=_Nil"))) || (Set "#Sel=!#Sel! "!Opt[%%C]!"")))"
Set "Return=For /L %%s in (0 1 4)Do (If not "!#Sel!" == "" (If "!#Sel:~0,1!" == " " (If "!#L!" == "F" (Set "#Sel=!#Sel:~1!"))Else (Set "#L=T"))Else (Set "#Sel=_Nil"))&if not "!#Sel!" == "_Nil" if not "!#Sel!" == "" (Set "#Sel=!#Sel:_Nil=!")"
Set "Menu=(If defined _End Goto :End) &For %%n in (1 2)Do if %%n==2 (%ClearArray% & %ResetVars% &(For %%G in (!Options!)Do For %%z in (!_O!)Do %BuildArray% & %DisplayArray% &Set /A "_O+=1")& %MakeChoice% & %Return% )Else Set Options="
For %%M in ( ClearArray ResetVars BuildArray DisplayArray MakeChoice Return )Do Set "%%M="
IF NOT EXIST "%TEMP%\colorize" md "%TEMP%\colorize"
PUSHD "%TEMP%\colorize" || (Echo/"%TEMP%\colorize" Could not be found & %CLOSE%)
Setlocal EnableExtensions EnableDelayedExpansion & REM [* required to be activated AFTER definition of Macro's. *]
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Commence script main body | Demonstration of usages
:Loop
rem [* doublequoting of options recommended - Required for strings containing standard delimiters. *]
If not defined _End cls
If not defined _End %ColText%05 Make a selection.
rem [* Param Substring modification examples passing parameters to labels called when selected - Optional feature. *]
Set /A "PRM=!Random! %%100 + 100" & Rem [* Example param only *]
%Menu:Param=PRM% "Exit" "Next" "Option 1" "Option 2" "Option 3" "Option 4"
Echo/"!#Sel!" | Findstr.exe /LIC:"Exit" > Nul 2> Nul && (Goto :End)
Goto :Loop
:Next
rem [* Selection of a single option occurs by using the macro without a loop or resetting the #Sel variable
rem - between %menu% use and next iteration of a loop *]
rem [* Process #Sel items using the !#Sel! variable - then ** SET "#Sel-_Nil" prior to next usage of Menu macro** *]
Set "Menu1Opts=!#Sel!"
Set "#Sel="
Cls
Call :C_Out 03 "[Demo - Parameter usage. %%1 ~ '%1' == '!%~1!' ] Selected =" !Menu1opts!
%Menu% "Exit" " + Continue" ".. Back"
Echo/!#Sel! | Findstr.exe /LIC:".. Back" > Nul 2> Nul && (Set "#Sel=!Menu1opts!"& Exit /B 0)
Echo/!#Sel! | Findstr.exe /LIC:"Exit" > Nul 2> Nul && (%CLOSE%)
Set "#Sel="
Echo/!Menu1opts! | Findstr.exe /LIC:"_Nil" > Nul 2> Nul && (Call :C_Out 04 "Selection Required."&(Pause & Exit /B 0)) || Call :C_Out 02 "Confirmed=" !Menu1opts!
Call :C_Out 02 "Example complete."
Pause
rem [* to exit at end of script or by user selection *]
%CLOSE%
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: End of example
I've not encountered a 3rd party exe that can satisfactorily report mouse click positions correctly for any given line and column position of the console.
After a bit of digging around and testing I've found a suitable mouse input tool - Mouse.exe by IcarusLiaves at topic: viewtopic.php?t=9222