bisschen komisch formuliert,
aber wie mache ich es, das wenn ein Ladebalken (guictrlcreateprogress) auf 0 ODER UNTER 0 IST eine msgbox erscheint??
also
z.B:
Spoiler anzeigen
If $Progress1=0/-1/-2 ;etc
msgbox(0,"","blah")
bisschen komisch formuliert,
aber wie mache ich es, das wenn ein Ladebalken (guictrlcreateprogress) auf 0 ODER UNTER 0 IST eine msgbox erscheint??
also
z.B:
If $Progress1=0/-1/-2 ;etc
msgbox(0,"","blah")
If $Progress1 <= 0 Then MsgBox(0,"","blah")
[/autoit]Hallo aflakes,
eine Progressbar kann Werte von 0 bis einschliesslich 100 annehmehn. Lasse folgendes Skript laufen beobachte die Scite-Konsole und du verstehst (hoffentlich)
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 625, 445, 192, 124)
$Progress1 = GUICtrlCreateProgress(32, 336, 473, 97)
$Button1 = GUICtrlCreateButton("+", 240, 120, 281, 41, $WS_GROUP)
GUICtrlSetData($Progress1, 120) ;zu gross
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
set()
AdlibRegister("set",100)
EndSwitch
WEnd
Func set()
Local $i = GUICtrlRead($Progress1)
ConsoleWrite($i & @crlf)
GUICtrlSetData($Progress1, $i- 1)
EndFunc ;==>set
mfg autoBert
und wenns größer als 0 sein soll
[autoit]If $Progress1 => 0
[/autoit]
oder
If $Progress1 >= 0
[/autoit]da du denke ich mal den Status berechnest, kannst du ja direkt die Variable nutzen, um zu überprüfen, ob die kleiner 0 ist
[autoit]$Gui =GUICreate("bla", 100, 100)
$Progress = GUICtrlCreateProgress(0,0, 90, 90)
GUISetState(@SW_SHOW, $Gui)
[/autoit][autoit][/autoit][autoit]For $i = 100 To - 100 Step -1
GUICtrlSetData($Progress, $i)
Sleep(100)
If $i < 0 Then
MSgBox (0, "", "Unter 0")
ExitLoop
EndIf
Next
thx TheLuBu,
aber wie schaffe ich, das eine bestimmte funktion (z.b. msgbox) in einem bestimmten "Raum" erscheint, also
wenn der Wert 50-75 ist?
If $i < 75 AND $i > 50 Then
MSgBox (0, "", "Zwischen 50 und 75")
EndIf
Siehe auch http://translation.autoit.de/onlinehilfe/in…g_operators.htm
Danke