Jump to content

Recommended Posts

Posted (edited)

im having difficulties on using controls when a loop exists

example:

While @InetGetActive
ToolTip("Downloading", 0, 0, "Info")
$nmsg = GUIGetMsg()
Select
Case $nmsg = $b_cansel
If @InetGetActive Then
InetGet("abort")
ToolTip("")
Else
Sleep(10)
EndIf
Case $nmsg = $GUI_EVENT_CLOSE
InetGet("abort")
Exit
EndSelect
WEnd
ToolTip("")

the problem is that the buttons dont work and the loop continues again and again without the buttons working

i also tryed putting the buttons out of the loop and using exitloop but again it doesnt work..

any help would be appreciated..

EDIT:cmn its a noob question

Edited by c4nm7
Posted

im having difficulties on using controls when a loop exists

example:

While @InetGetActive
ToolTip("Downloading", 0, 0, "Info")
$nmsg = GUIGetMsg()
Select
Case $nmsg = $b_cansel
If @InetGetActive Then
InetGet("abort")
ToolTip("")
Else
Sleep(10)
EndIf
Case $nmsg = $GUI_EVENT_CLOSE
InetGet("abort")
Exit
EndSelect
WEnd
ToolTip("")

the problem is that the buttons dont work and the loop continues again and again without the buttons working

i also tryed putting the buttons out of the loop and using exitloop but again it doesnt work..

any help would be appreciated..

EDIT:cmn its a noob question

and i thought that this is toooo easy to be answered....
Posted

and i thought that this is toooo easy to be answered....

No.... you havn't given it a chance.

Maybe??

While 1
    ToolTip("Downloading", 0, 0, "Info")
    $nmsg = GUIGetMsg()
    Select
        Case $nmsg = $b_cansel
            If @InetGetActive Then
                InetGet("abort")
                ToolTip("")
            Else
                Sleep(10)
            EndIf
        Case $nmsg = $GUI_EVENT_CLOSE
            InetGet("abort")
            Exit
        Case Not @InetGetActive
            ExitLoop
    EndSelect
WEnd
ToolTip("")

I don't know much without a full GUI to test with though...

Posted

While 1

ToolTip("Downloading", 0, 0, "Info")

$nmsg = GUIGetMsg()

Select

Case $nmsg = $b_cansel

If @InetGetActive Then

InetGet("abort")

ToolTip("")

Else

Sleep(10)

EndIf

Case $nmsg = $GUI_EVENT_CLOSE

InetGet("abort")

Exit

Case Not @InetGetActive

ExitLoop

EndSelect

WEnd

ToolTip("")

ok it works but the gui is too slow and the button replyes after about 30 seconds after i hit the button

any way to make it faster?

Posted

ok it works but the gui is too slow and the button replyes after about 30 seconds after i hit the button

any way to make it faster?

Maybe?

ToolTip("Downloading", 0, 0, "Info")
While 1
    $nmsg = GUIGetMsg()
    Select
        Case @InetGetActive
            Select
                Case $nmsg = $b_cansel
                    InetGet("abort")
                    ExitLoop
                Case $nmsg = $GUI_EVENT_CLOSE
                    InetGet("abort")
                    Exit
            EndSelect
        Case Else
            ExitLoop
    EndSelect
WEnd
ToolTip("")

Like I said before, a full GUI would help tenfold.

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
×
×
  • Create New...