This is what I'm using for WORDFILE.UEW, if you need to see full syntax file let me know please.
My problem is my if statements are little different then C++ here is example below. I'm trying to get the ReIndent Selection to work for my coding.
Above is how I would like it to indent, format like, below is the results I'm getting.
More examples:
Is this problem something I can fix with the WORDFILE.UEW?
If anyone need any more information let me know. I tried to give a good example with Sub and if statements in it and what it's doing for me.
Code: Select all
/L14"MacroQuest2" Line Comment = |: Block Comment On = |* Block Comment Off = *| Escape Char = \ String Chars = " File Extensions = MAC INC
/Delimiters = ~!@%^&*()-+=|\/{}[]:;"'<>,.?
/Function String = "%Sub[ ^t*]+^([a-zA-Z_0-9]+^)"
/Indent Strings = "/for" "} else {" "{"
/Unindent Strings = "/next" "} else /" "} else {" "}" "/return"
/Open Brace Strings ="{" "(" "[" "${"
/Close Brace Strings ="}" ")" "]" "}"
/Ignore Strings SOL = "|*" "*|" "%^${^}"
/Open Fold Strings = "sub" "/if"
/Close Fold Strings = "/return" "}"
Code: Select all
Sub Sub_Name2
/if (!${Defined[Var]}) /varset Var value 0
/if (!${Defined[Var2]}) /varset Var2 value 0
/if (!${Defined[Var3]}) /varset Var3 value 0
/if (${Var} && !${Var2} && !${Var3}) {
/call Sub_Name
/if (${Var} == 1) {
/do something
/if (${Var2} == 0) {
/do something
/if (${Var3} == 0) {
/do something
/do something
} else {
/echo something else
}
}
} else {
/do something
/do something
}
} else /if (${Var} && ${Var2} && ${Var3} != 1) {
/if (${Var}) /echo message
}
/for x 1 to ${Math.Calc[${Timer}+1]}
/if (${x} == 101) /echo Timer Finished.
/next x
/if (${Var.Equal[${Me.Name}]} && ${Math.Calc[${pTarget[${pName}].Y}+10]} && !${Math.Calc[${pTarget[${pName}].X}+10]}) /echo Not within the X Location.
/return
Code: Select all
Sub Sub_Name2
/if (!${Defined[Var]}) /varset Var value 0
/if (!${Defined[Var2]}) /varset Var2 value 0
/if (!${Defined[Var3]}) /varset Var3 value 0
/if (${Var} && !${Var2} && !${Var3}) {
/call Sub_Name
/if (${Var} == 1) {
/do something
/if (${Var2} == 0) {
/do something
/if (${Var3} == 0) {
/do something
/do something
} else {
/echo something else
}
}
} else {
/do something
/do something
}
} else /if (${Var} && ${Var2} && ${Var3} != 1) {
/if (${Var}) /echo message
}
/for x 1 to ${Math.Calc[${Timer}+1]}
/if (${x} == 101) /echo Timer Finished.
/next x
/if (${Var.Equal[${Me.Name}]} && ${Math.Calc[${pTarget[${pName}].Y}+10]} && !${Math.Calc[${pTarget[${pName}].X}+10]}) /echo Not within the X Location.
/return
Code: Select all
/if (${Var1} || ${var2}) {
/if (${Math.Calc[${Target.Distance}].Int} < ${Math.Calc[${Var5}-2].Int}) {
/if (${var4.Active} && !${Var3}) /stick moveback ${Math.Calc[${Var5}+4]}
}
/if (${Math.Calc[${Target.Distance}].Int} > ${Math.Calc[${Var5}-2].Int}) {
/if (${var4.Active} && !${Var3}) /stick uw ${Var5}
}
}
Code: Select all
/if (${Var1}) {
/if (${Spawn[${Var1}].ID}) {
/call ChatOut 4 "${Message1}"
} else {
/call ChatOut 4 "${Message2}"
/return
}
}
Code: Select all
/if (${CommandParam.Find[-ini]}) {
/if (${Select[${VarName},${Ini["${IniFile}","${Section}"].Replace["|",","].Left[-2]}]}) {
/ini "${IniFile}" "${Section}" "${VarName}" "${Value}"
}
}
Code: Select all
/if (${Var1}) {
/if (${${sList}.Length}) {
/varset ${sList} ${${sList}}${sDiv}${sElement}
} else {
/varset ${sList} ${sElement}
}
}
Code: Select all
/if (${Var1}) {
/if (${Var2} && ${Spawn[id ${QuickID}].Class.SubClass} && ${Spawn[id ${QuickID}].Class.ID}) {
/if (${Spawn[id ${QuickID}].Class.PctPCs}<${Var3}) {
/call SubRoute ${Spawn[${QuickID}].Class.ID} "${Var4}" "${Message}"
}
}
}
Code: Select all
/if (!${Var1}) {
/if ((${Var2}<95 || ${Var3}) && !${Me.Slot["${Var4}"].ID} && ${Me.Ready["${Var4}"]}) {
/do something
}
}
Code: Select all
/if (${Var1.NotEqual[${Var1-DefaultValue}]}) {
/if (${Var2} || ${Var3}) /return
/if (!${Var4}) {
/if (!${Var5}) /return
/for ArgNum 1 to ${Math.Calc[${Var1.Count[|]}+1]}
/varset CommandParam ${Var1.Arg[${ArgNum},|]}
/if (${Me.Slot[${CommandParam}].ID} == NULL) {
/call Check "${CommandParam}" "${Var6}"
/varset Var7 ${Spawn[${Var8}].ID}
/call Check "${CommandParam}" "${Var7}"
/if (${Sub.Return.Equal[Ready]}) /call MQ2 "${CommandParam}" "${Var9}" 7s "${Var6}" "${Var10}"
/next ArgNum
}
/next ArgNum
}
}
Code: Select all
/if (${Defined[Var1]}) {
/varset GenStr |${Var1.Lower}|
/if (${GenStr.Find[|${CurrCommand.Lower}|]}) {
/echo doing sCut ${CommandText}
/call sCut "${CommandText}"
/return
}
}
If anyone need any more information let me know. I tried to give a good example with Sub and if statements in it and what it's doing for me.