Jump to content
faustf

WinSetOnTop not work with brwser is possible?

Recommended Posts

faustf

hi guys ,  i want put on top always  a browser iexplorer , i  look winsetontop  function and i modify little bit always  for try tounderstund  how  work , but  with notepad work perfect  in iexplorer not work  ,o_O

this is my code

#include <AutoItConstants.au3>

Example()

Func Example()
    ; Retrieve the handle of the active window.
    Local $hWnd = WinGetHandle("[CLASS:IEFrame]")
    MsgBox(0, '', $hWnd)
    ; Set the active window as being ontop using the handle returned by WinGetHandle.
    While 1
        WinSetOnTop($hWnd, "", $WINDOWS_ONTOP)
        Sleep(100)
    WEnd

EndFunc   ;==>Example

this is my autoit info

>>>> Window <<<<
Title:  Accedi a Hotmail con Outlook, usa Messenger con Skype | MSN Italia - Internet Explorer
Class:  IEFrame
Position:   356, 184
Size:   1042, 745
Style:  0x16CF0000
ExStyle:    0x00000100
Handle: 0x00470698

>>>> Control <<<<
Class:  
Instance:   
ClassnameNN:    
Name:   
Advanced (Class):   
ID: 
Text:   
Position:   
Size:   
ControlClick Coords:    
Style:  
ExStyle:    
Handle: 

>>>> Mouse <<<<
Position:   1223, 199
Cursor ID:  0
Color:  0x808080

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
Navigation Bar
Address Bar
http://www.msn.com/it-it/?ocid=iehp
Address Combo Control
Page Control
Search Bar
Address Combo Control
Favorites and Tools Bar
ITBarHost
Menu Bar
Accedi a Hotmail con Outlook, usa Messenger con Skype | MSN Italia - Internet Explorer


>>>> Hidden Text <<<<
Page Control

i look msgbox  return correct handle  but not  work

if  someone  could  help me  ,I will be grateful :D  thanmkz  at all

Share this post


Link to post
Share on other sites
FrancescoDiMuro

Why do you need a While 1...Loop in there?
By the way, did you check the return value of WinSetOnTop() function?


Best Regards.


Click here to see my signature:

Spoiler

I will always thank you for the time you spent for me.
I'm here to ask, and from your response, I'd like to learn.
By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

ALWAYS GOOD TO READ:

In case I am violating some pseudo Forum rule, or I am doing something wrong, I want let you know that I'm not doing this on purpose, and for this, I kindly ask you to send me a private message about the "bad content" I posted, in order to edit/remove it, and to not be warned wrongly.
Thanks in advance.

 

Share this post


Link to post
Share on other sites
orbs

@faustf, the code at the first post works for me - as long as only a single window of IE is open. that same window must be already open before the script starts, and must be kept open throughout the script execution. you have written your code to fail in any other circumstances.

Share this post


Link to post
Share on other sites
faustf

i write in loop because in out loop not  work i thinked , i try in loop but  also in loop not  worked for me

if i use noptepad  work good  but if i use iexplorer not work

 

Share this post


Link to post
Share on other sites
faustf

yeaaaa now  work thankz  alot

Share this post


Link to post
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

×