Page 1 of 1

Attribute to check to find if an object has a script or not.

Posted: Sat Feb 27, 2010 12:17 am
by quailcreek
Hello again,
I'm pretty sure I've seen a script for this before but I'm not sure where. I searched here but no-joy. Anyway, what I want to do is write all of the scripts in a stack to a word file. I think I can write it but I need to know what attribute to check to determine if an object has a script.

Thanks, again,
Tom

Re: Attribute to check to find if an object has a script or not.

Posted: Sat Feb 27, 2010 12:39 am
by BvG
if the script of <object reference> is not "" then put the script of <object reference>

Re: Attribute to check to find if an object has a script or not.

Posted: Sat Feb 27, 2010 2:31 am
by FourthWorld
Just curious about the workflow: what do you find helpful about reading scripts in Word?

Re: Attribute to check to find if an object has a script or not.

Posted: Sun Feb 28, 2010 10:16 pm
by quailcreek
I'm not actually put the script in word to read them. I just wanted to be able to print all scripts to be able to catch errors.

Re: Attribute to check to find if an object has a script or not.

Posted: Sun Feb 28, 2010 11:02 pm
by FourthWorld
What sorts of errors do you find in reading that aren't caught with compilation, execution, and explicitVariables?

My interest here is in earnest: I used to use script dumpers some years ago, but in more recent years have begun putting together some script analysis tools to do those jobs faster. If I can understand what you're looking for I may be able to provide a tool to do it more easily.

I appreciate your taking the time to explain this in more detail. Thanks.

Re: Attribute to check to find if an object has a script or not.

Posted: Mon Mar 01, 2010 3:25 am
by quailcreek
Hi Richard,
Let me put some thought into my reply and I’ll get back.

Thnaks,
Tom

Re: Attribute to check to find if an object has a script or not.

Posted: Tue Mar 02, 2010 8:35 pm
by quailcreek
Hi Richard,
I need to restate my interest in printing the scripts of my projects. I tend to build my applications in modular fashion as I’m sure most developers do. This makes it easier to find errors before the projects completion. What I wanted to do is be able to see all of the scripts across multiple stacks. The reason is that many of my application contain several stacks and if I make a change in one I want to double check to see if it will impact the rest of the scripts in the other stacks. This is even more important given the nature of a truly object oriented language like Rev. i.e. code in every conceivable location. I’m also an incessant tweaked. I’m continually going back over my code to see if I can make it simpler or quicker. I find that hard to do on screen. I hope this gives you the feedback you were looking for.

Regards,
Tom

Re: Attribute to check to find if an object has a script or not.

Posted: Tue Mar 02, 2010 11:49 pm
by FourthWorld
Thanks for the info, Tom. It seems the key here is to be able to search scripts effectively, and it's less important whether the scripts are in a text file or the objects so long as you can find what you're looking for.

Being too lazy to dump-and-search, I wrote a little utility some time ago which searches the scripts of every object in a given stack, or every object in the current message path. While it doesn't currently handle multiple stacks that aren't in the message path (it will later), it may be helpful you as it is.

You can grab it in the Stacks section of RevNet: in Rev, see Development->Plugins->GoRevNet

The stack is titled "4W_ScriptSearch".

Hope it helps. I'll try to remember to drop a note here when I update it to handle multiple stacks.