Detecting the number of opened tabs in browser
up vote
0
down vote
favorite
I have a batch file that will open a lot of tabs. But I am afraid that it will crush my computer. Is there any way to detect the opened/used tab? Is it possible to pause when tabs are 50?
Here is my code:
for /F "UseBackQ" %%M in ("%~dp0TrackingNumber.txt") do Call CheckM "%%M"
goto :End
:CheckM
rem check if tabs not more than 50
echo Browsing...
start "" https://sample.com/apps/trackorder?tracking_number=%~1
PING 127.0.0.1 -n 2 > nul
Goto:eof
:End
echo Done Browsing!
pause
batch-file
|
show 1 more comment
up vote
0
down vote
favorite
I have a batch file that will open a lot of tabs. But I am afraid that it will crush my computer. Is there any way to detect the opened/used tab? Is it possible to pause when tabs are 50?
Here is my code:
for /F "UseBackQ" %%M in ("%~dp0TrackingNumber.txt") do Call CheckM "%%M"
goto :End
:CheckM
rem check if tabs not more than 50
echo Browsing...
start "" https://sample.com/apps/trackorder?tracking_number=%~1
PING 127.0.0.1 -n 2 > nul
Goto:eof
:End
echo Done Browsing!
pause
batch-file
1
Each tab is a single program plus the main window is a single program. Tasklist will give you an ide how many are open. Seetasklist /fi "imagename eq iexplore.exe" /v | Find /c "iexplore"and if you know the titlebar you can use that as well.
– CatCat
Nov 22 at 4:16
3
that's not possible to determine since that information is internal to the browser. For example in Chrome the more extensions you have, the more processes will be created, even if you have only one tab. @CatCat that depends on the browser. Classic Firefox has only one process for all, and they they gradually introduced more processes for rendering and addons. And unlike Chrome, in FF Quantum the number of processes is limited to 4
– phuclv
Nov 22 at 5:01
Internet Explorer is part of the Windows SDK. It's the only one Windows programmers use as it's the only one that is programmable.
– CatCat
Nov 22 at 5:42
@CatCat who said that the OP is using IE? Starting a URL will open it in the default browser. And who said that other browsers are not programmable? Have you ever heard of Selenium?
– phuclv
Nov 22 at 6:09
He is a programmer.
– CatCat
Nov 22 at 6:31
|
show 1 more comment
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a batch file that will open a lot of tabs. But I am afraid that it will crush my computer. Is there any way to detect the opened/used tab? Is it possible to pause when tabs are 50?
Here is my code:
for /F "UseBackQ" %%M in ("%~dp0TrackingNumber.txt") do Call CheckM "%%M"
goto :End
:CheckM
rem check if tabs not more than 50
echo Browsing...
start "" https://sample.com/apps/trackorder?tracking_number=%~1
PING 127.0.0.1 -n 2 > nul
Goto:eof
:End
echo Done Browsing!
pause
batch-file
I have a batch file that will open a lot of tabs. But I am afraid that it will crush my computer. Is there any way to detect the opened/used tab? Is it possible to pause when tabs are 50?
Here is my code:
for /F "UseBackQ" %%M in ("%~dp0TrackingNumber.txt") do Call CheckM "%%M"
goto :End
:CheckM
rem check if tabs not more than 50
echo Browsing...
start "" https://sample.com/apps/trackorder?tracking_number=%~1
PING 127.0.0.1 -n 2 > nul
Goto:eof
:End
echo Done Browsing!
pause
batch-file
batch-file
edited Nov 22 at 16:37
double-beep
734117
734117
asked Nov 22 at 4:07
Regie Baguio
191112
191112
1
Each tab is a single program plus the main window is a single program. Tasklist will give you an ide how many are open. Seetasklist /fi "imagename eq iexplore.exe" /v | Find /c "iexplore"and if you know the titlebar you can use that as well.
– CatCat
Nov 22 at 4:16
3
that's not possible to determine since that information is internal to the browser. For example in Chrome the more extensions you have, the more processes will be created, even if you have only one tab. @CatCat that depends on the browser. Classic Firefox has only one process for all, and they they gradually introduced more processes for rendering and addons. And unlike Chrome, in FF Quantum the number of processes is limited to 4
– phuclv
Nov 22 at 5:01
Internet Explorer is part of the Windows SDK. It's the only one Windows programmers use as it's the only one that is programmable.
– CatCat
Nov 22 at 5:42
@CatCat who said that the OP is using IE? Starting a URL will open it in the default browser. And who said that other browsers are not programmable? Have you ever heard of Selenium?
– phuclv
Nov 22 at 6:09
He is a programmer.
– CatCat
Nov 22 at 6:31
|
show 1 more comment
1
Each tab is a single program plus the main window is a single program. Tasklist will give you an ide how many are open. Seetasklist /fi "imagename eq iexplore.exe" /v | Find /c "iexplore"and if you know the titlebar you can use that as well.
– CatCat
Nov 22 at 4:16
3
that's not possible to determine since that information is internal to the browser. For example in Chrome the more extensions you have, the more processes will be created, even if you have only one tab. @CatCat that depends on the browser. Classic Firefox has only one process for all, and they they gradually introduced more processes for rendering and addons. And unlike Chrome, in FF Quantum the number of processes is limited to 4
– phuclv
Nov 22 at 5:01
Internet Explorer is part of the Windows SDK. It's the only one Windows programmers use as it's the only one that is programmable.
– CatCat
Nov 22 at 5:42
@CatCat who said that the OP is using IE? Starting a URL will open it in the default browser. And who said that other browsers are not programmable? Have you ever heard of Selenium?
– phuclv
Nov 22 at 6:09
He is a programmer.
– CatCat
Nov 22 at 6:31
1
1
Each tab is a single program plus the main window is a single program. Tasklist will give you an ide how many are open. See
tasklist /fi "imagename eq iexplore.exe" /v | Find /c "iexplore" and if you know the titlebar you can use that as well.– CatCat
Nov 22 at 4:16
Each tab is a single program plus the main window is a single program. Tasklist will give you an ide how many are open. See
tasklist /fi "imagename eq iexplore.exe" /v | Find /c "iexplore" and if you know the titlebar you can use that as well.– CatCat
Nov 22 at 4:16
3
3
that's not possible to determine since that information is internal to the browser. For example in Chrome the more extensions you have, the more processes will be created, even if you have only one tab. @CatCat that depends on the browser. Classic Firefox has only one process for all, and they they gradually introduced more processes for rendering and addons. And unlike Chrome, in FF Quantum the number of processes is limited to 4
– phuclv
Nov 22 at 5:01
that's not possible to determine since that information is internal to the browser. For example in Chrome the more extensions you have, the more processes will be created, even if you have only one tab. @CatCat that depends on the browser. Classic Firefox has only one process for all, and they they gradually introduced more processes for rendering and addons. And unlike Chrome, in FF Quantum the number of processes is limited to 4
– phuclv
Nov 22 at 5:01
Internet Explorer is part of the Windows SDK. It's the only one Windows programmers use as it's the only one that is programmable.
– CatCat
Nov 22 at 5:42
Internet Explorer is part of the Windows SDK. It's the only one Windows programmers use as it's the only one that is programmable.
– CatCat
Nov 22 at 5:42
@CatCat who said that the OP is using IE? Starting a URL will open it in the default browser. And who said that other browsers are not programmable? Have you ever heard of Selenium?
– phuclv
Nov 22 at 6:09
@CatCat who said that the OP is using IE? Starting a URL will open it in the default browser. And who said that other browsers are not programmable? Have you ever heard of Selenium?
– phuclv
Nov 22 at 6:09
He is a programmer.
– CatCat
Nov 22 at 6:31
He is a programmer.
– CatCat
Nov 22 at 6:31
|
show 1 more comment
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53423747%2fdetecting-the-number-of-opened-tabs-in-browser%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Each tab is a single program plus the main window is a single program. Tasklist will give you an ide how many are open. See
tasklist /fi "imagename eq iexplore.exe" /v | Find /c "iexplore"and if you know the titlebar you can use that as well.– CatCat
Nov 22 at 4:16
3
that's not possible to determine since that information is internal to the browser. For example in Chrome the more extensions you have, the more processes will be created, even if you have only one tab. @CatCat that depends on the browser. Classic Firefox has only one process for all, and they they gradually introduced more processes for rendering and addons. And unlike Chrome, in FF Quantum the number of processes is limited to 4
– phuclv
Nov 22 at 5:01
Internet Explorer is part of the Windows SDK. It's the only one Windows programmers use as it's the only one that is programmable.
– CatCat
Nov 22 at 5:42
@CatCat who said that the OP is using IE? Starting a URL will open it in the default browser. And who said that other browsers are not programmable? Have you ever heard of Selenium?
– phuclv
Nov 22 at 6:09
He is a programmer.
– CatCat
Nov 22 at 6:31