Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
April 16, 2014, 11:11:57 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: [Tool] MyDefrag Script Creator *Alpha version*  (Read 7255 times)
Darlis
JkDefrag Hero
*****
Posts: 1762


View Profile WWW
« on: May 25, 2010, 09:38:40 am »

Some may remember my posts about writing a script creator (too). Well ... I'm progressing.

I've now reached a milestone with a usable GUI and working script settings. And instead of posting pictures, I want to give you the program itself, so you can play with it yourself.  Wink

Please note that this is an Alpha version! That means that nothing is supposed to work and a lot of features are still missing.
Features:
- Almost all of the script settings are available
- Three different views for beginners and advanced and a custom mode where you can do almost everything.
- Support for different MyDefrag versions and converting between them
- Import of existing MyDefrag scripts (currently limited to settings)
- Own file format (mdsc), where you can save the script exactly as you see it in the program.

Installation
- You need the (free) Java Runtime Environment (JRE) 6: http://java.sun.com/javase/downloads/index.jsp
- Download the attached zip-archive and extract it to a folder of your choice.

If the JRE is installed correctly, you can execute the MyDeSC.jar by double clicking on it.

Usage
- Create a new script by selecting Script > New or import an existing script by selecting Script > Import.
- Create a MyDefrag script by selecting Script > Export.

Let me know of what you think about my program, but please don't post any bug reports, there is still a lot do.
Have fun.


Update 08-17-2010: Alpha 2 is done

Main changes:
- All script elements are now available
    It is now possible to create and import complete scripts
    To create a complete script, the custom view has to be selected
- Added an additional view level for each element
    a) If the general view level is set to advanced or custom, some elements can show more options
    b) Select an element and press [F2] on the keyboard for a custom level
        An orange input box will appear where the MyDefrag script command can be written into
        Use this if the options presented by the GUI are too restrictive (for example numbers)
        (Does not work on all elements or only on parts of them)


The first beta will then have the easy to use GUI for creating and managing zones and an option to directly run the script in MyDefrag without exporting it first.
I'll also search for some web space to put this version on (including forum).

* MyDeSC Alpha 2.zip (337.36 KB - downloaded 376 times.)
« Last Edit: August 17, 2010, 04:33:21 pm by Darlis » Logged

Need help creating a script? Try MyDefrag Script Creator.
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7181



View Profile WWW
« Reply #1 on: May 25, 2010, 10:19:59 pm »

I have taken a quick look and I'm impressed. You have set your goal quite high, it will be a lot of work to finish it. Especially the support for different MyDefrag versions. What can I say - keep up the good work.
Logged
Darlis
JkDefrag Hero
*****
Posts: 1762


View Profile WWW
« Reply #2 on: May 26, 2010, 07:34:21 am »

Thank you. Yes, there is quite a lot do do but with the structure I chose, adding a new version is easy-peasy.  Cool
Logged

Need help creating a script? Try MyDefrag Script Creator.
stormin norman
JkDefrag Junior
**
Posts: 6


View Profile
« Reply #3 on: July 12, 2010, 06:40:32 am »

Darlis,

I've had the similar idea for some time, (even planning to do it it java at first). Are you still working on this?

oh things used to be so much simpler back when it was a batch file running jkdefrag.
Logged
poutnik
JkDefrag Hero
*****
Posts: 1112


View Profile
« Reply #4 on: July 12, 2010, 06:54:21 am »

I guess it can be still as simple and as complex as a user wants.
Logged

It can be fast, good or easy. You can pick just 2 of them....
Treating Spacehog zone by the same effort as Boot zone is like cleaning a garden by the same effort as a living room.
Darlis
JkDefrag Hero
*****
Posts: 1762


View Profile WWW
« Reply #5 on: July 12, 2010, 07:24:44 am »

Are you still working on this?
Yes, I am. I'll probably release a second alpha version this week if everything goes well. It'll then have all the script elements, so it would be a complete program, but it's still missing the user friendly GUI.

oh things used to be so much simpler back when it was a batch file running jkdefrag.
You mean limited?  Grin
I was planning to do a simpler version first, but then I kept adding feature after feature. For the versioning feature I had to partly rewrite the program, otherwise it would get to complex to maintain the code.
Logged

Need help creating a script? Try MyDefrag Script Creator.
stormin norman
JkDefrag Junior
**
Posts: 6


