tags:

views:

25

answers:

1

Hi there, I am quiet new to f-script and find it mighty powerful; but one feature i think would be quiet commonly used, I was not able to find a reference on: I am trying to figure out how to get an object I have found via the object-browser of f-script to the script console. I.e. I found an instance of NSString at adress 0x234243242 as the object explorer tells me. Now, i would like to call an instance method on it via the script-console (i know that i can call a method on it via the object-browser...); Can someone give a hint how i could do this? Neither the f-script documentation nore google was able to provide me an answer for this yet.

thanks in advance, daniel

A: 

I couldn't find a way to do this directly with F-Script either, but here's a way that integrates Cocoa with F-Script pointers:

ptr := FSPointer objectPointer
scanner := NSScanner scannerWithString:'0x234243242'
scanner scanHexLongLong:ptr
object := ptr at:0
wbyoung
I was guessing that it might be somehow possible via copying the memory address and playing around with it; but, I was expecting that this is a common task and might be easier to achiche. I mean, when you attache yourself to a running app for reverse engineering or so, this would be a really cool feature. Not only using the UI, but actually interacting with the objects easily in a small script...
38leinaD