hi, folgendes problem:
ich habe ein schript geschrieben das eigentlich nur auseiner gui und funcs besteht, eine func beinhaltet eine schleife
[autoit]func pause()
while 1
sleep(100)
wend
endfunc
die zum pausieren dient. nun will ich mit einer anderen func die schleife beenden und die hauptfunc wieder fortsetzen. ich habe es mit exitloop versucht da passierte aber nix leider.
hier mal mein script: (den resr hab ich weggelassen wa ja nur die gui;))
Spoiler anzeigen
func haupt()
While 1
$color1 = GUICtrlRead($Sliderred)
$color2 = GUICtrlRead($Slidergreen)
$color3 = GUICtrlRead($Sliderblue)
$hexred = Hex(GUICtrlRead($Sliderred), 2)
$hexgreen = Hex(GUICtrlRead($Slidergreen), 2)
$hexblue = Hex(GUICtrlRead($Sliderblue), 2)
$hexcode = "0x" & $hexred & $hexgreen & $hexblue
GUICtrlSetData($ired,$color1)
GUICtrlSetData($igreen,$color2)
GUICtrlSetData($iblue,$color3)
GUICtrlSetData($ihex,$hexcode)
GUICtrlSetBkColor($lpic,$hexcode)
code()
sleep(50)
WEnd
EndFunc
func code()
$g = GUICtrlRead($gr)
$c1 = GUICtrlRead($f)
$c2 = GUICtrlRead($k)
$code1 = GUICtrlRead($ired)
$code2 = GUICtrlRead($igreen)
$code3 = GUICtrlRead($iblue)
$full = "°[" & $code1 & "," & $code2 & "," & $code3 & "]°" & "°" & $g & "°_"""
$titel = WinGetTitle ( "Channel:")
$text = ControlGetText($titel,"",1)
If $text = "" then
WinWaitActive($titel,$text)
If $c1 = $gui_checked and $c2 = $gui_checked Then
ControlSetText($titel,$text,1,"°[" & $code1 & "," & $code2 & "," & $code3 & "]°" & "°" & $g & "°_""")
ControlSend ($titel,$text,1,"{end}")
EndIf
If $c1 = $gui_unchecked and $c2 = $gui_unchecked then
ControlSetText($titel,$text,1,"°[" & $code1 & "," & $code2 & "," & $code3 & "]°" & "°" & $g & "°")
ControlSend ($titel,$text,1,"{end}")
EndIf
if $c1 = $gui_checked And $c2 = $gui_unchecked Then
ControlSetText($titel,$text,1,"°[" & $code1 & "," & $code2 & "," & $code3 & "]°" & "°" & $g & "°_")
ControlSend ($titel,$text,1,"{end}")
EndIf
if $c1 = $gui_unchecked and $c2 = $gui_checked Then
ControlSetText($titel,$text,1,"°[" & $code1 & "," & $code2 & "," & $code3 & "]°" & "°" & $g & "°""")
ControlSend ($titel,$text,1,"{end}")
EndIf
EndIf
EndFunc
func close()
Exit
EndFunc
func kill()
Exit
EndFunc
func sieben()
GUISetState(@sw_show,$hex)
EndFunc
Func sechs()
GUISetState(@sw_hide,$hex)
EndFunc
Func funf()
MsgBox(0+64,"Hilfe","Sie müssen alles benötigten Felder ausfüllen und dann im chat F7 drücken um dne Code einzufügen.")
EndFunc
Func vier()
MsgBox(0+64,"Zum Programm","Dieses Programm erstellt ""Message-Codes"" für den Chatroom ""Knuddels"".")
EndFunc
Func drei()
GUISetState(@sw_restore,$hex)
EndFunc
Func zwei()
GUISetState(@sw_minimize,$hex)
EndFunc
Func eins()
Exit
EndFunc
func button()
GUICtrlSetData($Sliderred,0)
GUICtrlSetData($Slidergreen,0)
GUICtrlSetData($Sliderblue,0)
GUICtrlSetData($gr,"")
GUICtrlSetState($k,$gui_unchecked)
GUICtrlSetState($f,$gui_unchecked)
EndFunc
Func acht()
EndFunc
Func neun()
while 1
sleep(100)
WEnd
EndFunc
hoffe ihr könnt mir helfen thx im voraus.