27 Aug
2010
27 Aug
'10
1:35 p.m.
ptr = Pointer.new("{ProcessSerialNumber=II}" )
Thanks. I had tried Pointer.new_with_type (trying to go from examples I found). I don't understand the difference between the two (yet).
However, please note that this will get the current **application** PSN, which, in case you run the script in Terminal, will be Terminal's PSN, not MacRuby's.
Yeah, I know. I can also get the PSN from NSWorkspace with less hassle. This was just an example since I figure I may have to do this in other places in the future ... Thanks!