Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 25, 2013, 06:53:20 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: Bug ..ExcludeVolumes? WhenFinished(wait)? in Settings.MyD  (Read 1440 times)
ToolmakerSteve
JkDefrag Hero
*****
Posts: 53


View Profile
« on: April 15, 2009, 06:27:07 am »

Jeroen,

Looking good. Just tried MyDefrag, b3.  Some comments.

*** UPDATE: SEE NEXT MESSAGE: I WAS WRONG HERE ABOUT WHAT WAS HAPPENING ***
Suggestion? Bug? 1. Suggest adding comment line in Settings.MyD, above "WhenFinished(wait)",
cautioning people to only add script lines ABOVE that line.

Ex:
...
OtherInstances(exit)
#----- Add commands here -----

#----- WhenFinished(wait) must be last line -----
WhenFinished(wait)


I was about to submit a bug report, because I had added the line

ExcludeVolumes(Name("c:"))

to the end of Settings.MyD, so I could experiment with drive d,
knowing I wasn't touching drive c.

The result of adding that line was that AnalyzeOnly window would appear for just a fraction of a second, and then disappear.

Even examining the log file didn't give me any clue as to what went wrong.


- - - - - - - - - -
Suggestion 2. Perhaps log file should (Optionally?) list all script lines executed.
So that if you preserve a log file, you know what settings were active.


- - - - - - - - - -
Suggestion 3. I once had MyDefrag opened and paused on a disk analysis. Forgot about it, tried to run another. Window appeared for a fraction of a second and disappeared.

IDEA: If already running, leave a message box behind saying: "MyDefrag is already running."

I see that the log file does say "I am already running: MyDefrag.exe", so that helped.

Thanks,
Steve
« Last Edit: April 15, 2009, 06:54:16 am by ToolmakerSteve » Logged
ToolmakerSteve
JkDefrag Hero
*****
Posts: 53


View Profile
« Reply #1 on: April 15, 2009, 06:35:57 am »

Hmm, this gets wierder.

Actually, it doesn't matter WHERE the
ExcludeVolumes(Name("c:"))
line is, that line doesn't work in Settings.MyD.

What I had done differently between the two tests is left that line in AnalyzeOnly.

Good#1: What I mean is, if that line is in BOTH AnalyzeOnly AND Settings,
then it works fine:
Settings.MyD:
...
ExcludeVolumes(Name("c:"))
WhenFinished(wait)

AnalyzeOnly.MyD:
...
RunScript('Settings')
WhenFinished(exit)

ExcludeVolumes(Name("c:"))
VolumeSelect
...

Good#2:
If I place that ExcludeVolumes line in AnalyzeOnly ONLY, it works fine.


Bugged: But if that line is in Settings ONLY, AnalyzeOnly script decides that there is no work to be done,
and promptly closes itself, after emitting normal-looking lines to log, ending with
Finished executing the script:
Settings.MyD:
...
ExcludeVolumes(Name("c:"))
WhenFinished(wait)

AnalyzeOnly.MyD:
...
RunScript('Settings')
WhenFinished(exit)

VolumeSelect
...


Somehow, there is a difference between ExcludeVolumes run within Settings, and the same command run in the top level script (which here is AnalyzeOnly). Speaking as a fellow programmer, it is probably a big clue that placing the same exclusion in both places cancels the bug. I had sort of assumed the two exclusions would be accumulative, but this behavior suggests that the second one seen overrides the first one, and that somehow the first one being in a nested script does something unexpected.
« Last Edit: April 15, 2009, 06:49:42 am by ToolmakerSteve » Logged
Steve Coffee
JkDefrag Hero
*****
Posts: 53


View Profile
« Reply #2 on: April 15, 2009, 11:38:30 am »

Suggestion 2. Perhaps log file should (Optionally?) list all script lines executed.
So that if you preserve a log file, you know what settings were active.

If you run at a higher debug level, the log file will include the text of the script.  I think -d 5 will do it.
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #3 on: April 15, 2009, 04:47:22 pm »

I had added the line ExcludeVolumes(Name("c:")) to the end of Settings.MyD .... The result of adding that line was that AnalyzeOnly window would appear for just a fraction of a second, and then disappear.
Thanks for testing, I appreciate it! You have found a bug. Or perhaps I should call it a quirk. I will spare you a long technical explanation, it boils down to that the ExcludeVolumes() and ExcludeFiles() settings can only be used in a main script, not in any script that is called from within a script, such as Settings.MyD. I have made a note and will fix it in the future.

Quote
Suggestion 2. Perhaps log file should (Optionally?) list all script lines executed.
Beta 3 is set for debug level 1. The script is written to the logfile at debug level 2 or higher (see the "-d" commandline switch). Higher debug levels give more information.

Quote
tried to run another. Window appeared for a fraction of a second and disappeared.
See the OtherInstances() setting. Default setting (in the Settings.MyD script) is to quietly "exit".
Logged
ToolmakerSteve
JkDefrag Hero
*****
Posts: 53


View Profile
« Reply #4 on: April 15, 2009, 08:21:12 pm »

Jeroen - thanks!

Is there an option for a complete dump of all moved files?  Path name, size, "before" location of first fragment, number of fragments, "after" location?

Would be useful during testing.

UPDATE:
Also "last access datetime", "last modify datetime".
« Last Edit: April 15, 2009, 08:23:37 pm by ToolmakerSteve » Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #5 on: April 16, 2009, 04:18:38 pm »

Is there an option for a complete dump of all moved files?  Path name, size, "before" location of first fragment, number of fragments, "after" location?
No. The next version will have a new function that will append a text to a logfile, with a lot of macros to choose from. In the future it will be possible to write a complete list of files, but not yet in the next version.
Logged
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!