ellinarac Posted July 2, 2019 Report Share Posted July 2, 2019 ok, so I have been working on something the last few days, I have made several Macros that "call" different functions for an extensive macro I am working on. so far I have 8 macros that call each other after the currant macro comes to an end. for example, Macro 1 (hotkey Ctrl+numpad 1) runs, at the end of the macro it calls the next macro by the hotkey (Ctrl+numpad 2), that macro runs and then calls the next macro. each macro has an "END" command after calling the next macro to make sure each macro closes when done and doesn't stay running in the background. what I want to do is have some way to randomize the macro that is called. for example, macro 1 finishes, calls a random macro ranging from (hotkey Ctrl+1 to Ctrl+6). I would prefer they be called using the hotkeys since thats how I have them setup, but any way to randomize the macro calling would be helpful for this Thanks! Quote Link to comment Share on other sites More sharing options...
Samrae Posted July 2, 2019 Report Share Posted July 2, 2019 Something like this might work: Variable Set Integer %MacroNumber% to a random value between 1 and 8 Switch( %MacroNumber% ) Case: 1 Macro Run: Macro 1 End Case Case: 2 Macro Run: Macro 2 End Case Case: 3 Macro Run: Macro 3 End Case Case: 4 Macro Run: Macro 4 End Case Case: 5 Macro Run: Macro 5 End Case Case: 6 Macro Run: Macro 6 End Case Case: 7 Macro Run: Macro 7 End Case Case: 8 Macro Run: Macro 8 End Case End Switch Quote Link to comment Share on other sites More sharing options...
ellinarac Posted July 3, 2019 Author Report Share Posted July 3, 2019 2 hours ago, Samrae said: Something like this might work: Variable Set Integer %MacroNumber% to a random value between 1 and 8 Switch( %MacroNumber% ) Case: 1 Macro Run: Macro 1 End Case Case: 2 Macro Run: Macro 2 End Case Case: 3 Macro Run: Macro 3 End Case Case: 4 Macro Run: Macro 4 End Case Case: 5 Macro Run: Macro 5 End Case Case: 6 Macro Run: Macro 6 End Case Case: 7 Macro Run: Macro 7 End Case Case: 8 Macro Run: Macro 8 End Case End Switch so, going by this, I am assuming the %macronumber% refers to the macro index number in the macro list? macro list.bmp Quote Link to comment Share on other sites More sharing options...
ellinarac Posted July 3, 2019 Author Report Share Posted July 3, 2019 I got it, thanks Samrae! I had a little brain fart when I looked at your code, then when I actually started to set it up, I noticed you were talking about the macro "nickname" not the index number LOL! so far seems to be working great, Thanks again! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.