Jump to content
Sign in to follow this  
andygo

loop or timer DURING msgbox

Recommended Posts

hello,

i want to do this:

_Timer_SetTimer($maingui, 1000, "blink")
if msgbox (68, "test", "test", 0, WinGetHandle ($hi)) = 6 Then $i = 0
_Timer_KillAllTimers($maingui)

func blink()
    GuiSetState(@sw_hide, $area)
    sleep(500)
    GuiSetState(@sw_show, $area)
endfunc

if a special button is clicked in my maingui a msgbox pops up.

during the msgbox i want my gui blinking. but the code above dont work.

could someone help me?

Edited by andygo

Share this post


Link to post
Share on other sites

Is the return value of the MsgBox important?


Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post


Link to post
Share on other sites

In case you don't need the return value of the MsgBox you don't need the Timer-functions.

Global $i = 0

AdlibRegister("_Blink", 100)
Local $str = "Local $x = MsgBox(64, 'Test', 'Hello!!')"
Run('"' & @AutoItExe & '" /AutoIt3ExecuteLine "' & $str & '"')


While 1
 Sleep(2000000)
WEnd

Func _Blink()
 ToolTip($i)
 $i += 1
EndFunc

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post


Link to post
Share on other sites

In case you don't need the return value of the MsgBox you don't need the Timer-functions.

Global $i = 0

AdlibRegister("_Blink", 100)
Local $str = "Local $x = MsgBox(64, 'Test', 'Hello!!')"
Run('"' & @AutoItExe & '" /AutoIt3ExecuteLine "' & $str & '"')


While 1
 Sleep(2000000)
WEnd

Func _Blink()
 ToolTip($i)
 $i += 1
EndFunc

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...