AutoHotkey Community

It is currently May 27th, 2012, 1:02 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: How can i do this
PostPosted: December 12th, 2011, 5:29 pm 
How can i do this when i open my gui then its show over the web page.
like google home page already active then gui show over the google page. if web page open right side then gui open right side if web page open left side it open left side. there are any function in auto hot key.


where the web page located in system gui open that side


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 12th, 2011, 5:38 pm 
Offline

Joined: June 9th, 2008, 2:32 am
Posts: 936
Location: Canada
why not just imbed the webpage into your gui?

_________________
Image
I know i have 6 legs. It's cuz I'm special.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 12th, 2011, 9:02 pm 
Offline

Joined: June 4th, 2010, 9:04 pm
Posts: 1347
Location: california
something like this perhaps?
Code:
#noenv
#singleinstance,  force
settitlematchmode, 2

guiname = MyGui
webbrowser =  Mozilla

gosub FollowBrowser
Gosub opengui
return

GuiClose:
ExitApp

OpenGui:
    e = +E0x101
    Gui,  color, 0xF0a030
    Gui, +Resize
    Gui, Add, Text,,this is my gui
    Gui, Add, Text,, it follows the browser
    ; show the gui window
    Gui, Show, Title, %GuiName%
    WinSet, AlwaysOnTop, On, %GuiName%
    SetTimer, FollowBrowser, 1000
Return

FollowBrowser:
    guilocx = 0
    guilocy = 0
    IfWinExist, %WebBrowser%
    {   WinGetPos, winlocx, winlocy, wwidth, wheight, %WebBrowser%
        guilocx = %winlocx%
        guilocy = %winlocy%
    }
    WinMove, %GuiName%,, %guilocx%, %guilocy%
    WinSet, Top,, %GuiName%
    WinSet, AlwaysOnTop, Off, %WebBrowser%
   
Return

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2011, 4:41 pm 
Thanks But it can work in all browser like google crome and other internet explorer and I want that GUI show in center the web page.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2011, 10:39 pm 
Offline

Joined: June 4th, 2010, 9:04 pm
Posts: 1347
Location: california
What you said at the beginning was...
Quote:
How can i do this when i open my gui then its show over the web page.
like google home page already active then gui show over the google page. if web page open right side then gui open right side if web page open left side it open left side. there are any function in auto hot key.

What i provided was a "method" for the script gui to follow the google Chrome browser. Perhaps the details of what you needed could be expanded to include opening the gui in the middle of the browser's page. That could easily be done by a simple modification to the program.
Code:
IfWinExist, %WebBrowser%
    {   WinGetPos, winlocx, winlocy, wwidth, wheight, %WebBrowser%
        guilocx := (wwidth // 2)
        guilocy := (wheight // 2)

        ; if you wish to center the gui exactly you need also the gui's height and width as well
       ; then you would take the width of the gui // 2 and subtract that from the previous guilocx position
       ; then you would do the same with the gui's height and subtract that from the previous guilocy position
       ; the result of those calculations, given to a winmove command
       ; should place the center of the gui in
       ; the center of the browser window regardless of where the browser
       ; is placed on the screen
    }

As far as selecting which browser you are using you can make a list of browsers you have currently installed on your machine and check which one is currently the TOP or "active "window and place the gui over that one but then you'd have to recalculate the gui position for the new active window and move the Gui there. As you alter the requirements for which browsers to support, and what positions they can occupy on the screen, and which windows the gui has to appear over or not, the program becomes more complex and more conditions have to be introduced into the script to compensate for those options.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Amandaville, BrandonHotkey, chaosad, Yahoo [Bot] and 17 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group