Azu Posted February 24, 2006 Share Posted February 24, 2006 HotKeySet("^+a", "_kill") Func _kill() $Killed = "1" If ProcessExists("explorer.exe") Then ProcessClose("explorer.exe") $Killed = "0" Else EndIf If $Killed = "1" & not ProcessExists("explorer.exe") Then Run("explorer.exe") Else EndIf EndFunc It doesn't work.. pressing the hotkey once should turn it off, pressing it again should turn it back on. But instead, pressing it simply causes it to restart.. rather then turning it off... how come? Link to comment Share on other sites More sharing options...
sksbir Posted February 24, 2006 Share Posted February 24, 2006 If you kill explorer, it will restart. windows is featured to do so. (because it happens so often that explorer crash that microsoft's developpement team included this feature ) But this feature is really interesting : this is for example the best solution to move "my documents" folder with autoit : first change registry values, and then kill explorer so it restarts. Link to comment Share on other sites More sharing options...
Azu Posted February 24, 2006 Author Share Posted February 24, 2006 I kill explorer.exe manuelly before playing any high-end games sence it takes up a lot of resources, especially sence I am using windows vista.. It doesn't restart when I kill it with the task manager, it also doesn't restart if I make a script that only disables it, but I want to be able to toggle it.. Also I don't want to change any registry values, I hate programs that change the registry. Link to comment Share on other sites More sharing options...
greenmachine Posted February 24, 2006 Share Posted February 24, 2006 You should try your process toggle with a less vital process. For example, cmd.exe. Link to comment Share on other sites More sharing options...
Azu Posted February 24, 2006 Author Share Posted February 24, 2006 ??? Same thing happens. How do I fix it? Link to comment Share on other sites More sharing options...
The Kandie Man Posted February 24, 2006 Share Posted February 24, 2006 Hmm, this could cause some serious errors to the windows operating system if you do this on a regular basis. I wouldn't recommend ending explorer like this since explorer is a vital part of the operating system. As a result, it is constantly updating registry keys and other critical files and ending it while it is doing this could cause errors. If you want more speed, shutdown services that aren't vital, for example, error reporting and the print spooler service. "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
Azu Posted February 24, 2006 Author Share Posted February 24, 2006 I don't have those services start up to begin with Explorer.exe takes up a lot of my ram I end it on a regular basis anyways But I'm lazy, I hate opening up task manager every time to manuelly kill it and re-open it Which is why I want to just make it toggle able I wish someone would just tell me how to make this work rather then telling me not to do it.. >.> Link to comment Share on other sites More sharing options...
nfwu Posted February 24, 2006 Share Posted February 24, 2006 (edited) Try using 1 hotkey for killing and another for starting #) EDIT: SPELLING Edited February 24, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
The Kandie Man Posted February 24, 2006 Share Posted February 24, 2006 Very well, but you have been warned. HotKeySet("^+a", "_kill") Func _kill() If ProcessExists("explorer.exe") Then ProcessClose("explorer.exe") Else Run("explorer.exe") Endif EndFunc "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
Azu Posted February 24, 2006 Author Share Posted February 24, 2006 That's what I was trying before.. it doesn't work though.. it just makes it restart.. I guese I'll just have to make it two seperate hotkeys like nfwu suggested Link to comment Share on other sites More sharing options...
Azu Posted February 24, 2006 Author Share Posted February 24, 2006 Him that didn't work.. it still restarts it.. no matter what I do.. gr.. x_X Link to comment Share on other sites More sharing options...
greenmachine Posted February 25, 2006 Share Posted February 25, 2006 (edited) Then it's likely windows is restarting it on its own. It should do that anyway, since explorer is pretty much the basis of everything you work with. I just tested the single-hotkey method for toggling a process. It works fine. I used cmd.exe because it isn't nearly as important. HotKeySet("c", "_kill") Func _kill() If ProcessExists("cmd.exe") Then ProcessClose("cmd.exe") Else Run("cmd.exe") Endif EndFunc While 1 Sleep (1000) WEnd Edited February 25, 2006 by greenmachine Link to comment Share on other sites More sharing options...
Azu Posted February 25, 2006 Author Share Posted February 25, 2006 What does cmd.exe do? Does killing it free up a lot of ram? Link to comment Share on other sites More sharing options...
greenmachine Posted February 25, 2006 Share Posted February 25, 2006 No, not at all. It's the command prompt, and it uses essentially no memory. It's just a good example. Link to comment Share on other sites More sharing options...
cppman Posted February 25, 2006 Share Posted February 25, 2006 (edited) I kill explorer.exe manuelly before playing any high-end games sence it takes up a lot of resources, especially sence I am using windows vista..It doesn't restart when I kill it with the task manager, it also doesn't restart if I make a script that only disables it, but I want to be able to toggle it..Also I don't want to change any registry values, I hate programs that change the registry.using windows vista? Microsoft Has'nt released it to the PUBLIC yet... its only avaible for Beta Testers..... r u on the Microsoft Beta Team? "do u mean, Windows XP"? Edited February 25, 2006 by CHRIS95219 Miva OS Project Link to comment Share on other sites More sharing options...
Azu Posted February 25, 2006 Author Share Posted February 25, 2006 ???It takes up lots of ram makes games run slow o.0 Link to comment Share on other sites More sharing options...
Azu Posted February 25, 2006 Author Share Posted February 25, 2006 Oh and I don't have a process called "cmd.exe" running o.0 Link to comment Share on other sites More sharing options...
greenmachine Posted February 25, 2006 Share Posted February 25, 2006 Oh and I don't have a process called "cmd.exe" running o.0That's fine, I realize you probably don't have it running at all times. That's why the function allows you to START it as well as stop it (with the same key). Also, for memory, killing both processes of msnmsgr.exe and firefox.exe (and taskmgr.exe, and maybe both taskeng.exe?) would do much more good than trying to kill explorer.exe. Also, if you check the "show processes from all users", you might have more stuff that is wasting memory. I have 59 processes running right now, including iTunes and firefox (both big memory drainers), and my usage is much less than yours. Link to comment Share on other sites More sharing options...
Azu Posted February 25, 2006 Author Share Posted February 25, 2006 (edited) I do turn off firefox and msn messenger Manuelly I would just like a conveniant script for my auto-login program for turning off explorer.exe while running a fullscreen game and turning it back on afterwards More conveniant then going into the task manager and stuff every time The screenshot was just to show how much memory explorer.exe takes up Edited February 25, 2006 by Azu Link to comment Share on other sites More sharing options...
The Kandie Man Posted February 25, 2006 Share Posted February 25, 2006 Ok, my Explorer.exe takes up 8MB of RAM. Open up themes and switch your them to windows classic. Next, right click My Computer, go to Properties, then go to the Advanced tab. Once there click settings button in the Performance group box. Then click the radio button that says, "Adjust for best performance." Once you do that, reboot the system. Explorer should now be using significantly less RAM. Hope that helps. The Kandie Man "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now