Post

Replies

Boosts

Views

Activity

Control fan speed on MacPro 3.1 (early 2008)
I have a MacPro 3.1 (early 2008) that has Linux installed on it (Debian 13). One of the fans runs at top speed of 2500 rpm because some sensor in the board can't report the temperature to the OS. The Motherboard model is Mac-F42C88C8. Searched the internet to see if I could find any information on how to identify the sensor or the SMC information about it. I would like to know if there is any information that anyone knows about this and where could I start trying to make a driver to control the fan by getting the value in the sensor. I can see in the program coolercontrol in Linux the Fan that is at high speed is named 'IO' Thanks Regards
0
0
105
1w
How do I get the elements of NSArray
I made the following call to get an array of ranges of a matching regex : set theText to current application's class "NSString"'s stringWithString:html set regexPattern to "url\\([" & (ASCII character 34) & ",'](https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w\\.-]*)*\\/?" set urlRegex to current application's class "NSRegularExpression"'s regularExpressionWithPattern:(regexPattern) options:(0) |error|:(missing value) set matchRanges to (urlRegex's matchesInString:(theText) options:(0) range:({0, theText's |length|()}))'s valueForKey:("range") I get the following result : (NSArray) {(NSConcreteValue) NSRange: {11780, 52}, (NSConcreteValue) NSRange: {13066, 52}, (NSConcreteValue) NSRange: {15247, 40}, (NSConcreteValue) NSRange: {16288, 39}, (NSConcreteValue) NSRange: {17788, 36}, (NSConcreteValue) NSRange: {18596, 36}, (NSConcreteValue) NSRange: {19806, 75}, (NSConcreteValue) NSRange: {20807, 49}, (NSConcreteValue) NSRange: {21287, 63}, (NSConcreteValue) NSRange: {23892, 46}, (NSConcreteValue) NSRange: {24715, 35}, (NSConcreteValue) NSRange: {25182, 63}, (NSConcreteValue) NSRange: {25667, 44}, (NSConcreteValue) NSRange: {26011, 28}, (NSConcreteValue) NSRange: {26394, 66}, (NSConcreteValue) NSRange: {26769, 72}, (NSConcreteValue) NSRange: {28682, 66}, (NSConcreteValue) NSRange: {29576, 66}, (NSConcreteValue) NSRange: {31236, 32}} The list of items is a NSArray which means I can’t do : repeat with range in matchRanges set element to range set pos to item 1 of element set len to item 2 of element end repeat How do I get the position and length attributes of each NSRange ? I have looked for AppleScript documentation on Apple Developer but can only find documents related to the scripting bridge. Thanks, Regards
4
0
2.7k
Oct ’26
Control fan speed on MacPro 3.1 (early 2008)
I have a MacPro 3.1 (early 2008) that has Linux installed on it (Debian 13). One of the fans runs at top speed of 2500 rpm because some sensor in the board can't report the temperature to the OS. The Motherboard model is Mac-F42C88C8. Searched the internet to see if I could find any information on how to identify the sensor or the SMC information about it. I would like to know if there is any information that anyone knows about this and where could I start trying to make a driver to control the fan by getting the value in the sensor. I can see in the program coolercontrol in Linux the Fan that is at high speed is named 'IO' Thanks Regards
Replies
0
Boosts
0
Views
105
Activity
1w
How do I get the elements of NSArray
I made the following call to get an array of ranges of a matching regex : set theText to current application's class "NSString"'s stringWithString:html set regexPattern to "url\\([" & (ASCII character 34) & ",'](https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w\\.-]*)*\\/?" set urlRegex to current application's class "NSRegularExpression"'s regularExpressionWithPattern:(regexPattern) options:(0) |error|:(missing value) set matchRanges to (urlRegex's matchesInString:(theText) options:(0) range:({0, theText's |length|()}))'s valueForKey:("range") I get the following result : (NSArray) {(NSConcreteValue) NSRange: {11780, 52}, (NSConcreteValue) NSRange: {13066, 52}, (NSConcreteValue) NSRange: {15247, 40}, (NSConcreteValue) NSRange: {16288, 39}, (NSConcreteValue) NSRange: {17788, 36}, (NSConcreteValue) NSRange: {18596, 36}, (NSConcreteValue) NSRange: {19806, 75}, (NSConcreteValue) NSRange: {20807, 49}, (NSConcreteValue) NSRange: {21287, 63}, (NSConcreteValue) NSRange: {23892, 46}, (NSConcreteValue) NSRange: {24715, 35}, (NSConcreteValue) NSRange: {25182, 63}, (NSConcreteValue) NSRange: {25667, 44}, (NSConcreteValue) NSRange: {26011, 28}, (NSConcreteValue) NSRange: {26394, 66}, (NSConcreteValue) NSRange: {26769, 72}, (NSConcreteValue) NSRange: {28682, 66}, (NSConcreteValue) NSRange: {29576, 66}, (NSConcreteValue) NSRange: {31236, 32}} The list of items is a NSArray which means I can’t do : repeat with range in matchRanges set element to range set pos to item 1 of element set len to item 2 of element end repeat How do I get the position and length attributes of each NSRange ? I have looked for AppleScript documentation on Apple Developer but can only find documents related to the scripting bridge. Thanks, Regards
Replies
4
Boosts
0
Views
2.7k
Activity
Oct ’26