Jump to content

Help with batch!

Go to solution Solved by Gala,

You need to replace spaces with a "+" in the code, as google uses + instad of spaces. How to do that? No idea.

Hello LTT forum members.

Due to the fact that i've been quite bored lately I got back to batch coding.

So my problem right now is, that i cant get the "set /p blabla=" command to work with spacebars!

Is there any way to fix that? D:

Thx :D

Here is the code: 

 

@Echo off
 
color F9
title ****Santipros Search Engine****
 
:search
cls
echo.
echo.
echo ********************************************************************************
echo.
echo This is Santipros Searc Engine (SSE).
echo Please type in what you want to look for.
echo.
echo ********************************************************************************
echo.
echo I am looking for:
set /p web_url=                                                                            <--- At this part when I type in "Deez nuts" for example it will only detect "deez"
start www.google.de/search?q=%web_url%
goto search

OS: Windows 10 Pro | Case: Corsair Obsidian 750D | CPU: Ryzen 9 5900x | CPU Cooler: Corsair Hydro H110 | Mainboard: ASUS ROG Strix X570-E | RAM: 2x 16GB Crucial Ballistix DDR4 @3600MHz | GPU: Inno3D GeForce GTX 980 iChill X4 Air Boss Ultra | Main SSD: 1TB Corsair MP600 NVME | SSD1: 250GB Samsung 840 EVO SSD | SSD2: 500GB Samsung 850 EVO SSD | HDD1: WD Green 1000GB | HDD2: WD Green 2TB | PSU: Corsair AX860 | Mouse: Logitech G Pro Wireless | Keyboard: Logitech G513 | Headset: Logitech G933 | Monitors: ASUS ROG PG248Q & LG 29UM65-P

Link to comment
https://linustechtips.com/topic/374418-help-with-batch/
Share on other sites

Link to post
Share on other sites

 

Hello LTT forum members.

Due to the fact that i've been quite bored lately I got back to batch coding.

So my problem right now is, that i cant get the "set /p blabla=" command to work with spacebars!

Is there any way to fix that? D:

Thx :D

Here is the code: 

 

@Echo off
 
color F9
title ****Santipros Search Engine****
 
:search
cls
echo.
echo.
echo ********************************************************************************
echo.
echo This is Santipros Searc Engine (SSE).
echo Please type in what you want to look for.
echo.
echo ********************************************************************************
echo.
echo I am looking for:
set /p web_url=                                                                            <--- At this part when I type in "Deez nuts" for example it will only detect "deez"
start www.google.de/search?q=%web_url%
goto search

 

Use quotes

Primary: Lenovo T61 / Intel Core2Duo T7200 @ 2.2GHz / 3GB DDR2 / NVIDIA Quadro NVS 140M / Fedora 22 <<<< THE WHITE KNIGHT

Secondary: Compaq Presario CQ56 / AMD V130 @ 2.3GHz / 2GB DDR3 / AMD Radeon HD 4250 / Windows 8.1 <<< THE FORGOTTEN HERO

Link to comment
https://linustechtips.com/topic/374418-help-with-batch/#findComment-5064379
Share on other sites

Link to post
Share on other sites

Use quotes

How exactly? :unsure:

Srry kinda forgot everything... xD

OS: Windows 10 Pro | Case: Corsair Obsidian 750D | CPU: Ryzen 9 5900x | CPU Cooler: Corsair Hydro H110 | Mainboard: ASUS ROG Strix X570-E | RAM: 2x 16GB Crucial Ballistix DDR4 @3600MHz | GPU: Inno3D GeForce GTX 980 iChill X4 Air Boss Ultra | Main SSD: 1TB Corsair MP600 NVME | SSD1: 250GB Samsung 840 EVO SSD | SSD2: 500GB Samsung 850 EVO SSD | HDD1: WD Green 1000GB | HDD2: WD Green 2TB | PSU: Corsair AX860 | Mouse: Logitech G Pro Wireless | Keyboard: Logitech G513 | Headset: Logitech G933 | Monitors: ASUS ROG PG248Q & LG 29UM65-P

