Jump to content

Recommended Posts

Posted (edited)

I'm assuming this is the right section to post this but I'm new to the forum so forgive me if I'm wrong. I am no programmer but have been using AutoIt for a while and have a basic grasp of it. I'm able to piece things together to do what I want(macros for gaming purposes mostly) but need some help with something a bit beyond my knowledge.

I tried to make this explanation fairly clear but it does have some gaming terms so if anyone needs clarification just ask. Essentially what I want to do is this:

1. Put a desired staff on hotbar slot 1 and spells on slots 2-10(10 is represented by 0).

2. Assign an in-game hotkey to each of those slots, i.e. Ctrl + 1 = slot 1, Ctrl + 2 = slot 2.

What I now need to do is have an autoit macro with an assigned hotkey that when pressed will do keyclicks for "Ctrl + 1" to equip the staff but will continue down the line of "Ctrl + 2," "Ctrl + 3," and so forth each time the hotkey is pressed. The result would be something like this:

- Press F1: staff equips

- Press F1: Spell 1 is selected

- Press F1: Spell 2 is seleted

- Press F1: Spell 3 is selected

and so forth...

Making the macro do the first action(equipping the staff) is easy enough but I don't know enough about writing code to make the same autoit hotkey go down a list of in-game hotkeys with successive clicks.

Thanks for any help.

Edited by Cinnabar
Posted

Take a look at HotKeySet() and send() in the help file. There are examples.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Posted (edited)

Take a look at HotKeySet() and send() in the help file. There are examples.

HotKeySet() + send() + for loopincremental variable will do the trick

Edited by Mison

Hi ;)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...