© J.C. Kessels 2009
MyDefrag Forum
May 26, 2013, 06:18:25 am
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
MyDefrag Forum
>
MyDefrag v4 Forum
>
Requests for new features
>
Need to redesign scripting to use an "include" or some "global" vars
Pages: [
1
]
« previous
next »
Print
Author
Topic: Need to redesign scripting to use an "include" or some "global" vars (Read 642 times)
vitrom
Guest
Need to redesign scripting to use an "include" or some "global" vars
«
on:
June 26, 2010, 01:48:20 pm »
Looking on a "standard" scripts i've found that a many parameters like zones gap, files masks etc. etc. are duplicated in the every script even of the same "category", for example "Sys disk" -- daily/weekly/monthly -- contains the same parameters except sorting method and something else.
It may lead to an useless moving of already optimized data when a user just forgot to change a value in the one of many scripts -- for example, daily and monthly defrag with a 1% gap and a weekly with a default 0,1% will result to a very big useless and time wasting shift.
IMO it's wrong and any reused variables needs to be moved out of scripts into the "Settings.myd" or "dailyconf.myd" or something like this and used in a scripts like a global variables.
--
xcuse me for my english but i hope i'm understandable.
Logged
Darlis
JkDefrag Hero
Posts: 1710
Re: Need to redesign scripting to use an "include" or some "global" vars
«
Reply #1 on:
June 27, 2010, 03:44:15 pm »
Your request is similar to the one in this thread:
include file for SpaceHogs definition
I guess Jeroen's answer in that thread would also apply to this one. And of course you can change the scripts for yourself, if you think this could be a better solution. You can use
SetVariable
to define the global variables you need.
Logged
Need help creating a script? Try
MyDefrag Script Creator
.
vitrom
Guest
Re: Need to redesign scripting to use an "include" or some "global" vars
«
Reply #2 on:
June 27, 2010, 06:02:05 pm »
Oops! Thank U very much! I didn't found it after textsearch over helpfile.
Quote
change the scripts for yourself, if you think this could be a better solution
I think it's the one only right solution (aka "reusing")
Logged
poutnik
JkDefrag Hero
Posts: 1105
Re: Need to redesign scripting to use an "include" or some "global" vars
«
Reply #3 on:
June 27, 2010, 10:41:09 pm »
I use for my system partition the only script with a Fileactions defined by macro :
FileSelect
"FileSelection"
FileActions
!Factions!
FileEnd
and calling the script with parameters, defining the actions.
E.g. my system custom weekly-like script is call by this command:
C:\Utils\dfrc.myd -m "Factions=Defragment(chunksize(64)) FastFill(WithShuffling)"
«
Last Edit: June 27, 2010, 10:44:04 pm 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.
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
MyDefrag v4 Forum
-----------------------------
=> Announcements
=> Questions and help
=> Bugs and problems
=> Requests for new features
=> Scripts, and other contributions
-----------------------------
JkDefrag v3 Forum
-----------------------------
=> Announcements
=> Questions and help
=> Bugs and problems
=> Requests for new features
=> Programming with the library
Loading...