Macro Recorder » Disk defragmentation macro (Win XP)

Disk defragmentation macro (Win XP)

1) The first line of the macro launches the Windows XP Disk Defragmenter:

OPEN FILE : dfrg.msc

2) The next line simply waits for the defragmenter window to appear:

WAIT FOR : Disk Defragmenter : appear : 2000

3) Finally this block launches the appropriate item in the defragmenter window menu (which in our case is "Actions - Defragment"):

Keyboard : AltLeft : KeyDown
Keyboard : A : KeyDown
Keyboard : A : KeyUp
Keyboard : D : KeyDown
Keyboard : D : KeyUp
Keyboard : AltLeft : KeyUp

Of course you don't have to actually type these commands when you create a script in Macro Recorder, you can use the toolbar instead. First you click "Insert 'Open file' command", then you click "Insert 'Wait for window' command" etc... Jitbit's macro-language remains "hidden", it is used only if you decide to edit a saved macro in some external text editor like Notepad (which is the preferred way for some programmers and tech-geeks).

Full macro:

OPEN FILE : dfrg.msc :  : 0
WAIT FOR : Disk Defragmenter : appear : 1000 : 0
Keyboard : AltLeft : KeyDown
Keyboard : A : KeyDown
Keyboard : A : KeyUp
Keyboard : D : KeyDown
Keyboard : D : KeyUp
Keyboard : AltLeft : KeyUp

more whitepapers Disk defragmentation macro (Win XP)

Macro Recorder