sbbcarl has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to set focus to the spell check window that I am displaying, not really sure how to go about doing that. Any suggestions?
#Open up MS Word and only display the spellcheck box. my $Word = Win32::OLE->new('Word.Application', 'Quit'); $Word->{'Visible'} = 0; my $TmpDocument = $Word->Documents->Open($fileLocation) || die("Unable to open document ", Win32::OLE->LastError()); $TmpDocument->Activate; $TmpDocument->CheckSpelling; #Save the text file back to its original location $Word->ActiveDocument->SaveAs($fileLocation); $Word->Quit;

Replies are listed 'Best First'.
Re: Set Focus
by choroba (Cardinal) on Sep 19, 2013 at 16:20 UTC
    Crossposted at StackOverflow. It is considered polite to inform about crossposting so hackers not attending both sites do not waste their efforts solving a problem already closed at the other side of the Internets.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re: Set Focus
by SuicideJunkie (Vicar) on Sep 19, 2013 at 20:57 UTC

    Win32::GuiTest has a lot of handy functions for Windows manipulation stuff like setting focus.