Jump to content

MS Edge and WinWaitActive


Marc123
 Share

Recommended Posts

HI,

 

i am quite a noob in AutoIT, just using small simple scripts here an there.

I recently changed to Windows 10, using MS Edge instead of Chrome right now.

So i want to change a Script that used Chrome to Edge, solved the starting issues with Edge with the help of this forum but now i am stuck using WinWait or WinWaitActive...

This is what i do:

ConsoleWrite("Login" & @CRLF)

   ; Edge starten
   Local $edge = RunWait('explorer.exe shell:AppsFolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge')

ConsoleWrite("1" & @CRLF)

   WinWaitActive("Start ?- Microsoft Edge")

ConsoleWrite("2" & @CRLF)

   WinSetState ("Start ?- Microsoft Edge", "",@SW_MAXIMIZE)

ConsoleWrite("3" & @CRLF)

Result: Edge pops up, but i can not get the WinWaitActive to recognize it running ?

I used ( as i did many times before ) the AutoIT Window Info tool and copied the Window Title to the script, but somehow it gets stuck with Console-Code "1" ?

Is there anything different in Win10 with recognizing open Windows ? I can not find anything related on the forum yet..but maybe i search the wrong keywords :)

 

Can someone please help me here with a simple solution ?

 

 

 

 

Edited by Marc123
Link to comment
Share on other sites

not sure if this falls in your category of simple solution.

but in examples you can go to iuiautomation thread and try simplespy.

returns

Mouse position is retrieved 1241-58
At least we have an element [Microsoft Edge][Windows.UI.Core.CoreWindow]

Having the following values for all properties: 
Title is: <Microsoft Edge>  Class   := <Windows.UI.Core.CoreWindow> controltype:= <UIA_WindowControlTypeId> ,<50032>    , (0000C370)    952;53;1200;932

I tried with the au3inf tools but seems not to recognize edge browser

Link to comment
Share on other sites

This works for me:

ConsoleWrite("Login" & @CRLF)

; Edge starten
Local $edge = RunWait('explorer.exe shell:AppsFolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge')

ConsoleWrite("1" & @CRLF)

;~    WinWaitActive("Start ?- Microsoft Edge")
$handle = WinWaitActive("Start")

ConsoleWrite("2" & @CRLF)
beep(1000,100)

WinSetState($handle, "", @SW_MAXIMIZE)

ConsoleWrite("3" & @CRLF)
Sleep(1000)
WinSetState($handle, "", @SW_MINIMIZE)
MsgBox(64+262144, Default, "Edge is minimized",0)
WinSetState($handle, "", @SW_MAXIMIZE)

 

App: Au3toCmd              UDF: _SingleScript()                             

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...