/bin/try/ahkstdlib/doc/Affinity.html
HTML | 105 lines | 82 code | 21 blank | 2 comment | 0 complexity | b1e960a2414c29f95ffe84c20ebbe060 MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, LGPL-3.0, BSD-2-Clause
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html dir="ltr"><head>
-
-
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-
-
-
-
- <meta http-equiv="Content-Style-Type" content="text/css">
-
-
- <link rel="prev" href="http://www.autohotkey.com/forum/viewtopic.php?t=8728&view=previous" title="View previous topic">
- <link rel="next" href="http://www.autohotkey.com/forum/viewtopic.php?t=8728&view=next" title="View next topic">
- <link rel="up" href="http://www.autohotkey.com/forum/viewforum.php?f=2" title="Scripts & Functions">
- <link rel="chapter forum" href="http://www.autohotkey.com/forum/viewforum.php?f=1" title="Ask for Help">
- <link rel="chapter forum" href="http://www.autohotkey.com/forum/viewforum.php?f=2" title="Scripts & Functions">
- <link rel="chapter forum" href="http://www.autohotkey.com/forum/viewforum.php?f=3" title="Bug Reports">
- <link rel="chapter forum" href="http://www.autohotkey.com/forum/viewforum.php?f=4" title="Wish List">
- <link rel="chapter forum" href="http://www.autohotkey.com/forum/viewforum.php?f=6" title="Announcements">
- <link rel="chapter forum" href="http://www.autohotkey.com/forum/viewforum.php?f=7" title="Utilities & Resources">
- <link rel="chapter forum" href="http://www.autohotkey.com/forum/viewforum.php?f=5" title="General Chat">
-
- <title>AHK Functions : FileMD5() / MD5() [Updated]</title>
-
- <link rel="alternate" type="application/rss+xml" title="AutoHotkey Forum RSS" href="http://www.autohotkey.com/forum/rss.php">
-
-
- <link rel="stylesheet" type="text/css" href="Affinity-Dateien/index.css" media="all">
- </head><body bgcolor="#e5e5e5" link="#006699" text="#000000" vlink="#5493b4">
- <table align="center" border="0" cellpadding="10" cellspacing="0" width="100%">
- <tbody>
- <tr>
- <td class="bodyline">
- <table class="forumline" border="0" cellpadding="3" cellspacing="1" width="100%">
- <tbody>
- <tr>
- <td class="row1" height="28" valign="top" width="100%">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
- <tr>
- <td colspan="2">
- <table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
- <tbody>
- <tr>
- <td class="quote">
- <!--DOCUMENT_FRAGMENT-->
- <span style="color: green;"><span style="font-size: 18px; line-height: normal;"><span style="font-weight: bold;">Affinity_Set()</span></span></span>
- <br>
-
- <br>
- <span style="font-size: 12px; line-height: normal;">Sets the CPU to be
- used in Dual/Quad/Multi core processors / Effectively, this function
- allows you to choose which AHK script uses what <br>
- processor.
- <br>
-
- <br>
- <span style="font-weight: bold;">Usage:</span> Use <span style="font-weight: bold;">Affinity_Set( n )</span> on the top of your script, where <span style="font-weight: bold;">n</span> will be <span style="font-weight: bold;">1</span> if you want the script to use the first processor, <span style="font-weight: bold;">2</span> if you want the script to use the second processor.. and <span style="font-weight: bold;">3</span> to utilise both of them
- <br>
-
- <br>
- <span style="font-weight: bold;">MSDN</span> Links: <a href="http://msdn.microsoft.com/en-us/library/ms686223%28VS.85%29.aspx" target="_top" class="postlink"><span style="color: blue;"><span style="text-decoration: underline;"><span style="font-weight: bold;">SetProcessAffinityMask</span></span></span></a> <span style="font-weight: bold;">,</span> <a href="http://msdn.microsoft.com/en-us/library/ms683213%28VS.85%29.aspx" target="_top" class="postlink"><span style="color: blue;"><span style="text-decoration: underline;"><span style="font-weight: bold;">GetProcessAffinityMask</span></span></span></a>
- <br>
-
- <br>
-
- <br>
- Some old applications do not run properly when run with dual/multi core
- mode and require the Affinity to be set to a single processor.
- <br>
- Here is an example to set Affinity manually: To set the Affinity for <span style="font-weight: bold;">Calculator</span>, start the Windows Task Manager, find the process <span style="font-weight: bold;">Calc.exe</span>, right click and select Affinity, and set the affinity by checking on/off the relevant CPU's.
- <br>
-
- <br>
- <ul><img src="Affinity-Dateien/wintaskmgr.png" border="0"><span style="color: white;">___________</span><img src="Affinity-Dateien/procaff.png" border="0"></ul>
- <br>
-
- <br>
- To achieve the same programmatically,
- <br>
-
- <br>
- </span><table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"><tbody><tr> <td><span class="genmed"><b>Code:</b></span></td> </tr> <tr> <td class="code"><div>Process, Exist, calc.exe<br>PID := errorLevel<br>Affinity_Set( 3, PID ) <span style="color: rgb(0, 128, 0);">; presuming Affinity.ahk is available in User Library</span><br></div></td> </tr></tbody></table><span class="postbody">
- <br>
-
- </span>
- <!--/DOCUMENT_FRAGMENT-->
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- </body></html>