Link to comment
https://linustechtips.com/topic/374418-help-with-batch/#findComment-5064397
Share on other sites

Link to post
Share on other sites

How exactly? :unsure:

Srry kinda forgot everything... xD

 

Sorry my bad didnt view your code lol

working on it..wait a lil xD

Primary: Lenovo T61 / Intel Core2Duo T7200 @ 2.2GHz / 3GB DDR2 / NVIDIA Quadro NVS 140M / Fedora 22 <<<< THE WHITE KNIGHT

Secondary: Compaq Presario CQ56 / AMD V130 @ 2.3GHz / 2GB DDR3 / AMD Radeon HD 4250 / Windows 8.1 <<< THE FORGOTTEN HERO

Link to comment
https://linustechtips.com/topic/374418-help-with-batch/#findComment-5064429
Share on other sites

Link to post
Share on other sites

Sorry my bad didnt view your code lol

working on it..wait a lil xD

thx :D

OS: Windows 10 Pro | Case: Corsair Obsidian 750D | CPU: Ryzen 9 5900x | CPU Cooler: Corsair Hydro H110 | Mainboard: ASUS ROG Strix X570-E | RAM: 2x 16GB Crucial Ballistix DDR4 @3600MHz | GPU: Inno3D GeForce GTX 980 iChill X4 Air Boss Ultra | Main SSD: 1TB Corsair MP600 NVME | SSD1: 250GB Samsung 840 EVO SSD | SSD2: 500GB Samsung 850 EVO SSD | HDD1: WD Green 1000GB | HDD2: WD Green 2TB | PSU: Corsair AX860 | Mouse: Logitech G Pro Wireless | Keyboard: Logitech G513 | Headset: Logitech G933 | Monitors: ASUS ROG PG248Q & LG 29UM65-P

Link to comment
https://linustechtips.com/topic/374418-help-with-batch/#findComment-5064452
Share on other sites

Link to post
Share on other sites

You need to replace spaces with a "+" in the code, as google uses + instad of spaces. How to do that? No idea.

Primary: Lenovo T61 / Intel Core2Duo T7200 @ 2.2GHz / 3GB DDR2 / NVIDIA Quadro NVS 140M / Fedora 22 <<<< THE WHITE KNIGHT

Secondary: Compaq Presario CQ56 / AMD V130 @ 2.3GHz / 2GB DDR3 / AMD Radeon HD 4250 / Windows 8.1 <<< THE FORGOTTEN HERO

Link to comment
https://linustechtips.com/topic/374418-help-with-batch/#findComment-5064491
Share on other sites

Link to post
Share on other sites

You need to replace spaces with a "+" in the code, as google uses + instad of spaces. How to do that? No idea.

ill find a way... thx tho ... :D

OS: Windows 10 Pro | Case: Corsair Obsidian 750D | CPU: Ryzen 9 5900x | CPU Cooler: Corsair Hydro H110 | Mainboard: ASUS ROG Strix X570-E | RAM: 2x 16GB Crucial Ballistix DDR4 @3600MHz | GPU: Inno3D GeForce GTX 980 iChill X4 Air Boss Ultra | Main SSD: 1TB Corsair MP600 NVME | SSD1: 250GB Samsung 840 EVO SSD | SSD2: 500GB Samsung 850 EVO SSD | HDD1: WD Green 1000GB | HDD2: WD Green 2TB | PSU: Corsair AX860 | Mouse: Logitech G Pro Wireless | Keyboard: Logitech G513 | Headset: Logitech G933 | Monitors: ASUS ROG PG248Q & LG 29UM65-P

Link to comment
https://linustechtips.com/topic/374418-help-with-batch/#findComment-5064562
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×