Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 21, 2013, 12:55:53 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Spacehog definition as Include macro in standard scripts  (Read 1706 times)
poutnik
JkDefrag Hero
*****
Posts: 1105


View Profile
« on: October 13, 2009, 06:29:15 am »

Hi Jeroen,

why not to define Spacehogs  in standard scripts by !Include PATH! macro ?
They would become much shorter.
Furthermore, all standard and customized scripts can share the common definition.

« Last Edit: October 13, 2009, 06:32:49 am by poutnik » 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.
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #1 on: October 13, 2009, 08:46:22 am »

Thanks for sharing your idea, I appreciate it. Feel free to do so yourself, but I have found that people find the scripts easier to read and understand without redirections like that. So I have decided some time ago to have the list of spacehogs literally in every script.
Logged
rlg118
JkDefrag Hero
*****
Posts: 78



View Profile
« Reply #2 on: October 18, 2009, 09:21:38 am »

Having spacehogs in a separate routine is the way to go.

The professor who taught me programming years ago would be aghast at the idea of having reusable code repeated in every program instead of using a CALL.
Logged

Rob G
Central New York, U.S.A.

"Sacred cows make the best hamburger." - Mark Twain
rlg118
JkDefrag Hero
*****
Posts: 78



View Profile
« Reply #3 on: October 31, 2009, 03:38:26 am »

The syntax of MyDefrag changes with every release and scripts are generally not upwards compatible.

All the more reason for having this reusable code separate. It certainly does not make the scripts any harder to follow.

If you have customized the Spacehog listing, it has to be added to every script (standard and customized) with every new version. That could be a lot of work, especially if you have different procedures for different drives.

It seems that inserting the macro would be a lot easier to do than some of the other enhancements that are suggested in the Requests for New Features forum.

Just my 1/50th of a dollar... I'll go away now.

Logged

Rob G
Central New York, U.S.A.

"Sacred cows make the best hamburger." - Mark Twain
MacJudge
JkDefrag Supporter
***
Posts: 15


View Profile
« Reply #4 on: October 31, 2009, 06:24:54 pm »

I also prefer some less redundant scripts, which made me write (or mostly copy and paste) the scripts I published in this post that are now finally working with 4.2.5.

But, as Jereon already told, the standard-scripts are restored with every new version, so that you have to copy your modifications to some other place before you upgrade. After this, you have to check for syntax-changes, which make your modifications not working any more.

Thats why I never use the standard-scripts and only look at them with every new version to improve my own scripts. Because my scripts have very little redundancy I finish this job quite fast, because changes have to be done at most time only in one (sub-)script.
Logged
rlg118
JkDefrag Hero
*****
Posts: 78



View Profile
« Reply #5 on: November 01, 2009, 02:32:01 am »

If every script had !include Spacehogs.myd! in it, that part would never have to be touched. Any other mods and you're on your own.
Logged

Rob G
Central New York, U.S.A.

"Sacred cows make the best hamburger." - Mark Twain
poutnik
JkDefrag Hero
*****
Posts: 1105


View Profile
« Reply #6 on: November 01, 2009, 06:30:45 am »

similarly, I started to use  FastFill(!FFaction!] in my script,  calling it

dfrc.myd -m FFaction=                       for FastFill()  in daily-optimize-like variant, and
dfrc.myd -m FFaction=WithShuffling     for FastFill(WithShuffling) in weekly-optimize-like variant.

similar can be done for Defragment, but I use exclusively chunksize(64) variant.


« Last Edit: November 01, 2009, 06:34:46 am by poutnik » 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.
poutnik
JkDefrag Hero
*****
Posts: 1105


View Profile
« Reply #7 on: November 03, 2009, 04:57:04 pm »

Or, similarly, keeping single custom stript with zone definitions, launching it by these commands,
either from shortcuts with parameters, either from CMD file.  ( this time verified )

dfrc.myd -m "Factions="                                   ( just cleaning gaps )        
dfrc.myd -m "Factions=Defragment(fast)"                                     
dfrc.myd -m "Factions=Defragment(fast) FastFill()"                       
dfrc.myd -m "Factions=Defragment(fast) FastFill(Withshuffling)"             
dfrc.myd -m "Factions=SortbyName(Descending)"               

and in the script there will be
Fileselect "zonedefinition" Fileactions !Factions! FileEnd

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.
Pages: [1]
  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!