Fukki Posted February 23, 2015 Share Posted February 23, 2015 Hello, I'm noob for this program But i have question on CPU usage when run the script CPU can't active to 100% yes, it use 1 core on CPU so i want to get full usage for speed process and limit it in sometime i hope someone can help me to fix this and i say thank you for help Link to comment Share on other sites More sharing options...
orbs Posted February 23, 2015 Share Posted February 23, 2015 hello Fukki, welcome to AutoIt and the forum! if your script gets to 100% CPU utilization, there is most likely something wrong with it. adding more CPU cores to run it will not help. post your code so we can examine it and help you better. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
TheDcoder Posted February 23, 2015 Share Posted February 23, 2015 @orbs Please read the question carefully EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 23, 2015 Moderators Share Posted February 23, 2015 Fukki,ProcessSetPriority might be what you are looking for. M23 TheDcoder 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
UEZ Posted February 23, 2015 Share Posted February 23, 2015 You cannot achieve your goal with AutoIt properly. There are a lot of topics regarding multi threading but the conclusion is that AutoIt is not able to handle mt properly. What you can do is to add a sleep($x) to your loop where $x can vary. sleep(0) = no wait. As far as I understood you, modifying the process priority is not what you try to achieve. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
zalomalo Posted February 28, 2015 Share Posted February 28, 2015 (edited) so i want to get full usage for speed processand limit it in sometime But this is very easy.. do: Global $ImCrazy=1 While $ImCrazy WEnd Exit(-$ImCrazy) Sleep(100) ;<Too lateAt least you could heard the CPU fan nicely Edited February 28, 2015 by zalomalo My english shucks, i know it. Link to comment Share on other sites More sharing options...
kylomas Posted February 28, 2015 Share Posted February 28, 2015 Nope, still 1 core (24.9%) - AMD Athlon II 620 Quad Core Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
zalomalo Posted February 28, 2015 Share Posted February 28, 2015 (edited) Nope, still 1 core (24.9%) - AMD Athlon II 620 Quad Core25% of 4 cores = 100% of 1 core. By the way, you very excepcionally will see using more than a Core in a NO-Game proccess, like WindowsMediaPlayer playing just a mp3 audio = HugeHyperCrazy Crap software.So 99.9%. Edited February 28, 2015 by zalomalo My english shucks, i know it. Link to comment Share on other sites More sharing options...
kylomas Posted February 28, 2015 Share Posted February 28, 2015 Which brings us back to the OPs original ? But i have question on CPU usage when run the script CPU can't active to 100% yes, it use 1 core on CPU UEZ nailed it with AI cannot multi thread Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill 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