Goto page 1, 2  Next General Help on my first macro
Reply
Help on my first macro
Hi MQEmulator

Thanks for writing this. Sincerely, it's a great thing. When my life finally picks up, I'll be an avid VIP member. It's all I can offer - a gold plated promise.

I'm in a Costa coffee shop writing this, so I can't test the macro this morning. Initially, the healing part of the macro was working really well. However, last night when I quit, it kept causing the druid to repeatedly heal me for no reason. My first question is: if the macro gets in a mess, is there a way to reset the system? Or do I just restart the computer, or server program?

Secondly, I'm trying to adapt a cleric macro I found on a forum post so that it works for a druid. My needs are pretty simple. But I can't get one part of the routine to work. I want to check if my group-party is in combat, and if so, to have the druid cast a DOT on the tank's target.

I've added the code below. I tried to clean it up, but, please, forgive me if it's a mess -- I'm new to these macros!

Thank you!
Best Wishes


Macro
More +


#chat tell
#chat group
#include spell_routines.inc

#event LHeal "#*#healme#*#"
#event Follow "#*#follow#*#"
#event Stop "#*#stop#*#"
#event Sit "#*#sitdown#*#"
#event Invited "#*#To join the group, click on the 'FOLLOW' option, or

'DISBAND' to cancel#*#"


Sub Main

/declare Prescient string outer ${Param0}

/echo Paul's Druid Macro
/popup Druid Activated

:resume
/delay 2
/target ${Prescient}

:loop
/doevents
/if (${Me.PctMana} < 15) /goto :rest
/delay 2
/if (${Target.PctHPs}>65) /goto :loop
/delay 2
/if (${Target.PctHPs}<65) /goto :heal
/delay 2
/if (${Me.PctMana} >15) /goto :loop
/delay 2
| PROBLEM IS HERE!
/if (${Me.CombatState.Equal[Combat]}) {
        /echo NEVER GETS ACTIVATED!
        /goto :combatOn
}
/delay 2
/return


|==========================
|Auto-CH if target under 65%
|==========================

:heal
/G HeaL on >> %T <<
/delay 2
/Cast 1
/delay 110
/gsay I have ${Me.PctMana} % Mana
/goto :resume

|==========================
|Auto-Med @ 15% or less mana
|==========================

:rest
/g I Need Mana
/delay 2
/goto :medding

:medding
/delay 10
/sit

:medloop
/if (${Me.PctMana} >35) /goto :roperMana
/if (${Me.PctMana} <35) /goto :medloop

:roperMana
/delay 2
/g Please resume pulling
/delay 2
/goto :resume

:combatOn
/delay 2
/g I'm in combat
/echo in combat
/delay 2
| CAST A DRUID DOT...TODO
/goto :resume

:PresInCombat
/delay 2
/g I'm in combat
/echo in combat
/delay 2
/goto :resume

|==========================
|Spells
|==========================

Sub Event_LHeal(ChatType,Sender,ChatText)
/target ${Sender}
/delay 2
/g Bulwark of Vie on >> %T <<
/cast 1
/delay 20
/target ${Prescient}
/return

|==========================
|Follow, Stop, Accept Group, Sit
|==========================


Sub Event_Follow(ChatType,Sender,ChatText)
/target ${Sender}
/delay 2
/stick hold
/delay 2
/target ${Prescient}
/return

Sub Event_Sit
/echo in sit event
/sit
/return

Sub Event_Stop
/echo in Stop event stop
/stick off
/delay 2
/return

Sub Event_Invited
/echo in event invited dude
/echo Got invited and accepting
/invite

/return
Wed Apr 10, 2013 12:38 am
This line is not needed: if the condition is not a 1 then it will just go to the end and hit the return anyways iin the :loop
Also if the targets hp is above 65% then it goes back to the top of the loop and nothing below will be looked at. Same with your mana string.

/if (${Target.PctHPs}>65) /goto :loop
/delay 2
/if (${Me.PctMana} >15) /goto :loop
/delay 2

___________________________________

It looks like you are looking at the state of the Druids [Me.Combat]. It sounds like you want to look at your Targets combat state.

