ismael Posted March 17, 2007 Posted March 17, 2007 hi as I replace the jump of goto?,concretely example q I give you 1 goto,jump 2 Send("{xxxx}") 3 WinSetState("xxxxx -", "", @SW_SHOW) 4 label, jump 5 Run("notepad") 6 Send("hello") 7 exit as I can replace the jump ?thanks
improbability_paradox Posted March 17, 2007 Posted March 17, 2007 As I'm sure you've realized, the command "goto" does not exist in autoit v3+. Instead, look into using if-elseif statements, and function calls. if ... then ;do what you want to here elseif ... then ;do something else here else ;if all else fails... endif
nfwu Posted March 17, 2007 Posted March 17, 2007 (edited) For that simple example, like this: If 0 Then Send("{xxxx}") WinSetState("xxxxx -", "", @SW_SHOW) EndIf Run("notepad") Send("hello") Exit oÝ÷ ØZ+Þr©ì^Å©©ëºÚ"µÍÎÎÐZÝYBÚ[HHÑÝX[ÎÈZÝYÛÛ[YSÛÜÒHØ[È[ÈÝX[ÎÈZÝYÂ^]ÛÜÒHØ[È[ÈÙXÛÛX[ÎÈZÝY^]ÛÜÑ^]HÛÜÙ[ÔÙXÛÛX[ÎÐZÝYB You get the point. =) But I wouldn't recommend it. Use functions instead. #) Edited March 17, 2007 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
ismael Posted March 17, 2007 Author Posted March 17, 2007 hi friend watches, it works $salto=Random(1,3,1) If $salto = 1 Then MsgBox(4096, "salto nº1", $salto, 10) EndIf If $salto = 2 Then MsgBox(4096, "salto nº2", $salto, 10) EndIf If $salto = 2 Then MsgBox(4096, "salto nº3", $salto, 10) EndIf --------------------------------------------------------------------------------- when I add to him this function does not work it reports east error "If" statement has no matching "EndIf" statement.: it also reports east error with While... WEnd it also reports east error with Do...Until ;aleatorio $salto=Random(1,3,1) If $salto = 1 Then MsgBox(4096, "salto nº1", $salto, 10) ;abrir google #include <IE.au3> $oIE = _IECreate ("http://www.google.com") $oForm = _IEFormGetCollection ($oIE, 0) $oQuery = _IEFormElementGetCollection ($oForm, 1) _IEFormElementSetValue ($oQuery, "autoit") _IEFormSubmit ($oForm) EndIf If $salto = 2 Then MsgBox(4096, "salto nº2", $salto, 10) ;abrir altavista #include <IE.au3> $oIE = _IECreate ("http://www.altavista.com") $oForm = _IEFormGetCollection ($oIE, 0) $oQuery = _IEFormElementGetCollection ($oForm, 1) _IEFormElementSetValue ($oQuery, "autoit") _IEFormSubmit ($oForm) EndIf If $salto = 3 Then MsgBox(4096, "salto nº3", $salto, 10) ;abrir yahoo #include <IE.au3> $oIE = _IECreate ("http://search.yahoo.com") $oForm = _IEFormGetCollection ($oIE, 0) $oQuery = _IEFormElementGetCollection ($oForm, 1) _IEFormElementSetValue ($oQuery, "autoit") _IEFormSubmit ($oForm) EndIf who exempt gotooooooooo,jejejejej chuuuuuuu
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