Hi,
I have this code below:
How to change for this widgetx to be in front (over) of IE only when I have open and it's active an IE Tab address like google.com or yahoo.com and not other URLs when opened in same or another IE tabs?
May thanks![:)]()
I have this code below:
How to change for this widgetx to be in front (over) of IE only when I have open and it's active an IE Tab address like google.com or yahoo.com and not other URLs when opened in same or another IE tabs?
May thanks
![:)](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/smile.png)
[ autoit ]
#include #include Opt("WinTitleMatchMode", 2) HotKeySet("{ESC}", "On_Exit") Func On_Exit() Exit EndFunc Local $gui = WinGetHandle("[CLASS:IEFrame]", "Google") $Gui = GUICreate("widgetx", 300, 250, 122, 111, -1, ($WS_EX_TOOLWINDOW), $gui ) GUISetState(@SW_SHOW) $IE = ObjCreate("Shell.Explorer.2") $iActiveX = GUICtrlCreateObj($IE,0,0,300,250) $IE.navigate("http://www.autoitscript.com/") Global $iLast_X, $iLast_Y, $fToolBar_Vis = True Global $sMain_Title = "[CLASS:IEFrame]" Global $hApplication_Wnd = WinGetHandle($sMain_Title) Global $iApplication_PID = WinGetProcess($sMain_Title) Global $hToolBar = WinGetHandle ("[CLASS:AutoIt v3 GUI]","") GUISetState() _Toolbar_Follow() While 1 sleep(50) ; Check Application is running If Not ProcessExists($iApplication_PID) Then Exit If Not WinExists($sMain_Title) Then Exit ; Hide/show toolbar as required _Toolbar_State() WEnd Func _Toolbar_Follow() Local $aApplication_Pos = WinGetPos($hApplication_Wnd) If $aApplication_Pos[0] <> $iLast_X Or $aApplication_Pos[1] <> $iLast_Y Then $iLast_X = $aApplication_Pos[0] $iLast_Y = $aApplication_Pos[1] WinMove($hToolBar, '', $aApplication_Pos[0] + 360, $aApplication_Pos[1] - 25) EndIf EndFunc ;==>_Toolbar_Follow Func _Toolbar_State() ; If Application minimised, then hide toolbar and do nothing If BitAND(WinGetState($hApplication_Wnd), 16) = 16 Then ;GUISetState(@SW_HIDE, $hToolBar) ;$fToolBar_Vis = False ;If Application not minimised Else ; Hide ToolBar when Application not active If BitAND(WinGetState($hApplication_Wnd), 8) <> 8 And $fToolBar_Vis = True Then ; GUISetState(@SW_HIDE, $hToolBar) ; $fToolBar_Vis = False ElseIf BitAND(WinGetState($hApplication_Wnd), 8) = 8 And $fToolBar_Vis = False Then ; GUISetState(@SW_SHOW, $hToolBar) ; WinActivate($hApplication_Wnd) ; $fToolBar_Vis = True EndIf ; If visible check toolbar position If $fToolBar_Vis = True Then _Toolbar_Follow() EndIf EndFunc ;==>_Toolbar_State