I a have a little utility that I wrote to turn affinity OFF and ON for a certain application. It;s to assist with a problem many poeple have with that application.
The MSched application needs to find the process name in Task Manager Processes and then right click. Then do some other stuff.
It works great for me. I have used screen grabs of the application name as it appears in Task Manager. Then the usual move mouse and so on.
I was just wondering if there is any other known way of getting the mouse to the application or even CHANGING (not SETTING) affinity for a certain application.
Note the capital letters above. I do not want command line to START an application with certain affinity. I already know how to do that but it does not have the desired effect.
Here is my current code to give you an idea of what I am doing:
Code: Select all
// COMPILE_OPTS|C:\Users\Phil\Downloads\P\auto_affinity.exe|C:\Program Files (x86)\Phil Pendlebury\MEAP\graphics\meapkeys.ico|CONSOLE=0|INCLUDES=1| /LOGFILE=\dev\nul /LOGFILE=\dev\nul /LOGFILE=\dev\nul /LOGFILE=\dev\nul
Press Ctrl
Press SHIFT
Press Esc
Wait>0.2
Release Ctrl
Release SHIFT
Release Esc
Wait>0.2
Let>XPFound=0
Let>VISTAFound=0
FindImagePos>%Script_dir%/taskxp.bmp,SCREEN,50,1,X,Y,XPFound
FindImagePos>%Script_dir%/taskvista.bmp,SCREEN,50,1,X,Y,VISTAFound
If>{(%XPFound% > 0) OR (%VISTAFound% > 0)}
MouseMove>X_0,Y_0
Else
GOTO>Exit
Endif
RClick
Wait>0.2
Send>a
Wait>0.2
WaitWindowOpen>Processor Affinity*
SetFocus>Processor Affinity*
Wait>0.2
SetCheckBox>Processor Affinity*,CPU 0,FALSE
Wait>0.2
PushButton>Processor Affinity*,OK
RClick
Wait>0.2
Send>a
Wait>0.2
SetCheckBox>Processor Affinity*,CPU 0,TRUE
Wait>0.2
PushButton>Processor Affinity*,OK
Wait>0.2
Press Esc
Wait>0.1
Release Esc
Label>Exit