pintas Posted June 3, 2009 Posted June 3, 2009 I'm trying to run a program on a lan-house and i need the program to run on top of the lan-house client software (VSCyber) wich i am currently admin, but i also want the script to stay ONLY on top of VSCyber and nothing else. I don't want it to get focus when other programs are running, like games, etc. I've searched the forum, and the only thing i found was this code below, but it still doesn't work. What am i doing wrong? I'm looking to get $MAINGUI on top of window named "VSCyber.Net Client - 2.6 - Free" alone. Can anyone help me please? I've already lost the entire day trying to figure this thing out... Func MAINGUI() $MAINGUI= GuiCreate("Window", 205, 150, @DesktopWidth- 218, @DesktopHeight - (15 + 200), BITOR($WS_POPUP, $WS_DLGFRAME), $WS_EX_TOOLWINDOW) $GuiPosition= WinGetPos("Window") $meOnTop = False While 1 If WinActive("VSCyber.Net Client - 2.6 - Free", "") And $meOnTop = False Then GuiSetState(@SW_ENABLE, $MAINGUI) WinActivate($MAINGUI, "") $meOnTop = True EndIf If Not WinActive("VSCyber.Net Client - 2.6 - Free", "") And $meOnTop = True Then GuiSetState(@SW_DISABLE, $MAINGUI) EndIf Sleep(200) WEnd EndFunc
Valuater Posted June 3, 2009 Posted June 3, 2009 Maybe... Func MAINGUI() $MAINGUI = GUICreate("Window", 205, 150, @DesktopWidth - 218, @DesktopHeight - (15 + 200), BitOR($WS_POPUP, $WS_DLGFRAME), $WS_EX_TOOLWINDOW) $GuiPosition = WinGetPos("Window") WinSetOnTop("Window", "", 1) $meOnTop = False While 1 If WinActive("VSCyber.Net Client - 2.6 - Free", "") And $meOnTop = False Then GUISetState(@SW_SHOW, $MAINGUI) $meOnTop = True EndIf If Not WinActive("VSCyber.Net Client - 2.6 - Free", "") And $meOnTop = True Then GUISetState(@SW_HIDE, $MAINGUI) EndIf Sleep(200) WEnd EndFunc ;==>MAINGUI 8)
pintas Posted June 3, 2009 Author Posted June 3, 2009 Thanks for your help. Still not working... Somehow the VSCyber stays on top and my window disapears...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now