Jump to content

If Then Else


onix
 Share

Recommended Posts

I am trying to create If Then Else script but i am very confused how to create this with autoit. I am familiar with creating Warcraft TFT maps but there the If Then Else creating is easy for me yet here i fail to understand how it's working.

So far this is how my script will look yet i got no idea if this is the right way

While $var = 1 ;main Loop
$WST = 1
Actions
Actions
Actions
    While $WST = 1 ;Second Loop
    If Condition1 Then ;If true Do Actions1,2,3 or if not true check for Condition1,2,3
    Action1
    Action2
    Action3
    $WST = 0
    ElseIf Condition1
    Condition2
    Condition3 Then ;If 1 or 2 or all 3 conditions are false do Actions4,5,6
    Actions4
    Actions5
    Actions6
    Else
    ;or i should put Actions4,5,6 here?
    EndIf
    Wend
Actions
Actions
Actions
Wend

What I want to create is the "main loop" to wait for the Second Loop to return "0" and then continue. Any help about the structure of the script will be welcome and any tutorials will be. I did try to read the wiki and the Help file but i got no idea how to do it with multiple conditions and actions.

Edited by onix
Link to comment
Share on other sites

Read the Forum Rules because even though your code lacks malicious intent your suggestion of what you're planning to do is pretty clear.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

I am simply asking how to create advanced (for me) if then else script is that so bad? I am not trying to create viruses or other things. And even if I am trying there are a lot of sites that are designed for those types of talk.

Link to comment
Share on other sites

  • Developers

I am simply asking how to create advanced (for me) if then else script is that so bad? I am not trying to create viruses or other things. And even if I am trying there are a lot of sites that are designed for those types of talk.

Not important, You are clearly working on a BOT which is against the rules.

The rest is totally irrelevant.

*click*

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...