Page 1 of 3 123 LastLast
Results 1 to 20 of 54
  1. #1
    Community Member
    Join Date
    Mar 2010
    Posts
    999

    Default Anyone here know how to write scripts for Auto Hotkey?

    So I had this great idea for a key macro where I can hit one key combination, and my artificer will proceed to cast all of his buffs in succession. I know this will be a pretty straightforward script to write, but after poruing over the AHK documentation for about an hour... all I have is a headache and a script that will only trigger 1 spell. Which is not terribly useful.

    Anyone know?

  2. #2
    Community Member Jingwei's Avatar
    Join Date
    Feb 2011
    Posts
    604

    Default

    Lets say you've mapped the hotbar that holds your buff spells to ctrl + alt + number key (using the DDO ui keymapping)

    Now, let's say that you want to cast the first 6 things on your buff hotbar on the selected party member when you press alt + the appropriate function key.

    From looking at the documentation:

    (Example for F1 function key mapping, you'd need 11 more hotkeys for the F2-F12)

    -----------

    !F1::
    ;! indicates alt key
    ;^ indicates control key
    ;F1 - F24 should be the numbered function keys
    Send F1
    Send ^!1
    Send ^!2
    Send ^!3
    Send ^!4
    Send ^!5
    Send ^!6
    Return

    ----------

    The scripts for the other party members would look like (from F2 to F12)

    ------

    !F2::
    [...]
    Send F2
    [...]
    Return

    -----------

    If you find that this setup goes to fast for the the buffs after the first one to fire, try something like:

    ----------

    !F1::
    Send F1
    Send ^!1
    Sleep 100
    Send ^!2
    Sleep 100
    Send ^!3
    Sleep 100
    Send ^!4
    Sleep 100
    Send ^!5
    Sleep 100
    Send ^!6
    Return

    ----------

    And see if that works. If the later buffs still aren't being fired, try adjusting the sleep amount upward until it works.

  3. #3
    Community Member
    Join Date
    Mar 2010
    Posts
    999

    Default

    So I attempted a slightly simpler script. I have a hotbar bound to Alt+1-0 on which I keep my buffs. I wanted the buff script to run on Ctrl+`.

    In theory, then, the script should look like:

    ^`::
    Send !1
    Sleep 100
    Send !2
    Sleep 100
    Send !3
    Sleep 100
    Send !4
    Sleep 100
    Send !5
    Sleep 100
    Send !6
    Sleep 100
    Send !7
    Sleep 100
    Send !8
    Sleep 100
    Send !9
    Sleep 100
    Send !0


    ...unnnnfortunately my script did not work. Much like every single other script I've ever attempted to write.

    What'd I miss?

    EDIT: DDO doesn't appear to be reading my macros at all. I have a second macro for a different game that on CTRL+Space sends the Enter key, types +atm, then hits Enter again. In DDO I just jump. (Bonus points to anyone who knows what game my other macro is for :P)
    Last edited by HunterjWizzard; 09-09-2012 at 02:58 AM.

  4. #4
    Community Member Robai's Avatar
    Join Date
    Feb 2010
    Posts
    1,462

    Default

    It would be really nice if we could do many things with just one button.

    For example:
    Button 1:
    Cast 5 different buff spells

    Button 2:
    Switch several items at once

    My rogue usually switches 4 items (dps <-> trapmonkey). So, button 2 would really be helpful.

    Quote Originally Posted by Jingwei View Post
    Lets say you've mapped the hotbar that holds your buff spells to ctrl + alt + number key (using the DDO ui keymapping)

    Now, let's say that you want to cast the first 6 things on your buff hotbar on the selected party member when you press alt + the appropriate function key.

    From looking at the documentation:

    (Example for F1 function key mapping, you'd need 11 more hotkeys for the F2-F12)

    ...
    I'd like to write scripts, but how? Should I create some .txt file? That would be awesome if it worked.

  5. #5
    Community Member
    Join Date
    Mar 2010
    Posts
    999

    Default

    Quote Originally Posted by TheRobai View Post
    It would be really nice if we could do many things with just one button.

    For example:
    Button 1:
    Cast 5 different buff spells

    Button 2:
    Switch several items at once

    My rogue usually switches 4 items (dps <-> trapmonkey). So, button 2 would really be helpful.



    I'd like to write scripts, but how? Should I create some .txt file? That would be awesome if it worked.
    Its possible to do with autohotkey. I just happen to be horribly inept at... basically any programing language I have ever tried. When I die the average coding skill of the entire human race will up measurably.

  6. #6
    Community Member Robai's Avatar
    Join Date
    Feb 2010
    Posts
    1,462

    Default

    Quote Originally Posted by HunterjWizzard View Post
    Its possible to do with autohotkey. ...
    Can you tell more? Please.

  7. #7
    Community Member Jingwei's Avatar
    Join Date
    Feb 2011
    Posts
    604

    Default

    Quote Originally Posted by HunterjWizzard View Post
    What'd I miss?
    Multi-command scripts need 'return' at the end?

  8. #8
    Community Member Jingwei's Avatar
    Join Date
    Feb 2011
    Posts
    604

    Default

    Quote Originally Posted by TheRobai View Post
    Can you tell more? Please.
    Auto Hot Key is a small piece of software that allows you to script things like program running, keypresses, and mouse clicks to happen when you give the computer certain input, usually a specific key command.

    It should be able to do things like cast multiple spells with a single key combination, equip multiple pieces of gear, equips and use a piece of gear (like a clicky or scroll) and then re-equip the original piece of gear.

    With enough effort it should even be possible do stuff like automate the sundering of crafting essences, though this would probably take considerable work.

  9. #9
    Community Member Darkfury's Avatar
    Join Date
    Oct 2009
    Posts
    77

    Default

    No idea what the stance is regarding using third party software (and hardware like the Logitech keyboards) to write macros here, but some games will ban you for it. I guess that's been covered already and is OK to do or people would not be implicating themselves..!?

  10. #10
    Hatchery Founder Glenalth's Avatar
    Join Date
    Jan 2006
    Posts
    3,168

    Default

    Quote Originally Posted by Jingwei View Post
    With enough effort it should even be possible do stuff like automate the sundering of crafting essences, though this would probably take considerable work.
    You just need to set a number of clicks+rests or clicks+rests until a break that occur at the current mouse position.

    Here's a simple one that doesn't require any scripting if all you want is a program to click that stupid essence sundering box 1,000 times: http://www.mofiki.com/2011/mofikis-a...mouse-clicker/
    Glenalth Woodwalke ■ Preston the Ranger ■ Brisqoe the Dentist ■ Prescription Liberator
    AoK @ Argonnessen

  11. #11
    Hatchery Founder Glenalth's Avatar
    Join Date
    Jan 2006
    Posts
    3,168

    Default

    Quote Originally Posted by Darkfury View Post
    No idea what the stance is regarding using third party software (and hardware like the Logitech keyboards) to write macros here, but some games will ban you for it. I guess that's been covered already and is OK to do or people would not be implicating themselves..!?
    The original game came with an advertisement in box for the Logitech G15 keyboard.

    The dev responses in the long long ago were basically, don't build a bot or a complex enough macro that it plays the game for you, but macroing simple functions is OK.
    Glenalth Woodwalke ■ Preston the Ranger ■ Brisqoe the Dentist ■ Prescription Liberator
    AoK @ Argonnessen

  12. #12
    Community Member Robai's Avatar
    Join Date
    Feb 2010
    Posts
    1,462

    Default

    Quote Originally Posted by Jingwei View Post
    Auto Hot Key is a small piece of software that allows you to script things like program running, keypresses, and mouse clicks to happen when you give the computer certain input, usually a specific key command.

    It should be able to do things like cast multiple spells with a single key combination, equip multiple pieces of gear, equips and use a piece of gear (like a clicky or scroll) and then re-equip the original piece of gear.

    With enough effort it should even be possible do stuff like automate the sundering of crafting essences, though this would probably take considerable work.
    Thanks, +1
    I'll try that program. Sounds promising.
    I prefer multi-hotkey thing to be inside game though.

  13. #13
    Founder Hambo's Avatar
    Join Date
    Feb 2006
    Posts
    0

    Default

    Quote Originally Posted by Darkfury View Post
    No idea what the stance is regarding using third party software (and hardware like the Logitech keyboards) to write macros here, but some games will ban you for it. I guess that's been covered already and is OK to do or people would not be implicating themselves..!?
    This is correct in DDO as well, or at least it used to be.

    For some reason external macro software is/was frowned upon, but manufacturer keyboards supporting specific macro keys are ok. At one point Turbine even added simple support for the original G15 (Logitech) to display health and mana bars on the LCD display, while the Logitech software supported timers, clocks and even simple connection monitoring was available from 3rd party websites.

    Thinking about it, hardware macro keys are probably ok because they cannot be mapped inside the game (they don't exist on the standard keymap) and therefore cannot be "meta" mapped, i.e. defining a key to perform a set of actions then defining another key to repeat the first key multiple times.
    Carpe D.M.! (Sieze the Dungeon Master!)
    Founder #2003 - Interocitor Repair - Call for discount prices

  14. #14
    Community Member Jingwei's Avatar
    Join Date
    Feb 2011
    Posts
    604

    Default

    Have spent some time now with DDO and autohotkey. It looks like it works fine for assigning mouse buttons, but seems to fail to read keyboard based hotkeys when in full screen mode. Still looking for a workaround.

    [edit]
    Ok, found it.

    -----------------------
    #IfWinActive ahk_class Turbine Device Class
    `::
    send F1
    send 4
    return

    !`::
    send f1
    send 1
    sleep 3000
    send 2
    sleep 3000
    send 3
    sleep 3000
    send 4
    sleep 3000
    send 5
    return

    #IfWinActive

    --------------------

    Works. Have my radiant burst in slot 4, pressing the ` key now targets me (f1) and fires off the radiant burst.

    The second one (alt `) goes through slots 1-5 on the active hotbar. This one was done with the 5 different versions of the resist elements spell. Note that the casting cooldown is 3 seconds, so I had to up the sleep amounts to 3000 to get it to work.
    Last edited by Jingwei; 09-09-2012 at 09:08 AM.

  15. #15
    Community Member
    Join Date
    Oct 2009
    Posts
    2,187

    Default

    I've really tired of clicking all the same buttons to do all the same buffs, especially because my fingers are starting to hurt, but I've hesitated to use a third party software such as Autohotkey for fear of finding out the hard way that it's not allowed.

    I tried AutoHotkey a long long time ago, and I thought it had a record function? So you could record a sample script and just debug it if needed...

  16. #16
    Community Member t0r012's Avatar
    Join Date
    Jul 2009
    Posts
    1,770

    Default

    Preface : I never used a macro in any game

    My take on the ethics of using them.
    If you are just using them to eliminate a tedium like casting the same dozen buffs at the start of a quest , cool.
    When you get in to using them to improve your performance and or actions you would otherwise be unable to physically do yourself is when you are doing it wrong.
    Move along , Nothing to see here

  17. #17
    Founder Hambo's Avatar
    Join Date
    Feb 2006
    Posts
    0

    Default

    Quote Originally Posted by t0r012 View Post
    Preface : I never used a macro in any game

    My take on the ethics of using them.
    If you are just using them to eliminate a tedium like casting the same dozen buffs at the start of a quest , cool.
    When you get in to using them to improve your performance and or actions you would otherwise be unable to physically do yourself is when you are doing it wrong.
    I was going to create a definition for one of my macro keys to autocast my bolts on my Artis... I like to start out with 6000 bolts (repeating x-bows... what can I say?), which used to mean clicking and waiting 60 times in the tavern every time I logged in. Now it's a moot point as the bolt quantity created by the spell was increased from 100 to 1000 per cast.

    I can appreciate automating a buff sequence, and given a lot of players' obsession with the XP/time ratio, being able to tweak the wait times between buffs on such a macro to streamline the process is a good thing.

    The gray area I see with macros is automating something like Monk finishing moves. What happens if you want to play on a different system and your software or special keyboard is unavailable?
    Last edited by Hambo; 09-09-2012 at 09:51 AM.
    Carpe D.M.! (Sieze the Dungeon Master!)
    Founder #2003 - Interocitor Repair - Call for discount prices

  18. #18
    Community Member Horrorscope's Avatar
    Join Date
    Jan 2008
    Posts
    275

    Default

    Here is one where I click on the players nameplates, it fires off various spells.

    If I left click on their name plate it does a Heal to them.
    A = Select First Player (a,b,c,d,e,f)
    2 = Heal spell on the bar
    (425<xVal) and (xVal<520) and (730<yVal) and (yVal<755) is the coordinates of player 1's box. Everyone is different. I use Exact Mouse to get the coords. You would just need to adjust them.

    If I right click on their name plate is does a Cure spell.
    1 = Cure spell on the bar

    If I click slightly off to the right side of the name plate if fires a resurrection their way.

    I keep the circle part of the nameplates unmapped, this is so I can right click and do typical player functions.

    I've also done variations where if I click just to the left of the name plates it fires off a Break Free to that person.

    As for DnD games, since they have tons of buffs and resting is common and you lose them all. I've always felt games needed one button to run a buff routine. NWN's there was a mod for it that helped a lot. This game was a bit different then a stock DnD game, not sure it would be a huge saver, as various buffs going on and off at different times.

    I would have loved for the game to have this built in. I think there is a lot of UI enhancements games can have when using group bars as a point of entry to various things.


    The Hotkey Code for click on nameplates: (Take 2)

    ;--------------------------------------------------------
    ;Map Left Click Functions (1)

    CoordMode, Mouse, Screen
    $LButton::
    MouseGetPos xVal,yVal

    ;***Heal Spell***
    ;---Nameplate LClick---
    ;Player 1 Main Section
    If (425<xVal) and (xVal<520) and (730<yVal) and (yVal<755)
    {
    Send {a}
    Send {2}
    }
    Else
    ;Player 2 Main Section
    If (425<xVal) and (xVal<520) and (765<yVal) and (yVal<790)
    {
    Send {b}
    Send {2}
    }
    Else
    ;Player 3 Main Section
    If (425<xVal) and (xVal<520) and (800<yVal) and (yVal<825)
    {
    Send {c}
    Send {2}
    }
    Else
    ;Player 4 Main Section
    If (425<xVal) and (xVal<520) and (835<yVal) and (yVal<860)
    {
    Send {d}
    Send {2}
    }
    Else
    ;Player 5 Main Section
    If (425<xVal) and (xVal<520) and (870<yVal) and (yVal<895)
    {
    Send {e}
    Send {2}
    }
    Else
    ;Player 6 Main Section
    If (425<xVal) and (xVal<520) and (905<yVal) and (yVal<930)
    {
    Send {f}
    Send {2}
    }
    Else

    ;---If no coords match, use Lmouse as normal---
    {
    Send {LButton Down}
    KeyWait LButton
    Send {LButton Up}
    }

    Return


    ;---------------------------------------------------------
    ;Map Right Click Functions (2)
    ;CoordMode, Mouse, Screen
    $RButton::
    MouseGetPos xVal,yVal

    ;***Cure Spell***
    ;Player 1 Main Section
    If (425<xVal) and (xVal<520) and (730<yVal) and (yVal<755)
    {
    Send {a}
    Send {1}
    }
    Else
    ;Player 2 Main Section
    If (425<xVal) and (xVal<520) and (765<yVal) and (yVal<790)
    {
    Send {b}
    Send {1}
    }
    Else
    ;Player 3 Main Section
    If (425<xVal) and (xVal<520) and (800<yVal) and (yVal<825)
    {
    Send {c}
    Send {1}
    }
    Else
    ;Player 4 Main Section
    If (425<xVal) and (xVal<520) and (835<yVal) and (yVal<860)
    {
    Send {d}
    Send {1}
    }
    Else
    ;Player 5 Main Section
    If (425<xVal) and (xVal<520) and (870<yVal) and (yVal<895)
    {
    Send {e}
    Send {1}
    }
    Else
    ;Player 6 Main Section
    If (425<xVal) and (xVal<520) and (905<yVal) and (yVal<930)
    {
    Send {f}
    Send {1}
    }

    Else

    ;---------------------------------------------------------
    ;***Ressurect****
    ;---Right Side of Nameplate RClick---
    ;Player 1 Right Section
    If (525<xVal) and (xVal<550) and (730<yVal) and (yVal<755)
    {
    Send {a}
    Send {5}
    }
    Else
    ;Player 2 Right Section
    If (525<xVal) and (xVal<550) and (765<yVal) and (yVal<790)
    {
    Send {b}
    Send {5}
    }
    Else
    ;Player 3 Right Section
    If (525<xVal) and (xVal<550) and (800<yVal) and (yVal<825)
    {
    Send {c}
    Send {5}
    }
    Else
    ;Player 4 Right Section
    If (525<xVal) and (xVal<550) and (835<yVal) and (yVal<860)
    {
    Send {d}
    Send {5}
    }
    Else
    ;Player 5 Right Section
    If (525<xVal) and (xVal<550) and (870<yVal) and (yVal<895)
    {
    Send {e}
    Send {5}
    }
    Else
    ;Player 6 Right Section
    If (525<xVal) and (xVal<550) and (905<yVal) and (yVal<930)
    {
    Send f}
    Send {5}
    }

    Else

    ;---If no coords match, use Rmouse as normal---
    {
    Send {RButton Down}
    KeyWait RButton
    Send {RButton Up}
    }


    Return
    Last edited by Horrorscope; 09-09-2012 at 10:44 AM.

  19. #19
    Community Member Horrorscope's Avatar
    Join Date
    Jan 2008
    Posts
    275

    Default

    FWIW what's the politically correct stance on Voice commands?

    For what I have above, it's even easier and quicker using VRCommander and doing the following:

    Say Heal One - Heal Six : Sends Heal to the member
    Say Cure One - Cure Six : Send a Cure to the member
    Say Free One - Free Six : Send Break Free over
    Say Rez One - Rez Siz : Send a Rez over

    And anything of the like.

  20. #20
    Community Member Jingwei's Avatar
    Join Date
    Feb 2011
    Posts
    604

    Default

    Further experimentation says that keys like F1 should probably be written as {F1}, rather than F1.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

This form's session has expired. You need to reload the page.

Reload