View Profile
« Reply #6 on: July 12, 2010, 11:53:01 am »

Yes, I am. I'll probably release a second alpha version this week if everything goes well. It'll then have all the script elements, so it would be a complete program, but it's still missing the user friendly GUI.
The alpha seemed friendly enough. A small toolbar with common commands is the only way I'd imagine it would be any friendlier.


You mean limited?  Grin
I was planning to do a simpler version first, but then I kept adding feature after feature. For the versioning feature I had to partly rewrite the program, otherwise it would get to complex to maintain the code.
Limited only by ones imagination =P. I was musing that updating jkdefrag was merely copying over a new exe, as the options were best stored as batch. With mydefrag I have to go through all the scripts with updates to check compatibility. Of course its worth it, given you define your own zones and actions.

I think you've done the best thing by starting off with a fully featured program. Tends to be easier to disable features then trying to add them at a latter date. Also I like the way you've laid out the classes. You could even make a nice little TIO interface to go with it.

I have a few more suggestions, but will wait until I see the next alpha.
Logged
Darlis
JkDefrag Hero
*****
Posts: 1762


View Profile WWW
« Reply #7 on: July 12, 2010, 06:19:13 pm »

The alpha seemed friendly enough. A small toolbar with common commands is the only way I'd imagine it would be any friendlier.
Right now you only see the settings for the script. The menus with the file grouping and zone layout has yet to come. The menu bar (if that is what you mean with toolbar) will also grow. The next Alpha won't have those changes though, just the complete set of script elements.

You could even make a nice little TIO interface to go with it.
What's a TIO interface?

I have a few more suggestions, but will wait until I see the next alpha.
I would be a little early for this suggestions at this early stage indeed, but I'm curious what you have in mind. Wink
Logged

Need help creating a script? Try MyDefrag Script Creator.
stormin norman
JkDefrag Junior
**
Posts: 6


View Profile
« Reply #8 on: July 13, 2010, 05:57:40 am »

Right now you only see the settings for the script. The menus with the file grouping and zone layout has yet to come. The menu bar (if that is what you mean with toolbar) will also grow. The next Alpha won't have those changes though, just the complete set of script elements.
I mean a toolbar, as row of icons below the menu bar. Common things like save open, import export.

What's a TIO interface?
Commandline interface, (text input output). Although i'm unsure how well this would prove useful, but it would be possible.

I would be a little early for this suggestions at this early stage indeed, but I'm curious what you have in mind. Wink
A function to automatically task schedule scripts (not too hard to implement), a class to help pick folders & file formats to include/exclude, something to import & edit the layout.ini.
Logged
Darlis
JkDefrag Hero
*****
Posts: 1762


View Profile WWW
« Reply #9 on: July 13, 2010, 08:25:03 am »

I mean a toolbar, as row of icons below the menu bar. Common things like save open, import export.
Thanks for your input. Yes, should be no problem.

Commandline interface, (text input output). Although i'm unsure how well this would prove useful, but it would be possible.
Possible, yes. But I currently can't think of any other use than to open/import a given script.

A function to automatically task schedule scripts (not too hard to implement)
I haven't done much with scheduling tasks, I will have to look into it. Do you have something special in mind? Because I can't see what I could make better/easier than the Windows task scheduler. I've taken a look at the Win7 version and it looks pretty easy to handle. Therefore I don't see why I should spend time and copy this.

a class to help pick folders & file formats to include/exclude
That will be in the first Beta. It will be a general dialog which is used in many places, whenever it is needed, mainly for creating file groups. You can also include/exclude existing file groups, like spacehogs.

something to import & edit the layout.ini.
That would be no problem to implement, but why would I want to import & edit the layout.ini, since it changes about every 3 days? Jonib made a tool to change the drive letter in the layout.ini to boot optimize a non booted Windows: Boot optimizing for multibooters, Layout.ini util
I can't think of any other way how to usefully edit this file. It's normal textfile which you can open in any editor.
Logged

Need help creating a script? Try MyDefrag Script Creator.
stormin norman
JkDefrag Junior
**
Posts: 6


View Profile
« Reply #10 on: July 17, 2010, 06:54:21 am »

Possible, yes. But I currently can't think of any other use than to open/import a given script.
I was thinking of using a precompiled binary that could be accessed from a commandline. But this would't be feasible in java, unless one used gjc. For example using a bartpe where I don't have java installed.

