View Full Version : Smart way to query the exisitence of proc in mem

04 April 2006, 09:00 AM

Can someone help me figure out what the most solid way of figuring out if a proc is in memory is?

I have ben using the whatIs command - something like this;

if(`whatIs kctPickWalkKeys`!="Unknown")

But then I found that I might also get a return like:
"Presumed Mel procedure; no definition seen yet.";

I would like to write a small proc that checks the existinsse of a proc in memory and returns an integer. Right now guess I would have it check for these two strigs:

""Presumed Mel procedure; no definition seen yet.";

* Is the whatIs command the smart way to approach this?
* Are there other "negative" returns I should be aware off?
* Would it be smarter to look for "positive" returns instead ( eg. Mel procedure found in: blah.blah) and tokenize the return string?


04 April 2006, 01:16 PM
You want the "exists" command. So you can do stuff like this:

string $myCommand="cone";
if (`exists $myCommand`) {
eval $myCommand;

04 April 2006, 02:09 PM
Thanks a lot!

..I might want to buy my self a book on MEL!!


CGTalk Moderation
04 April 2006, 02:09 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.