Hi All,
I am currently working on an EnScript designed to be able to extract information from the Binatone Sat Nav systems. I have the basic sections working with the script I just want to merge them all together to make them - idiot - proof. The best way of doing this I believe is to have a GUI with a drop down selection box, listing possible models, a check box selection area listing the different files that can be exported and then two buttons, Start and Quit.
I am currently having issues creating the drop down selection box for listing the models, I was wondering if there are any resources or example code for making a drop down box, and then extracting the selection from it.
Regards,
Kieran
Hi All,
I am currently working on an EnScript designed to be able to extract information from the Binatone Sat Nav systems. I have the basic sections working with the script I just want to merge them all together to make them - idiot - proof. The best way of doing this I believe is to have a GUI with a drop down selection box, listing possible models, a check box selection area listing the different files that can be exported and then two buttons, Start and Quit.
I am currently having issues creating the drop down selection box for listing the models, I was wondering if there are any resources or example code for making a drop down box, and then extracting the selection from it.
Regards,
Kieran
<RANT=ON>
Example code for Enscripts is difficult to get hold of. Very difficult.
The majority of scripts these days (even from the Guidance trainers) are Enpacked so you've got no chance of seeing how they work, or as your skills improve you can't modify/improve/correct existing code.
Guidance's position on Enpacks is that it helps version control.
I doubt that they've not heard of Git, or SVN or MVCS or all the other source control systems in the world. (incidentally I've got Tortoise SVN running over my Enscripts folder, it works well)
I almost question the point of actually learning Enscript. It's such a powerful system yet its support is so weak. It's as if Guidance doesn't want it to thrive.
And for the big finale the Enscript 6 to Enscript 7 nothing works issue…… <shakes head>.
<RANT=OFF>
and relax.
On a more positive note you might get a result at the Enscript forum on support.guidancesoftware.com.
However Encase dialog stuff is a black art, I wish you luck.
There is documentation in the Enscript help file (at least in version 6), this includes examples. It's not great but there is enough information in there to help you get a good start.
First off, which version of EnCase are you writing for? v6 or v7?
From memory, v6 doesn't have an in-built drop-down list, so the simple answer is design the dialog without one. Have you seen any script with a drop-down dialog? There is a ListEditClass which may be usable in place.
It has certainly been requested, so in v7, it may have been added - I haven't really started looking at that yet.
A typical Windows drop-down selection box is not available in EnScript. However, you can use ListEditClass to allow for the selection of a single item in a list. The widget can be a certain height and will allow scrolling through the list. You can use ListEditClassGetValue() to retrieve the item in the list that has been selected by the user.
class ListSelectDialog DialogClass {
NodeClass List;
ListEditClass ListControl;
ListSelectDialog(NodeClass list, const String& msg)
DialogClass(null, "List Select Example"),
List = list,
ListControl(this, msg, START, START, 100, 50, 0, List, 0)
{}
virtual bool CanClose() {
// checks that you have indeed selected something
return ListControl.GetValue() != null && DialogClassCanClose();
}
}
class MainClass {
void Main() {
NameListClass list();
list.Parse("red\torange\tyellow\tgreen\tblue\tindigo\tviolet", "\t");
ListSelectDialog dlg(list, "Which is your favorite color?");
if (SystemClassOK == dlg.Execute()) {
Console.WriteLine("Your favorite color is " + dlg.ListControl.GetValue().Name());
}
}
}
This is a simple example. Let me know whether you have questions.
cheers,
Jon