lokster Posted July 4, 2007 Posted July 4, 2007 (edited) Skype users may have noticed, that recent versions consume a lot of memory - 20 or even 30 megabytes. This script reduces the memory used by skype, by continuously freeing the memory used by skype.exe and skypePM.exe. Maybe in some cases this will cause some lag when using skype - eventually when talking with alot of people or makeing videocall. I don't have webcam right now, so I can't test how skype behaves when making video call. For now it works fine(~2 hours) The script itself consumes about 700kb memory. This may, or may not be usefull to you, but here it is: skype-memory-reducer.au3 expandcollapse popup#include <Misc.au3> _Singleton("skype-memory-reducer") Opt("TrayMenuMode", 1) Opt("TrayOnEventMode", 1) TrayCreateItem("Quit") TrayItemSetOnEvent(-1, "Bye") TraySetState() Global Const $interval = 2000 ; interval at which the memory is freed, anything below this will almost certainly only slow down your system. ;here you can add any other process, ;but be carefull which process you choose, ;bacause in some cases this will slow down your application or even your PC Global $list = "skype.exe|skypePM.exe" Global $processlist = StringSplit($list, "|") While 1 For $i = 1 To UBound($processlist) - 1 $pid = ProcessExists($processlist[$i]) If $pid Then _ReduceMemory($pid) Next _ReduceMemory(); also reduce the memory used by the script itself... Sleep($interval) WEnd Func Bye() Exit EndFunc ;==>Bye ;I don't remember who was the author of this UDF... (it's not me) Func _ReduceMemory($i_PID = -1) If $i_PID <> -1 Then Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID) Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0]) DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0]) Else Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1) EndIf Return $ai_Return[0] EndFunc ;==>_ReduceMemory Edited July 5, 2007 by lokster
Omegis Posted July 5, 2007 Posted July 5, 2007 WOW !!!!!!! the best one yet ! i have test it on skype, maxthon and thunderbird ... it was working every time ! can you please quote the function detalis from the DLLs ? Thanks !
lokster Posted July 5, 2007 Author Posted July 5, 2007 These are standard Windows API functions.OpenProcessEmptyWorkingSetCloseHandle
rambo3889 Posted July 5, 2007 Posted July 5, 2007 Very nice and simple, about the UDF i think it was made by W0uter My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight!
nixnox Posted April 13, 2012 Posted April 13, 2012 I'm sorry that i might sound stupid, but how do i use it? I had a skypememoryreducer.exe, but recent PC change i forgot to copy it to flash drive. Now i can't find it anywhere.
Carlo84 Posted April 15, 2012 Posted April 15, 2012 I don't remember who was the author of this UDF... (it's not me) _SplashProgressImage | _Regionselector | _IsPressed360 | _UserAccountContol_SetLevel | _ListSubFolders
BrewManNH Posted April 16, 2012 Posted April 16, 2012 These scripts don't actually reduce the memory used, it just pages the memory used by the process to the pagefile which will make your program run even slower. Don't bother with them. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
JRSmile Posted April 17, 2012 Posted April 17, 2012 These scripts don't actually reduce the memory used, it just pages the memory used by the process to the pagefile which will make your program run even slower. Don't bother with them.Thats right, but,if you have limited ram, and just want skype to be running in the background why should it run fast? having the now free ram for your game and skype thankfully idleing in the pagefile, it will place itselve back into ram when needed or over time, depending on its recurring tasks it does while idleing.Regards,J. $a=StringSplit("547275737420796F757220546563686E6F6C75737421","") For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4) Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI" Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile; MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
beqa Posted April 17, 2012 Posted April 17, 2012 hi everyone. please explain me whatt i must add to this script for reducing skype memory if i have multiple acounts with skypelauncher. in processeslist multiple skype proceses are shown with name skype.exe what i must do to resolve this problem?
BrewManNH Posted April 17, 2012 Posted April 17, 2012 Use ProcessList("Skype.exe") which returns an array, and then loop through the array to get all the PIDs for the running processes to send them one at a time to the ReduceMemory function. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
Ryanscript Posted April 18, 2012 Posted April 18, 2012 hi everyone.please explain me whatt i must add to this script for reducing skype memory if i have multiple acounts with skypelauncher.in processeslist multiple skype proceses are shown with name skype.exewhat i must do to resolve this problem?I was also developing such script in past. But I couldn't find any solution for such problem. So if any one have new point to solve it please share here.
beqa Posted April 24, 2012 Posted April 24, 2012 please give me an example to reduce memory for multiple instances of skype with same processes
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