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









share|improve this question




















  • 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















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









share|improve this question




















  • 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













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









share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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. 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














  • 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








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

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Lallio

Futebolista

Jornalista