SlashIn ( /in )

Description

Provides the /in command for delayed execution. Also provides /slashin, in case of conflicts with other addons providing /in.

Many addons have provided this feature -- so many that some users assume it's a built-in command. Long, long ago Cosmos provided it. In the Ace2 era, almost every Ace2 addon provided it. More recently, InDemand provides it. SlashIn has its own advantages:

- Updated for Patch 5.0 and Mists of Pandaria.
- Uses AddonLoader if you have it.

Examples

Say "hi" in 1.5 seconds:

/in 1.5 /say hi

Use your Argent Crusader's Tabard to teleport, then put your other tabard back afterwards:

/equip Argent Crusader's Tabard
/use Argent Crusader's Tabard
/in 12 /equip Scryers Tabard

Known Limitations

Many types of commands can't be delayed, especially ones that cast spells. If you receive an error dialog saying "SlashIn has been blocked from an action only available to the Blizzard UI," then that command can't be delayed.

The timer library can only generate events up to 10 times per second. Times with higher precision (more than one decimal place) are supported, but for example /in 2.0 and /in 2.01 aren't actually going to happen 0.01 seconds apart. They'll either happen together, or 0.1 seconds apart. (InDemand has the same limitation, but doesn't document it.) In practice this limitation really doesn't matter.

You must login to post a comment. Don't have an account? Register to get one!

  • 3 comments
  • Avatar of wittt wittt Apr 02, 2013 at 05:59 UTC - 0 likes

    Is there any way to stop this after I execute macro using this addon ?

    for example) I made a macro /in 10 /s Hi! /in 20 /s Everyone /in 30 /s HHH

    but after 15 sec, I suddenly wanted to stop the rest of the macro.

    How can I make it?

  • Avatar of tobmaps tobmaps Feb 20, 2013 at 17:28 UTC - 0 likes

    Hi there, thank you for great and so simple addon but i had encountered a problem that you will not be able to reproduce. I'll be clear - I've removed LUA secure functions protection from my client and unblocked RunMacroText command. I did some functions that uses recursion with some delay (this become able with your addon). So where is the problem? Problem is in memory leaks that appear after i start running code like this:

    function somefunction()
        ...
        some stuff here
        ...
        RunMacroText("/in 0.5 /run somefunction()")
    end
    somefunction()
    

    It does happen not so often but it definitely happen if you wait some. I know this bug is related to Ace3-Timer (r1079 for now) but i more prefer to post it here.

    I need to run my function every half second. So in that's way i found alternatively solution especially for this case but it can probably help others to keep their stuff repeat infinitely. I've replaced ScheduleTimer by ScheduleRepeatingTimer in SlashIn.lua file.

    Now i can run code like this to achieve same result.

    function somefunction()
        ...
        some stuff here
        ...
    end
    RunMacroText("/in 0.5 /run somefunction()")
    

    Yes, so simple solution does work. No mem leaks now. Hope this information will help someone. Solution can be used to make infinity text spam or even to run scripts that equips weapon like that one

    function getWeaponBack()
      if IsEquippedItemType("Shields") and not UnitBuff("player", "Spell Reflection") and GetSpellCooldown("Spell Reflection") ~= 0 then
        EquipItemByName("the name of your two handed weapon")
      end
    end
    

    then use a macro or type in chat command

    /in 0.5 /run getWeaponBack()
    

    so it will check for every 0.5 seconds if you need to change weapon to two-handed one after Spell Reflection. In that example none of protected API functions used so any normal player can use it.

    Last edited Feb 21, 2013 by tobmaps
  • Avatar of TagofFire TagofFire Mar 30, 2011 at 23:15 UTC - 0 likes

    Thank you for providing this. =)

  • 3 comments

Facts

Date created
Sep 15, 2010
Category
Last update
Feb 16, 2013
Development stage
Release
Language
  • enUS
License
MIT License
Curse link
SlashIn ( /in )
Downloads
37,030
Recent files

Authors

Relationships

Tool used
FindGlobals
Optional dependency
AddonLoader
Embedded library
Ace3
LibStub