/if (${Me.CombatState.Equal[Combat]}) {
____________________________________

You can try this to target your MA target, check that it is something you want to cast on, within casting distance, set a timer on the Dot. Name the DOT in the Declares

Macro
More +

#chat tell
#chat group
#include spell_routines.inc

#event LHeal "#*#healme#*#"
#event Follow "#*#follow#*#"
#event Stop "#*#stop#*#"
#event Sit "#*#sitdown#*#"
#event Invited "#*#To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel#*#"

#event MobDead          "#*#has been slain#*#
/declare AssistAt       int     outer   92
/declare AssistAtDis    int     outer   100
/declare DOTtimer       timer   outer    0
/declare SpellDOT1      outer   "Vengeance of Nature"

Sub Main

/declare Prescient string outer ${Param0}

/echo Paul's Druid Macro
/popup Druid Activated

:resume
/delay 2
/target ${Prescient}

:loop
/doevents
/if (${Me.PctMana} < 15) /goto :rest
/delay 2
/if (${Target.PctHPs}<65) /goto :heal
/delay 2
 

/if (!${Target.ID} || ${Target.Type.Equal[PC]} || ${Target.Type.Equal[CORPSE]}) {
   /assist ${Prescient}
   /delay 7
}

/if (!${DOTtimer} && ${Target.ID} && ${Target.Distance} < ${AssistAtDis} && ${Target.PctHPs} < ${AssistAt} && !${Me.Combat} && !${Target.Type.Equal[PC]} && !${Target.Type.Equal[CORPSE]}) {
   /delay 7

|change what spell gem you are casting here
   /call cast ${SpellDOT1} gem3 3s

   /varset DOTtimer 40s
}
/return


|==========================
|Auto-CH if target under 65%
|==========================

:heal
/G HeaL on >> %T <<
/delay 2
/Cast 1
/delay 110
/gsay I have ${Me.PctMana} % Mana
/goto :resume

|==========================
|Auto-Med @ 15% or less mana
|==========================

:rest
/g I Need Mana
/delay 2
/goto :medding

:medding
/delay 10
/sit

:medloop
/if (${Me.PctMana} >35) /goto :roperMana
/if (${Me.PctMana} <35) /goto :medloop

:roperMana
/delay 2
/g Please resume pulling
/delay 2
/goto :resume

:combatOn
/delay 2
/g I'm in combat
/echo in combat
/delay 2
| CAST A DRUID DOT...TODO
/goto :resume

:PresInCombat
/delay 2
/g I'm in combat
/echo in combat
/delay 2
/goto :resume

|==========================
|Spells
|==========================

Sub Event_LHeal(ChatType,Sender,ChatText)
/target ${Sender}
/delay 2
/g Bulwark of Vie on >> %T <<
/cast 1
/delay 20
/target ${Prescient}
/return

|==========================
|Follow, Stop, Accept Group, Sit
|==========================


Sub Event_Follow(ChatType,Sender,ChatText)
/target ${Sender}
/delay 2
/stick hold
/delay 2
/target ${Prescient}
/return

Sub Event_Sit
/echo in sit event
/sit
/return

Sub Event_Stop
/echo in Stop event stop
/stick off
/delay 2
/return

Sub Event_Invited
/echo in event invited dude
/echo Got invited and accepting
/invite

/return

Sub Event_MobDead
        /delay 2
        /varset DOTtimer 0
/return
/endmacro
Wed Apr 10, 2013 7:11 am
Listen to This Guy
IInitially, the healing part of the macro was working really well. However, last night when I quit, it kept causing the druid to repeatedly heal me for no reason. My first question is: if the macro gets in a mess, is there a way to reset the system? Or do I just restart the computer, or server program?


You can restart the macro to "reset the system." That works for some issues (timing and lag) but not other issues (bug in logic flow).

Macro
More +

/if (${Me.PctMana} < 15) /goto :rest
...
...
...
/if (${Me.PctMana} >15) /goto :loop
| PROBLEM IS HERE!
...

Those two lines are essentially mutually exclusive. Below 15% mana and your druid goes to the :rest loop. Above 15% mana and your druid goes up to the top :loop. At exactly 15% mana and at no other mana value, your druid will actually look for the combat state.

Get rid of the ${Me.PctMana} >15 check.

Macro
More +
| PROBLEM IS HERE!
/if (${Me.CombatState.Equal[Combat]}) {
        /echo NEVER GETS ACTIVATED!
        /goto :combatOn
}
/delay 2
/return


If you ever test for combat state and combat is NOT on, your macro will end. That's what the /return at the bottom means. You need a /goto to make a loop. Put it right above the /return line.

I don't know of a use for ${Me.CombatState}. I have no idea what some of the returns mean nor under what conditions they appear to MQ2. I personally wouldn't touch the command.

${Me.Combat} will check to see if your Druid's attack is turned on. By turned on, I mean your druid has a mob targeted and will swing away at the mob if it's in range. There doesn't seem to be any way your macro turns attack on. Therefore the :combatOn looks like it will never be reached. In particular, your druid will never assist anyone or target a mob. The ${Me.Combat} test will NOT check to see if your tank or any other group member is in combat.

Aside:
There are several ways to cast a DoT on a target but checking that your own attack is turned on before casting the DoT is not a good method. Druids will alternate between targeting a mob to nuke/dot/debuff and targeting a player to heal/buff. Changing targets will turn attack off so as soon as your macro goes to :resume it targets a player. That /target ${Prescient} line will turn attack off anytime you target a mob to DoT.

I'm new to these macros!


My advice to anyone new to macros:

Don't start writing macros until you have learned a couple plugins first: MQ2Cast, MQ2Melee, MQ2NetBots and MQ2MoveUtils are the bare minimum.

NetBots and/or MQ2Melee will let your druid detect when a main tank is in combat and also which mob is being focused on. MQ2Cast will let you cast a DoT on said mob using a single line without having to /target or /assist. MQ2MoveUtils will handle the follow/stop with hotkeys rather than having to manually type.

In short: plugins make writing macros easier. Learn them. Use them.

Example:
Macro
More +
/if (${NetBots[<tankname>].Attacking} ) {
   | my tank is attacking something
   | sounds like a good target to cast a DoT on
   /call IWANTTOCASTADOT
}


The second thing I'd say to anyone new to macros is to not use /goto and :labels to simulate subroutines. Use actual subroutines instead.

Instead of:
/if (${Target.PctHPs}<65) /goto :heal
use:
/if (${Target.PctHPs}<65) /call Heal

and instead of:
Macro
More +
:heal
/G HeaL on >> %T <<
/delay 2
/Cast 1
/delay 110
/gsay I have ${Me.PctMana} % Mana
/goto :resume

use:
Macro
More +
Sub Heal
/G HeaL on >> %T <<
/delay 2
/Cast 1
/delay 110
/gsay I have ${Me.PctMana} % Mana
/return
Wed Apr 10, 2013 10:00 am
Senior Project Member
Thanks all -- some questions
Thank you for the response. I've been an age trying to get this working. I'm still in the process of trying all the suggestions. However! I've ran into some further problems. I've commented them in the code. Some of the suggestions work, some don't appear to- then there is a problem with the /doevents I think.

Macro
More +
#chat tell
#chat group

#event LtHeal "#*#healme#*#"
#event FollowMe "#*#followMe#*#"
|#event StopFoll "#*#stopFoll#*#"
#event Sit "#*#sitdown#*#"
#event Nukem "#*#nukem#*#"
#event Invited "#*#To join the group, click on the 'FOLLOW' option, or'DISBAND' to cancel#*#"


Sub Main
        /echo Paul's Druid Macro
       
        :loop


                | THIS APPEARS TO CAUSE THE PROBLEM, THE DOEVENTS - IF I PUT IT OUTSIDE LOOP, NOTHING WORKS
                /doevents
                /delay 3s
                /if (${Me.PctMana} <15) /call Rest

       
                | THIS DOES WORK THANK ULTRAX
                /if (${Me.Combat}) /echo In Combat
               
                /if (${NetBots[<tankname>].Attacking} ) {
                        /echo Tank is attacking something
                        | GRUMBLE THANKS FOR THIS, BUT IT NEVER GETS CALLED....
                }

                /if ((${Target.PctHPs} <65) && ${Target.Type.Equal[PC]}) /call myAutoHeal
                /delay 3s
                /goto :loop
               
/return

| PROBLEM ROUTINE, /bct myChar nukem, it gets called repeatedly. Do I need to consume the event somehow?

Sub Event_Nukem(ChatType,Sender,ChatText)
        /delay 2
        /echo In Nukem Subroutine
        /delay 2
        /assist Prescient
        /delay 2s
        /attack off
        /delay 2
        /if (${Target.Type.NotEqual[NPC]}) {
                /g Target was not a valid NPC returning
                /delay 2s
                /return
        }
        /g Druid hate on ${Target.CleanName}
        /delay 2
        /cast 2
        /delay 10s
/return

Sub myAutoHeal
        /echo in Heal
        /G HeaL on >> Prescient <<
        /target Prescient
        /Cast 1
        /delay 11s
        /gsay I have ${Me.PctMana} % Mana
/return

Sub LtHeal
        /echo in LtHeal
        /G HeaL on >> Prescient <<
        /target Prescient
        /Cast 1
        /delay 11s
        /gsay I have ${Me.PctMana} % Mana
/return


Sub Rest
        /echo In Rest
        /g I Need Mana
        /sit
        /delay 10s
        /if (${Me.PctMana} <35) /goto :Rest
        /g Please resume pulling
/return

Sub Event_FollowMe(ChatType,Sender,ChatText)
        /echo In FollowMeSub
        /target ${Sender}
        /delay 2
        /stick hold
        /delay 2
        /target ${Sender}
/return

Sub Event_Sit
/echo in sit event
        /sit
/return

Sub Event_StopFoll
        /echo in Stop event stop
        /stick off
        /delay 2
/return

Sub Event_Invited
        /echo in event invited dude
        /echo Got invited and accepting
        /invite
/return

Last edited by paulrussell70 on Wed Apr 10, 2013 10:44 am; edited 1 time in total
Wed Apr 10, 2013 10:24 am
One other question
There is one other thing that I can't seem to find in the documentation.

I want to compare Target.ID to NULL. What is the syntax for this? The idea is, that if my tank has no target, I can just return from the subroutine, without druid attempting to nuke!

I don't think I have netbots do I? Unfortunately, I'm not a paid up member yet.

Thanks Paul
Wed Apr 10, 2013 10:41 am
Macro
More +
| THIS APPEARS TO CAUSE THE PROBLEM, THE DOEVENTS - IF I PUT IT OUTSIDE LOOP, NOTHING WORKS
/doevents
/delay 3s


That is a correct statement and it's working as intended. /doevents is the command that actually listens for "healme" "followme" "sitdown" and "nukem" at the chat line. No /doevents inside the loop means those events never fire.

That delay is unnecessary and way too long. I'd remove it or change it to /delay 1 (note the lack of 's' at the end). You have a duplicate 3s delay at the bottom of the loop. Remove the duplicate.

Macro
More +
| GRUMBLE THANKS FOR THIS, BUT IT NEVER GETS CALLED....


You have to remove <tankname> and enter your tank's name (or use a variable). Also, Netbots has to be running. Each character has to configure NetBots to send/receive info.

/plugin MQ2NetBots
/netbots on
/netbots send=on
/netbots grab=on

To test:
/echo ${NetBots.Client}

If you don't see all your characters in the list, then they need to run the /netbots commands.

Macro
More +
| PROBLEM ROUTINE, /bct myChar nukem, it gets called repeatedly. Do I need to consume the event somehow?


As written, you have a recursive subroutine. You type nukem in chat. /doevents sees that trigger and calls Sub Event_Nukem. Sub Event_Nukem types nukem in chat. /doevents sees that trigger and calls Sub Event_Nukem... It's in infinite loop.

Aside:
ChatType,Sender,ChatText are unused. Their effect is the same as if they were deleted.
Wed Apr 10, 2013 10:57 am
Senior Project Member
I want to compare Target.ID to NULL. What is the syntax for this? The idea is, that if my tank has no target, I can just return from the subroutine, without druid attempting to nuke!


Macro
More +
/if (${Target.ID}) {
   /echo I have a target and it's ID is ${Target.ID}
} else {
   /echo I don't have a target.  Let's test anyway...
   /echo NULL = ${Target.ID}
}
/if (!${Target.ID}) {
   | this is the same as the else section
   /echo I don't have a target.  Let's test anyway...
   /echo NULL = ${Target.ID}
} else {
   /echo I have a target and it's ID is ${Target.ID}
}



I don't think I have netbots do I? Unfortunately, I'm not a paid up member yet.


NetBots is not a Gold Only plugin. It's included in all the zips (or should be).
Wed Apr 10, 2013 11:01 am
Senior Project Member
Gold frap!
Thanks Grumble, you're the man! I'm away from my PC now, but I'll try that later.

Made me chuckle about the recursive routine. I hadn't considered I was typing my own routine name into chat! It would be sensible to pick a long routine name, one not likely to be mentioned often in idle chat?

Thanks again!
Wed Apr 10, 2013 11:14 am
#event Nukem "#*#nukem#*#"

^ That's exceptionally broad. It will fire if someone in /ooc talks about Duke Nukem the video game. A more specific the #event line causes fewer false positives.

Alternatives:
Macro
More +
#event Nukem "#1# tells the group, 'nukem'"
| I may be off a bit on the exact formatting and punctuation, but you can copy from an in game group message.

#event Nukem "[MQ2] nukem"
| This event will fire only if an "/echo nukem" command is issued by your druid.
| Instead of typing "/group nukem" you type "/bct Druidname //echo nukem"
| /echo's are useful because the [MQ2] at the front makes it difficult to accidentally trigger


The end goal is to avoid typing nuke commands into chat. You will probably remove the nukem event eventually. You will keep a Nukem subroutine but it won't be #event based.
Wed Apr 10, 2013 11:36 am
Senior Project Member
Great stuff
Thanks. It's all working now. It's true, netbots wasn't loaded. Can I load this inside my macro? I made a hotkey in the meantime.

Is there any documentation for netbots?

Best wishes Paul
Wed Apr 10, 2013 2:50 pm
The commands aren't needed once a character has been configured to run NetBots but feel free to issue the on/send/grab commands in your macro to make sure all future characters are configured to run NetBots. Many macros do so.

NetBots documentation
Wed Apr 10, 2013 9:01 pm
Senior Project Member
MQ2NetBots
From MMOBugs Wiki
INI Example
SERVER_CHARACTER.INI
[MQ2NetBots]
Stat=1
Grab=1
Send=1

Macro Data
Examples
/echo ${NetBots[MY_TOON].CurrentHPs}
/echo ${NetBots[MY_TOON].Buff[4]}

Top-Level Object ${NetBots} Returns information about your client.
${NetBots[Name]} Returns information about the connected toon Name.
Data Types - NetBots
${NetBots.Client} :String Returns currently broadcasting MQ2NetBot clients connect to EQBCS.
${NetBots.Counts} :Int Returns count of broadcasting MQ2NetBot clients connect to EQBCS.
${NetBots.Enable} : Bool Returns TRUE/FALSE based on plugin status.
${NetBots.Listen} :Bool Returns TRUE/FALSE based on grab parameter status.
${NetBots.Output} :Bool Returns TRUE/FALSE based on send parameter status.

Data Types - NetBots Clients
${NetBots[Name].Name} :String Name of Name.
${NetBots[Name].Zone} :Int Zone ID of Name.
${NetBots[Name].Instance} :Int Instance ID of Name.
${NetBots[Name].Class} :Class Class of Name.
${NetBots[Name].Level} :Int Level of Name.
${NetBots[Name].PctExp} :Float Percent Experience of Name.
${NetBots[Name].PctAAExp} :Float Percent AA Experience of Name.
${NetBots[Name].PctGroupLeaderExp} :Float Percent Group Leader Experience of Name.
${NetBots[Name].CurrentHPs} Current Hitpoints of Name.
${NetBots[Name].MaxHPs} :Int Total Hitpoints of Name
${NetBots[Name].PctHPs} :Int Current Hitpoints percentage of Name.
${NetBots[Name].CurrentEndurance} :Int Current Endurace of Name.
${NetBots[Name].MaxEndurance} :Int Total Endurance of Name.
${NetBots[Name].PctEndurace} :Int Current Endurance percentage of Name.
${NetBots[Name].CurrentMana} :Int Current Mana of Name.
${NetBots[Name].MaxMana} :Int Total Mana of Name.
${NetBots[Name].PctMana} :Int Current Mana percentage of Name.
${NetBots[Name].PetID} :Int Spawn ID of Name's pet.
${NetBots[Name].PetHP} :Int Hitpoints of Name's pet.
${NetBots[Name].TargetID} :Int Spawn ID of Name's target.
${NetBots[Name].TargetHP} :Int Hitpoints of Name's target.
${NetBots[Name].Casting} :Spell Spell Name is casting.
${NetBots[Name].State} :String State of Name (STUN STAND SIT DUCK BIND FEIGN DEAD UNKNOWN).
${NetBots[Name].Attacking} :Bool Is Name Attacking?
${NetBots[Name].AFK} :Bool Is Name AFK?
${NetBots[Name].Binding} :Bool Is Name kneeling?
${NetBots[Name].Ducking} :Bool Is Name ducking?
${NetBots[Name].Feigning} :Bool Is Name feigning?
${NetBots[Name].Grouped} :Bool Is Name in a group?
${NetBots[Name].Invis} :Bool Is Name invis?
${NetBots[Name].Levitating} :Bool Is Name levitating?
${NetBots[Name].LFG} :Bool Is Name LFG?
${NetBots[Name].Mounted} :Bool Is Name on a mount?
${NetBots[Name].Moving} :Bool Is Name moving?
${NetBots[Name].Raid} :Bool Is Name in a raid?
${NetBots[Name].Sitting} :Bool Is Name sitting?
${NetBots[Name].Standing} :Bool Is Name standing?
${NetBots[Name].FreeBuffSlots} :Int Total free buff slots Name has.
${NetBots[Name].InZone} :Bool Is Name in the same zone as you?
${NetBots[Name].InGroup} :Bool Is Name in your group?
${NetBots[Name].Leader} :String Is Name the group leader?
${NetBots[Name].Updated} :Int Timestamp of last NetBots update from Name.
${NetBots[Name].Gem} :String All spells Name has memorized.
${NetBots[Name].Gem[#]}} :Spell Spell Name has memorized in Gem[#].
${NetBots[Name].Buff} :String All buffs Name currently has.
${NetBots[Name].Buff[#]} :Spell Name of the buff Name has in buff slot [#].
${NetBots[Name].Duration} :String Duration remaining of all buffs Name has.
${NetBots[Name].Duration[#]} :Int Duration of the buff on Name in slot [#].
${NetBots[Name].ShortBuff} :String All the short duration buffs Name has.
${NetBots[Name].ShortBuff[#]} :Spell Name of the shortbuff Name has in slot [#].
${NetBots[Name].PetBuff} :String Name of all the pet buffs Name's pet has.
${NetBots[Name].PetBuff[#]} :Spell Name of the pet buff in slot [#] Name's pet has.
${NetBots[Name].TotalAA} :Int Total AAs Name has.
${NetBots[Name].UsedAA} :Int Total spend AAs of Name.
${NetBots[Name].UnusedAA} :Int Total unspent AAs of Name.
${NetBots[Name].CombatState} :Int Combat State of Name.
Thu Apr 11, 2013 9:04 am
Listen to This Guy
Getting there
Hi guys.

Thanks to your assistance my little macros are mostly working. I've automated healing and nuking on both chars, and have got my Pally auto-yaulping on a countdown timer, and taunting. I managed to pick up a lot of coding tricks by reading old macros on Googlecode. All in all, my boxing experience -- as far as that goes -- is much improved. Actually, I'm really into grouping, and never liked boxing; but of course grouping is not always possible! And this software really is the business!

The only thing I've left outstanding is to get my chanter a little better at mezzing. Currently, I just have a hot button. This just tells the chanter to mezz my tank's target. I'm wondering if you can you recommend a strategy for writing a simple mezz routine?

I was thinking, perhaps something like: add all mobs in an area around the tank to an array, then mezz all of them that aren't the tanks current target? What do you think?

Best wishes
Paul

/*EDIT*/ I just thought of something else that I wanted to avail of the more experienced programmers -- I tried to use a while loop. Unfortunately, it wouldn't parse. I scoured the web and I found I should be using MQ2Loops. So I checked and no, loops wasn't included in my compiled MQ2 distro, so I inserted the file from MQ2-MMOBugs-2013-03-26.zip. Unfortunately, that seemed to mess up Netbots conditionals in my macros. I didn't test this at length, but is this likely to be the case? Erstwhile, I've had to resort to using Goto's. Any thoughts much appreciated! Thanks P
Last edited by paulrussell70 on Sat Apr 13, 2013 9:48 am; edited 1 time in total
Sat Apr 13, 2013 2:22 am
To the best of my imagination there isn't anything you can't do with /if and /goto that you can do with a while or until loop. People like them because in programming goto is kind of considered sloppy except in a handful of logical situations. It's kind of just a general rule that people don't like to break because they can get really messy really fast if you aren't careful. However if you are careful....
Sat Apr 13, 2013 5:15 am
Project Lead
FYI

Instead of

Do while x = 5
Print "infinite example"
Loop

Use this

:loop
Print "infinite example"
If x = 5 then goto :loop
Sat Apr 13, 2013 5:19 am
Project Lead
Goto page 1, 2  Next General Help on my first macro
Reply