FroZenBabE Posted February 22, 2011 Posted February 22, 2011 Also ich versuche gerade einen bot zu erstellen mit 2 buttons . Butten 1 soll die while schleife starten das z.b immer Send("hallo") kommt.Das funktioniert einwandfrei aber wenn ich nun Button 2 drücke passiert garnix!(Button 2 sollte die while schleife unterbrechen so das ich ihn wieder starten kann wenn ich auf button 1 klicke).Es läuft einfach weiter und ich muss es dann mit dem task manager beenden.Habe auch schon hier im Forum geschaut auch ein paar sachen zu ExitLoop gefunden aber irgendwie konnten die mir nicht weiter helfen.Achja hier ist mal mein Script#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 225, 113, 192, 124) $Start = GUICtrlCreateButton("Start", 16, 8, 75, 25, $WS_GROUP) $Stop = GUICtrlCreateButton("Stop", 112, 8, 75, 25, $WS_GROUP) $Exit = GUICtrlCreateButton("Exit", 64, 48, 75, 25, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() If $nMsg = $Start Then while 2 sleep(1000) send("hallo") Sleep(1000) If $nMsg = $Stop Then ExitLoop EndIf WEnd EndIf If $NMsg = $GUI_EVENT_CLOSE Then ExitLoop WEndHabe schon lang nichts mehr mit AutoIT gemacht also bitte keine Beleidigungen weil die Lösung wahrscheinlich ziehmlich einfach ist : Dennoch bin für jeden noch so kleinen Tipp dankbar Mfg FroZenBabE
Kalin Posted February 22, 2011 Posted February 22, 2011 (edited) Sorry brah, this forum is English only. But you might wanna check these out. German forums: http://www.autoit.de/ French forums: http://www.autoit.fr/ Spanish forums: http://www.autoit.es/ Polish forums: http://www.autoit.xaa.pl/ Edited February 22, 2011 by Kalin
Moderators Melba23 Posted February 22, 2011 Moderators Posted February 22, 2011 FroZenBabE,Willkommen in der AutoIt-Forum. Dies ist eine englischsprachige Forum - die deutschesprachige Forum ist http://www.autoit.de.Wenn Sie Englisch sprechen könnten Sie versuchen das Interrupting a running function Lesen der Anleitung im Wiki. Es zeigt, wie in Ihrem While ... Wend Schleife durchbrechen. Aber verwenden Sie NICHT die "Bot" Wort, das hier wieder. M23Trans (short version):Welcome.We speak English but there is a German forum.Read the Wiki tutorial if your English is good enough.Avoid the "bot" word in future. Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Reveal hidden contents ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now