Jump to content

WinActivate doesn't activate dfrg.msc window!


Olish
 Share

Recommended Posts

Hello everybody,

I'm trying to activate the dfrg.msc window with WinActivate() or WinWaitActive and its title "Défragmenteur de disque". It works for the other windows but NOT for dfrg.msc window. Did someone incountered this problem?

Thank you in advance for helping me.

Olivier, from France.

Olivier, from France.Free Wake On LAN script

Link to comment
Share on other sites

i wrote *XPClean Menu* ( in my signature below)

and after careful thought, i realized that NOTHING should be open if you are going to use the defragmenter... not evn *XPClean Menu*,

so it closes when the defrag window appears

if you think of the defragments utility, you will agree

8)

NEWHeader1.png

Link to comment
Share on other sites

Thank you a lot for helping me.

:geek:

And like it is in French:

"Vive AutoIt!"

Olivier, from France.

I don't think the explanation was right WinActivate("title") and WinActivate("title","") do the same.

The problem can come from the fact you nedd to wait that the windows exist before activating it if needed.

$Title = "Défragmenteur de disque"; "MMCMainFrame"


$PID = Run("mmc Dfrg.msc", @SystemDir)
WinWait($Title)
$n=WinActivate($Title)
MsgBox(262144,'Debug line ~42','Selection:' & @lf & '$n' & @lf & @lf & 'Return:' & @lf & $n & @lf & @lf & '@Error:' & @lf & @Error);### Debug MSGBOX

try this code Thanks :o

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...