I haven't done much with scheduling tasks, I will have to look into it. Do you have something special in mind? Because I can't see what I could make better/easier than the Windows task scheduler. I've taken a look at the Win7 version and it looks pretty easy to handle. Therefore I don't see why I should spend time and copy this.
Currently the installer for mydefrag adds three of the scripts to the task scheduler. It does so by the command At at prompt. I was suggesting throwing a method to schedule a script in a similar method (by invoking AT command).

That would be no problem to implement, but why would I want to import & edit the layout.ini, since it changes about every 3 days? Jonib made a tool to change the drive letter in the layout.ini to boot optimize a non booted Windows: Boot optimizing for multibooters, Layout.ini util
I can't think of any other way how to usefully edit this file. It's normal textfile which you can open in any editor.
But you can't edit the layout.ini, only copy or delete it. Would handy to have a tool to import the current layout.ini as a new file, and method to point to it via importlistfromfile. Additionally if you want to be able to load the file as table that could be searched & temporarily sorted, so entries could be deleted or added (using a two column array).
Logged
Darlis
JkDefrag Hero
*****
Posts: 1762


View Profile WWW
« Reply #11 on: July 17, 2010, 01:27:18 pm »

I was thinking of using a precompiled binary that could be accessed from a commandline. But this would't be feasible in java, unless one used gjc. For example using a bartpe where I don't have java installed.
If the JRE is properly installed, you can just start the jar file via command line like an exe file. For better portability, I guess I'll distribute a portable JRE and pack everything into an exe file (http://javazing.com/2007/04/05/creating-a-distribution-package-of-your-java-application/) so that you can run the program without having the JRE installed.
I fear that the saved scripts won't work anymore when I compile the jar to native machine code because I use serialization.

Currently the installer for mydefrag adds three of the scripts to the task scheduler. It does so by the command At at prompt. I was suggesting throwing a method to schedule a script in a similar method (by invoking AT command).
I've looked at the commands. I guess I can implement a simple task scheduler to create a daily or weekly tasks (plus viewing and removing them properly).

But you can't edit the layout.ini, only copy or delete it.
I can by going to the Prefetch folder, getting administrator rights (UAC), opening the layout.ini with Notepad++, edit and save. I use Win7 with active UAC. I know that not all files in the system and program folder are editable like that, because of the permissions.

Would handy to have a tool to import the current layout.ini as a new file, and method to point to it via importlistfromfile. Additionally if you want to be able to load the file as table that could be searched & temporarily sorted, so entries could be deleted or added (using a two column array).
MyDefrag offers a few commands to sort files (name, size, dates, etc.). Apart from that, the layout.ini is sorted in a special way: In the order the files are loaded. Any other sorting would make the system slower.

To be able to look at the file is a good idea and easy to implement, but altering the content may not, especially for the layout.ini which always changes. You'll have to edit the file every time. Instead of removing files from the list, you could use "not()" to exclude these file every time. Could you give me a specific example how you want to edit the file? And what is the second column intended for?
Logged

Need help creating a script? Try MyDefrag Script Creator.
BloodySword
Global Moderator
JkDefrag Hero
*****
Posts: 1158



View Profile
« Reply #12 on: July 17, 2010, 03:19:30 pm »

No, please no version with internal JRE. I'm glad, that I linked all programs with own JRE to the latest one wich I've installed using symbolic links. Why should anyone have 50 JREs installed?
Logged

Greetings from Germany!
Darlis
JkDefrag Hero
*****
Posts: 1762


View Profile WWW
« Reply #13 on: July 17, 2010, 05:49:27 pm »

Don't panic. I'll also offer a lightweight version without JRE. Wink
Logged

Need help creating a script? Try MyDefrag Script Creator.
BloodySword
Global Moderator
JkDefrag Hero
*****
Posts: 1158



View Profile
« Reply #14 on: July 17, 2010, 11:36:40 pm »

Oh that's good news...

Somehow ... I don'T like Java much...
Dont' ask me why. If I think of the performance,
it is way slower than native programs but some
experts say that Java is not much slower than
C / C++ but shurely it does not have the speed
when you use ASM.

Some of you might think similar about .NET.
But .NET recompiles the intermediate code while
running and it will get even more speed than
ASM (sometimes on some plattforms).
Logged

Greetings from Germany!
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!