Set Igor Sleep Meter
jjweimer
// Igor Sleep Meter
//
// Creates a slider that can be used to adjust the relative attention level given to Igor
// This procedure only has use under MacOS, not Windows
// Higher values of sleep mean Igor spends less time looking for something to do
// A value of ZERO gives full time to Igor as a foreground application
#pragma rtGlobals=1
Function SetIgorSleep()
if (WinType("IgorSleep")==0)
NewPanel/W=(150,50,217,171)/K=1/N=IgorPower as "IgorSleep"
Slider Power,pos={7,21},size={47,80},proc=SleepNumber,limits={0,20,1},value= 1
endif
SetProcessSleep 1
End
Function SleepNumber(sa) : SliderControl
STRUCT WMSliderAction &sa
switch( sa.eventCode )
case -1: // kill
SetProcessSleep 1
break
default:
if( sa.eventCode & 1 ) // value set
SetProcessSleep sa.curval
endif
break
endswitch
return 0
End
//
// Creates a slider that can be used to adjust the relative attention level given to Igor
// This procedure only has use under MacOS, not Windows
// Higher values of sleep mean Igor spends less time looking for something to do
// A value of ZERO gives full time to Igor as a foreground application
#pragma rtGlobals=1
Function SetIgorSleep()
if (WinType("IgorSleep")==0)
NewPanel/W=(150,50,217,171)/K=1/N=IgorPower as "IgorSleep"
Slider Power,pos={7,21},size={47,80},proc=SleepNumber,limits={0,20,1},value= 1
endif
SetProcessSleep 1
End
Function SleepNumber(sa) : SliderControl
STRUCT WMSliderAction &sa
switch( sa.eventCode )
case -1: // kill
SetProcessSleep 1
break
default:
if( sa.eventCode & 1 ) // value set
SetProcessSleep sa.curval
endif
break
endswitch
return 0
End
Forum
Support
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More