Sign in to follow this  
Followers 0
danusko

make unactive GUI msg

3 posts in this topic

Hi all

can you help me? I can not find it in help.

I want make unactive GUI msgbox when i click in other window and i want activete this other window. Now when i run my script, always is active my GUI MSG box

thanks

this is script:

#include "C:\My documents\docs\AutoIt\Include\GUIConstants.au3"
AutoItSetOption ( "SendKeyDelay", 300 )

$WS_OVERLAPPEDWINDOW + $WS_CLIPSIBLINGS + $WS_EX_TOPMOST)
   GuiCreate("Pripomienka", 274, 75,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2,)



$text = GuiCtrlCreateInput("", 10, 10, 250, 20)
$Combo_4 = GuiCtrlCreateCombo("5", 10, 40, 80, 21)
$ok2 = GuiCtrlCreateButton("OK", 110, 40, 60, 20)
; GUICtrlSetState( -1, $GUI_DEFBUTTON)
$cancel3 = GuiCtrlCreateButton("Zruiť", 200, 40, 60, 20)
GuiCtrlSetData($combo_4, "10|30|60|90|120|240|360", "5")

while 1
 
GuiSetState()
 
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
         ExitLoop
        
    Case $msg = $ok2
      $data = GUICtrlRead($Combo_4)
      $info = GUICtrlRead($text)
        GUISetState(@SW_HIDE)
        for $x = $data to 1 Step -1

$u = @DesktopWidth - 120
$v= @DesktopHeight - 100 
 
 ToolTip($x & " " & $info, $u, $v)
; TrayTip($info, $x & " ", 5)
        $pos = MouseGetPos()
;       $pos = MouseClick("left", $u, $v, 2)



        If $pos[0] > $u And $pos[1] > $v Then
;       If $pos[0] > @DesktopWidth - 260 And $pos[1] > @DesktopHeight - 90 Then
 ToolTip("", $u, $v)
            ExitLoop
        EndIf
        sleep(1000)
 ToolTip("", $u, $v)
        Next
        GUISetState(@SW_SHOW)
 
    Case $msg = $cancel3
         ExitLoop
    EndSelect
 
WEnd
 
Exit

Share this post


Link to post
Share on other sites



while 1

GuiSetState()

^^ Thats why, you need to put guisetstate() before while 1 not in the loop

thanke you very much

thats i need

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
Sign in to follow this  
Followers 0