Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
|
Lista Forumurilor Pe Tematici
|
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login
POZE MRRRR'S FORUM (VIEW ONLY)
Nu sunteti logat.
|
Nou pe simpatie: andreutza43 Profile
 | Femeie 19 ani Bacau cauta Barbat 30 - 80 ani |
|
Mrrrr
AdMiN
 Inregistrat: acum 18 ani
Postari: 2270
|
|
Don't you simply want to sometimes do math without having to open calculator? By simply typing it somewhere and have the result real quick?
Of course, you can do it on your phone, but what if you could do it with Start - Run?
1. Create a bat file using the code below (give it any name you want)
@echo off setlocal
:: Check for input if "%~1"=="" ( echo Usage: calc 3365/5 pause exit /b )
:: Join all parameters into one expression set "expr=%~1" :loop shift if "%~1"=="" goto done set "expr=%expr% %~1" goto loop :done
:: Use PowerShell to evaluate for /f "delims=" %%A in ('powershell -command "try {[math]::Round((%expr%), 4)} catch { 'Error' }"') do set "result=%%A"
:: Show result echo %expr% = %result% echo %result%|clip msg * %expr% = %result%
endlocal |
2. Save the file wherever you want - I saved it in: D:\Custom APPS by Mrrrr - I named it: do math in start-run.bat
3. Open the Windows Registry and create an App Path entry - Win+R, type regedit, press Enter - navigate to: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths - right click the App Paths folder, New > Key - name the key: c.exe - you should now have: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\c.exe
4. In the folder where you saved you bat file, right click the bat file and select Copy as path - I got: "D:\Custom APPS by Mrrrr\do math in start-run.bat"
5. In regedit, inside key c.exe, under (Default) enter the full path to your bat file that you previously copied to clipboard - now you can close the registry editor
6. Press Win+R to start the Run dialog, then type: c 365/5+123-321/3 and press Enter - you will get a MsgBox displaying you the math you typed and the result - in this example the MsgBox will contain: 365/5+123-321/3 = 89 - let's verify that: 365/5 = 73+123 = 196-107 = 89
Source: ChatGPT
_______________________________________

|
|
pus acum 3 saptamani |
|