Notifications
Clear all

EnScript Help

3 Posts
2 Users
0 Likes
512 Views
 TCSS
(@tcss)
Posts: 4
New Member
Topic starter
 

Hi, I am trying to create an EnCase V7 preprocessor for a school project. This is the first time I'm using EnScript, so I have been encountering some problems. Is there any way to link EnScripts together? Currently, I have a few EnScripts, but when trying to compile into one, there are a lot of errors and it is very lengthy/messy.

For example, the first EnScript is for a main menu with different options. After selecting an option, such as keyword search, it should open another dialog for keyword search.

I tried to put the keyword search EnScript into the main menu EnScript, but there are errors that I couldn't resolve. Also, it's not really a very ideal method since there are at least 5 options for the main menu.

I would appreciate it if you have any suggestion/solution to link a few EnScripts together.

Thank you!

 
Posted : 14/07/2014 11:44 am
binarybod
(@binarybod)
Posts: 272
Reputable Member
 

Is there any way to link EnScripts together?

The 'include' keyword will effectively substitute the contents of the EnScript file you provide as an argument at that point in your script.

Currently, I have a few EnScripts, but when trying to compile into one, there are a lot of errors and it is very lengthy/messy!

I may have this wrong because I'm making an assumption so please forgive me if that is the case.
A common mistake is to start with the main class and then code all the bits you subsequently call as you go on. I used to do this - it leads to messy and unstructured code, the very thing you are telling us here.
EnScript adheres pretty closely to the object oriented programming paradigm (i.e. Encapsulation, Inheritance and Polymorphism). To take best advantage of this you need to think about your problem and try to break it down into bite sized chunks and try to turn these tasks into distinct and separate classes (the Encapsulation part). The other thing you need to do is to look at the supplied classes and see if any of them fit the bill, if they nearly do, then you can define your own class that tweaks the built-in class (the Inheritance part). For example you mention searching, does the SearchClass help? Or does it need tweaking?
The GUI parts of your script need to be among the last parts you need to code, make sure the underlying code works well first
I find the best way (for me) to work is as follows
* Break the task down
* Identify distinct classes
* Code a class (preferrably a simple one to start)
* Create an Enscript to test your new class to see how it performs using a range of inputs.
* Continue the class creation/test cycle until all the 'back end' functionality is working as expected
* Create GUI classes so that human beings can interact with your code
* Stand back in awe at your own creativity D

It really is immaterial whether you create one large file or several smaller ones, what is important is that the classes are independent and that they work across the full range of expected inputs/outputs.

 
Posted : 16/07/2014 12:42 am
 TCSS
(@tcss)
Posts: 4
New Member
Topic starter
 

Hi, thanks for the help! For the 'include' part, is there any example as to it is used? Like the syntax etc.

 
Posted : 24/07/2014 10:14 am
Share: