Jump to content

close youtube when opening game launcher


Recommended Posts

1.

dont know if ProcessWait can handle multi process list but WinWait shud handle them so instead ProcessWait you can try to use this if im not wrong

WinWait('[REGEXPTITLE:.?(winnameone1|winname2|winname3).?]', '', 10); this shud wait with diffrent win names before responding

to get win names you can use window info tool (its in the start meny) that is instaled together with autoit

2.

While 1; you put this on top before your code that need to loop

;you put heare your code that need to loop

Wend;you put this on end of your code that need to loop

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

1.

dont know if ProcessWait can handle multi process list but WinWait shud handle them so instead ProcessWait you can try to use this if im not wrong

WinWait('[REGEXPTITLE:.?(winnameone1|winname2|winname3).?]', '', 10); this shud wait with diffrent win names before responding

to get win names you can use window info tool (its in the start meny) that is instaled together with autoit

2.

While 1; you put this on top before your code

;you put heare your code that need to loop

Wend;you put this on end of your code

thanks sir, i'll try this one :)

Link to comment
Share on other sites

forgot to say this, you can remove waiting secconds ",10" parametar coz its optional in that command, so itl wait indefinitly if needed before script reloop once more

and do post your results when you done testing :P

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

 

if he is after process commands i don't see the point in loop if exit is after that, so just this line should work instead of the loop if constantly running isn't needed in script

 

Well, I put it in a loop so that is could run until whatever game was launched.

Since he mentioned using it in internet café, he probably wants it to run 24/7

So, he should look to see if both browser and game are going at the same time, then close the browser, otherwise do nothing.

Since he also wants to check for multiple games running, he should probably put them into an array to loop through so he could do something like

Dim $gamexe[3]
$gamexe[0] = "game1.exe"
$gamexe[1] = "game2.exe"
$gamexe[2] = "game3.exe"

Dim $browser[3]
$browser[0] = "iexplorer.exe"
$browser[1] = "chrome.exe"
$browser[2] = "firefox.exe"

While 1
    For $i = 0 To Ubound($gamexe)-1 
        If ProcessExists(gamexe[$i]) Then
            For $i2 = 0 To Ubound($browser)-1   
                If ProcessExists($browser[$i2]) Then
                    ProcessClose($browser[$i2])
                EndIf
            Next
        EndIf
    Next
    Sleep(10)
Wend
Edited by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

would be nice if on some point Process* commands would have REGEXPPROCESS :)

edit:

i did have 3-4 thingis in the past that whud look alot better with ProcessWait if it could accepted more than one process, but at least we do have ProcessList

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

 

Well, I put it in a loop so that is could run until whatever game was launched.

Since he mentioned using it in internet café, he probably wants it to run 24/7

So, he should look to see if both browser and game are going at the same time, then close the browser, otherwise do nothing.

Since he also wants to check for multiple games running, he should probably put them into an array to loop through so he could do something like

Dim $gamexe[3]
$gamexe[0] = "game1.exe"
$gamexe[1] = "game2.exe"
$gamexe[2] = "game3.exe"

Dim $browser[3]
$browser[0] = "iexplorer.exe"
$browser[1] = "chrome.exe"
$browser[2] = "firefox.exe"

While 1
    For $i = 0 To Ubound($gamexe)-1 
        If ProcessExists(gamexe[$i]) Then
            For $i2 = 0 To Ubound($browser)-1   
                If ProcessExists($browser[$i2]) Then
                    ProcessClose($browser[$i2])
                EndIf
            Next
        EndIf
    Next
    Sleep(10)
Wend

jaj29v.jpg

???

Link to comment
Share on other sites

oops, looks like the $ before gamexe got removed.

should have been easy enough for you to figure out.

btw, that code as-is won't do anything because I doubt you actually have processes called game1.exe, game2.exe and game3.exe running on your pc. You're supposed to replace that with the exes for the games you want to check for.

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

this is what i want to do.

I have 10 games to play in every clients (10 clients pc)

i dont want them to run games (except flash games)   + browsing at the same time 

allowed

firefox alone

game client alone (1 game at a time)

youtube + flash games 

 

not allowed

browser + games (css, crossfire, dota, etc)

multiple games open at the same time.

since im totally new in this software, Im asking you to give me an actual example of the codes (copy paste)

I hope you guys can understand me, thank you ^^

Link to comment
Share on other sites

We don't give, we teach.

If you read through the helpfile and lookup some tutorials, you've got more than enough info to create what you need.

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

oops, looks like the $ before gamexe got removed.

should have been easy enough for you to figure out.

btw, that code as-is won't do anything because I doubt you actually have processes called game1.exe, game2.exe and game3.exe running on your pc. You're supposed to replace that with the exes for the games you want to check for.

 

 

wait!......

 

i think it's working now  :)

 

..................................................................

Edited by Antron99
Link to comment
Share on other sites

We don't give, we teach.

If you read through the helpfile and lookup some tutorials, you've got more than enough info to create what you need.

 

sorry sir I just need the code (asap) tha'ts why im asking for your copy paste codes ^_^

but im willing to learn this software, this great software.

thank you guys very very much!

Link to comment
Share on other sites

one more problem.

the browsers close automatically when i open games, but the problem is, 

when i try to minimize the game and  launch the browsers again, the browser opens again while the game is still open.

shall i need another codes?

thanks!

Link to comment
Share on other sites

What have you changed in the code? It may let the browser re-open for a second or so (depending on how long it takes to go through the loop) but once it starts the loop again, it should re-close the browser.

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

It should still detect and close the browser when it re-enters the loop. I tested on my machine and works just fine, always closes the browser when I open a specified game, then lets me keep a browser open when I close the game.

*edit*

Maybe one of the process names (either game or browser) isn't quite right?

Edited by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

It should still detect and close the browser when it re-enters the loop. I tested on my machine and works just fine, always closes the browser when I open a specified game, then lets me keep a browser open when I close the game.

*edit*

Maybe one of the process names (either game or browser) isn't quite right?

yes sir that works fine.

heres the scenario,

browsers open

launch the game

the browsers closes

minimizing the game (without quiting the game)

launching the browsers again .

the browsers succesfuly launched while the game is in minimize mode (not quiting the game yet)

i want the browsers to remain closed while the game is running.

Edited by Antron99
Link to comment
Share on other sites

Does it do that with all games, or just specific ones? Some games have a "pre-launcher" with the main menu, but when you actually play the game it starts a new process, so you may have to look for that one too.

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...