By setting x := A_ScreenWidth/2, y := A_ScreenHeight/2 I expect the top left corner of the window would move to the center of the screen but it it move to lower right corner. Or probably I misunderstood how it work.
And another question which I'm not sure if it's ok to ask here or better to make a new thread.
How can I make the window open by this Rufaydium always on top?
Code: Select all
#include Rufaydium.ahk
w := 500
h := 500
x := A_ScreenWidth/2
y := A_ScreenHeight/2
Chrome := new Rufaydium()
Page := Chrome.NewSession()
; navigate to url
Page.Navigate("https://www.autohotkey.com/")
page.setrect(x,y, w,h)
return
#f12:
Chrome.QuitAllSessions() ; close all session
Chrome.Driver.Exit() ; then exits driver
exitapp