Laufer Posted September 16, 2012 Author Share Posted September 16, 2012 Using Hard Macro example for Battlefield Heroes game Creating macros seems too complicated. But lets walk through one live example. Game: Battlefield Heroes Class: Gunner Mouse: Corsair Vengeance M60 Software: Hard Macro 1.10 1. Open HardMacro_M60.ahk with double mouse click (Autohotkey should be installed already) 2. Select profile "BFH: National Gunner" (this is sample profile from HardMacro package). You will see this page: http://imageshack.us/a/img840/4452/hardmacro110.png Here you see a lot of macros assigned to mouse buttons but before we proceed with explanation take a look at my hero. Awesome, isn't he? :sunglasse http://imageshack.us/a/img21/5594/nationalgunnersmall.png I show you this picture not only to brag, but also to show weapons and abilities I will use in example: "Key 1" Machine gun (primary weapon) "Key 2" Explosive Keg (ability, some sort of grenade) "Key 3" Rocket launcher (anti-vehicle weapon) "Key 4" Shotgun (secondary weapon) "Key 5" Leg It (fast run ability) "Key 6" Eat Greandes (ability to eat all nearby explosives) "Key 8" Shield (defensive ability) "Key 9" Medical kit (heal yourself) "Key 0" Repair kit (repair vehicle you drive) Keys from "1" to "3" may be used on a keyboard, but others are way too far and must be assigned to a mouse. Note that M60 mouse doesn't have many buttons so we have to use them wisely. Also I want make some tricks that will make my life easier (and make life of my enemies harder :naughty:) Macros explained Button 2: 4LMB_Switch4RapidFire. This one assigned to Right Mouse Button (RMB). It switches to shotgun (key "4") than press Left Mouse Button (LMB) repeatedly while I hold RMB. This trick let me switch to shotgun and shot from it as fast as game can just holding down one button! ; 4 + [LMB] ; ; Switch 4 + Fire Rapidly in cycle 4LMB_Switch4RapidFire: Send {4 down} ; press "4" Sleep, 50 ; wait 50 ms Send {4 up} ; release "4" Key := % A_ThisHotKey ; check if this hot key still pressed StringReplace, Key, Key, *$, , All while GetKeyState(Key, "P") ; while hot key pressed do... { Send {LButton down} ; press LMB Sleep, 50 ; wait 50 ms Send {LButton up} ; release LMB Sleep, 50 ; wait 50 ms } return Button 3: 8_Shield_Hide_BS. This macro I assigned to Middle Mouse Button (MMB). Its simply presses "8" - activates shield. Why it has name 8_Shield_Hide_BS? This script I use also for other classes that have other abilities on key "8". ; 8 ; ; Shield / Hide / Blasting Strike 8_Shield_Hide_BS: Send {8 down} ; press "8" Sleep, 50 ; wait 50 ms Send {8 up} ; release "8" return Button 4: 90_BandageRepair. This macro activates Heal and Repair actions on one button! It just press "9" and then "0". :!: If you are driving a vehicle - you can't heal yourself, only repair vehicle, and if you are not in vehicle - you won't waste repair kit. ; 9 + 0 ; ; Use bandage + Use repair kit (Activates only one of it. Depends on in-game context) 90_BandageRepair: Send {9 down} ; press "9" Sleep, 50 ; wait 50 ms Send {9 up} ; release "9" Send {0 down} ; press "0" Sleep, 50 ; wait 50 ms Send {0 up} ; release "0" return Button 6: 5_Run_Heal. This one activates Leg It ability (fast run). It simply press key "5". ; 5 ; ; Run / Heal 5_Run_Heal: Send {5 down} ; press "5" Sleep, 50 ; wait 50 ms Send {5 up} ; release "5" return Button 7: 6_Mark_EatGrenades. This one activates Eat Grenades ability. It simply press key "6". ; 6 ; ; Eat grenades / Mark target 6_Mark_EatGrenades: Send {6 down} ; press "6" Sleep, 50 ; wait 50 ms Send {6 up} ; release "6" return Button 8: 2_Switch2. This one presses key "2" to activate Explosive Keg ability (throw big grenade). Its not hard to press "2" on keyboard, but in the heat of battle sometimes you can miss and switch to something else :confused: ; 2 ; ; Switch to weapon 2 2_Switch2: Send {2 down} ; press "2" Sleep, 50 ; wait 50 ms Send {2 up} ; release "2" return Button 9 (mouse wheel up): r1_ReloadSwitch1. This one assigned to mouse wheel. Roll it up (away from you) and macro will reload current weapon and switch to weapon at key "1" (machine gun). :!: When you press "R" to reload you may switch to another weapon immediately! Weapon will keep reloading while in your pocket :biggrin: ; r + 1 ; ; Reload current weapon + Switch to weapon 1 r1_ReloadSwitch1: Send {r down} ; press "R" Sleep, 50 ; wait 50 ms Send {r up} ; release "R" Send {1 down} ; press "1" Sleep, 50 ; wait 50 ms Send {1 up} ; release "1" return Button 10 (mouse wheel down): r4_ReloadSwitch4. This one assigned to mouse wheel too. Roll it down (to yourself) and macro will reload current weapon and switch to weapon at key "4" (shotgun). ; r + 4 ; ; Reload current weapon + Switch to weapon 4 r4_ReloadSwitch4: Send {r down} ; press "R" Sleep, 50 ; wait 50 ms Send {r up} ; release "R" Send {4 down} ; press "4" Sleep, 50 ; wait 50 ms Send {4 up} ; release "4" return Thats it! Let me know if you have problems with creating macros and understanding this article. See you on the battlefield, hero! :shootme: Link to comment Share on other sites More sharing options...
Laufer Posted September 16, 2012 Author Share Posted September 16, 2012 Using Hard Macro 2 example for Winamp and other media players HardMacro is a very useful thing but not only for games. It also may be handy multimedia tool. It may switch song, wind it forward to most awesome part and make it louder, while you browsing Internet pages or working in office software. Today I will show you how to gain total control over your media player with your mouse. For example we will use popular player - Winamp but most of keys will work in other players (Winamp simply gives more control: toggle shuffle mode, rewind melody). First of all download latest HardMacro version. It has example profile MultiMedia Control. Second step - set up special Winamp settings: 1. Open Preferences form (Global Hotkeys tab). 2. Enable Global Hotkeys 3. Add action "Playback: Toggle shuffle" on hotkey Ctrl+Alt+S http://imageshack.us/a/img716/6910/winampglobalhk.png Third and the last: start HardMacro for your mouse (M60 or M90 version), and press "Launch" button. http://imageshack.us/a/img191/2044/multimediacontrol.png Thats all. Now lets talk about this profile features. Browser control Button 6 = Browser forward Button 7 = Browser backward Button 8 = Browser refresh page Volume control Ctrl + Button 3 (middle mouse button) = Mute Ctrl + Wheel Up = Global Volume Up Ctrl + Wheel Down = Global Volume Down Shift + Wheel Up = Winamp Volume Up Shift + Wheel Down = Winamp Volume Down Playback control Ctrl + Button 6 = Play next media file Ctrl + Button 7 = Play previous media file Ctrl + Button 8 = Play/Pause Shift + Button 8 = Toggle shuffle mode (Winamp abillity) Alt + Wheel Up = Forward 5 seconds (Winamp abillity) Alt + Wheel Down = Backward 5 seconds (Winamp abillity) All of that actions except Winamp special will work in any browser and media player. If you like it - use it. If not - you can change macros. Use this button http://imageshack.us/a/img16/5784/editbuttonx.jpg to open macro associated with specified button and try to edit it. Refer this page if you want add some new multimedia command. Having problem with creating your own macro? Feel free to leave comment here and I will help you! :sunglasse Link to comment Share on other sites More sharing options...
Laufer Posted September 16, 2012 Share Posted September 16, 2012 Hard Macro v1.11 macro tool for Corsair Vengeance M60 and M90 Content 1. Installing Hard Macro (look below) 2. Using Hard Macro (example for Battlefield Heroes game) 3. Macro coding basics Good news, everyone! :sunglasse I'm glad to present you my work. This script based on AuotHotkey script language allows you to program various actions and assign them to mouse buttons. http://imageshack.us/a/img13/3715/hardmacro6090.png Here are the advantages of the script: + Unlimited quantity of profiles (Corsair software for M60 allows only 1 profile, for M90 - 6) (in "Hardware playback" mode) + Automatic switch between profiles. (for M60 Corsair soft must be launched, switched to profile via interface and reloaded to mouse memory, for M90 you have to press "Switch profile" button on a mouse) + Application assignment. Profile will work in applications requested (Corsair soft can't recognize most of games) + Functionality of macros limited only with your imagination (Corsair soft not allows if...then constructions, timers, cycles, pre-pressing, post-pressing and so on) - But this script requires some patience! So, go on and get some and welcome to the club! :sunglasse Let's begin! Step 1. Install script software 1. Install AutoHotkey_L 2. Download and unpack anywhere my HardMacro package (script, images, sounds, sample macros) 3. Download SciTE4AutoHotkey - delux macro editor. (This download is optional, Windows Notepad will be enough) Step 2. Assign extended mouse buttons You need to assign them to hardcoded buttons (listed below). Its a bit lame, but you have to do it only once. Just import profile M60_Default.xml or M90_Default.xml from package using Corsair software. Also set mouse to Hardware playback mode! No code has to be inserted here. No code has to be inserted here. (example on screen below) http://imageshack.us/a/img594/4412/f15v10.png :!: If you still want to use some specific mouse button don't assign it. It will be ignored by the script. I personally don't assign mouse button 5 of M60, I set it to DPI Select Step 3. Create new profile 1. Run script from previously downloaded Hard Macro package: HardMacro_M60.ahk for M60 and HardMacro_M90.ahk for M90 http://imageshack.us/a/img22/1875/hardmacro110help.png 2. Press button "Create profile" and input name of new profile. Step 4. Assign application 1. Press "Assign application" button. 2. Select application exe-file :!: Leave Application field empty and profile will work in all applications that not assigned in other profiles (also on Desktop) Step 5. Customize sound for profile Profile will automatically switch on assigned application you opened. But what if you use several profiles for one application? You can switch between them by pressing Win+Z but you can't see tool tip balloon indicating current profile (in most of games). For that case you may customize sound that script will play when you switch to specified profile. To do so: 1. Press "Customize sound" button. 2. Select sound wav-file. You will hear that sound immediately. 3. If you want default sound back select ProfileSwitch.wav from \Sounds folder. Step 6. Edit macros 1. Press button "Edit macro" on the right of drop-down lists with macro names. Macro will be open for editing. 2. When you finish editing just save script and close editor. 3. If you want to create new macro click on "Edit macro" when blank macro selected. Input new script name and click Ok. New script will be created in \Macros folder. 4. Press "Save" button. Profile will be saved to Profiles.cfg. 5. Press "Launch" button. Hard Macro will generate and run script MacroScript.ahk. Icon http://imageshack.us/a/img35/3563/macroscripttray.png will be shown in your system tray. If you want to stop script press right mouse button on that icon and select "Exit" or just press Win+F4 :!: You don't have to open HardMacro_M60.ahk or HardMacro_M90.ahk and press "Launch" button every time you want to play game. Just double click on MacroScript.ahk and it will run previously generated macro script. You may even put it to Windows Autorun folder! Thats it! Thank you for attention. Have fun! :winking: p.s. If you found a bug or have some ideas about my program - please, let me know! I will update my thread as soon as possible. _________________ To Do list: 1. List of templates so will be easier to create new macro. 2. Keyboard macros for K60 and K90. Link to comment Share on other sites More sharing options...
Laufer Posted September 16, 2012 Author Share Posted September 16, 2012 Macro coding basics Basic macro examples So lets go a bit further to the forest of Knowledge! I'll give you some simple examples in order to get the main idea of macro coding. http://img854.imageshack.us/img854/2498/playbackoptions1.png 1. Single key press Lets make first small step and make the same thing that you can do in every mouse software. Single key press! http://img714.imageshack.us/img714/6807/keypress1.png Push "Record macro" button and press some key (in our case key "Q"). The result is on the screen above. Three lines show: 1. Press Q button 2. Wait 0,050 seconds 3. Depress Q button How it looks in macro code? Create file q_PressOnce.ahk in folder \Macros and input there something like that: ; Text to the right from semicolon is commentary ; ; Single key press q_PressOnce: ; Subroutine name. It must be the same as filename! Send {q down} ; Press Q button Sleep, 50 ; Wait 50 milliseconds Send {q up} ; Depress Q button return ; Every subroutine must be finished with that command :!: Important! Macro filename must be same as macro subroutine name. In example above subroutine name is q_PressOnce and macro filename is q_PressOnce.ahk. Here I use Send command to emulate key pressing and Sleep command for pause. If you want to make a macro for another key, replace "q" with some other letter or number. If you want a key to be pressed longer replace Sleep parameter "50" with some other value. http://img838.imageshack.us/img838/9444/playbackoptions2.png 2. Number of key presses Where are two ways to make a number of key presses. First: copy code. Below follows the example: ; Press Space three times by coping ; Space_KeyPressByCoping: Send {Space down} ; press first time Sleep, 50 Send {Space up} Sleep, 50 Send {Space down} ; press second time Sleep, 50 Send {Space up} Sleep, 50 Send {Space down} ; press third time Sleep, 50 Send {Space up} Sleep, 50 Send {Space down} ; press fourth time Sleep, 50 Send {Space up} Sleep, 50 return Second: make cycle. ; Press Space three times by cycle ; Space_KeyPressByCycle: Loop, 4 ; loop count { Send {Space down} Sleep, 50 Send {Space up} Sleep, 50 } return In the last example I used Loop command for cycle. http://img577.imageshack.us/img577/7043/playbackoptions3.png 3. Repeat while pressed There are two ways to process a key press while pressed. First: broken presses. ; Press Left Mouse Button (LMB) repeatedly while Right Mouse Button (RMB) is pressed ; LMB_Intermittent: while GetKeyState("RButton", "P") ; while RMB pressed { Send {LButton down} ; press LMB Sleep, 50 Send {LButton up} Sleep, 50 } return Here I used While command for conditional cycle and GetKeyState to find out if key pressed or not. Second: continuous pressing. ; Press Left Mouse Button repeatedly while Right Mouse Button is pressed ; LMB_Continuous: Send {LButton down} ; press LMB while GetKeyState("RButton", "P") ; hold LMB pressed while RMB pressed { } Send {LButton up} ; depress LMB return http://img560.imageshack.us/img560/6296/playbackoptions4.png 4. Toggle key press Next example shows If-Else construction and new command: SetTimer. It calls subroutine v_ToggleTimer every 75 ms. Also we implicitly declare variable ToggleFlag. Macro seems hard to understand so just replace parameter of Send command. This macro may be useful for voice programs to toggle Push-to-Talk mode: ; Press assigned button to toggle key "V" state ; v_Toggle: If ToggleFlag ; If variable contents are blank (by default) or 0, it is considered false. Otherwise, it is true. { SetTimer, v_ToggleTimer, Off ; Turn off timer if button's been pressed second time } else { SetTimer, v_ToggleTimer, 75 ; Set timer to run every 75 milliseconds } ToggleFlag := not ToggleFlag ; Invert variable (if it has true make it false and vice versa) return v_ToggleTimer: Send {v down} ; Send key press return Conclusion This four examples covers mostly all of your needs in macros. Simply replace key notation in the code and rename subroutines (don't forget to keep them the same as macro filenames!). Try to combine this methods and will get more impressive results! For example, can you do it with any user-friendly mouse software?: ; Macro: "1" + (LMB) + BB`1 + Heal`4 ; ; + Switch to weapon "1"d ; + Fire holding LMB ; + Turn on Burning Bullets (press "7") after 1 second holding (after time passed push BB button every 0.5 sec) ; + Heal (press "5") after 4 second holding (after time passed push Heal button every 0.5 sec) 1LMB75_Switch1FireBBHeal: Send {1 down} ; Press "1" Sleep, 50 Send {1 up} SetTimer, BB_on, -1000 ; Set BB timer for 1 second SetTimer, Heal_on, -4000 ; Set Heal timer for 4 seconds Key := % A_ThisHotKey ; Use that construction to make macro universal. Guess why! ;) StringReplace, Key, Key, *$, , All Send {LButton down} ; Push and hold LMB while GetKeyState(Key, "P") { } Send {LButton up} ; Release LMB SetTimer, BB_on, Off ; Turn off timers SetTimer, Heal_on, Off return ; Burning Bullets timer activated BB_On: Send {7 down} ; Press "7" Sleep, 50 Send {7 up} SetTimer, BB_on, -500 return ; Heal timer activated Heal_On: Send {5 down} ; Press "5" Sleep, 50 Send {5 up} SetTimer, Heal_On, -500 return Still want more? Read fine AutoHotkey_L manual, read this forum, experiment, be curious! May the Force be with you! :sunglasse Link to comment Share on other sites More sharing options...
Boar Posted September 19, 2012 Share Posted September 19, 2012 That's cool, when users create a normal software faster than developers. Link to comment Share on other sites More sharing options...
Laufer Posted September 19, 2012 Author Share Posted September 19, 2012 That's cool, when users create a normal software faster than developers. Thanks for reply, Boar. I hope my humble software will be useful :rolleyes: Link to comment Share on other sites More sharing options...
robertp Posted September 20, 2012 Share Posted September 20, 2012 Hi Boar! Glad you found this thread. Laufer had posted this a while back and I thought it was a good idea. While we continue to work on improvements for our software it's a painfully slow process. I thought this would be a good tool to provide to the community while we keep working to make our software better. So, I approached Laufer about supporting the thread. He thought it was a good idea so I stuck it up here for everyone to see and experiment with. Hopefully this helps you with a feature or function we weren't able to get into our initial release and rest assured we're working hard to make our own better. =) Link to comment Share on other sites More sharing options...
Boar Posted September 20, 2012 Share Posted September 20, 2012 It is very encouraging to hear. But I have already returned the M90 to the store and exchanged for Logitech G600. I came here just to make fun of. Although I'm still stuck here with the K90. Link to comment Share on other sites More sharing options...
robertp Posted September 21, 2012 Share Posted September 21, 2012 Sorry to hear you had a bad experience. =( Link to comment Share on other sites More sharing options...
robertp Posted September 21, 2012 Share Posted September 21, 2012 Laufer, How would you do a multiple simultaneous key press? One that is active while you're holding the button down then releases once you release the button? For instance, right click, and "c" (crouch)? Link to comment Share on other sites More sharing options...
Laufer Posted September 21, 2012 Author Share Posted September 21, 2012 Laufer, How would you do a multiple simultaneous key press? One that is active while you're holding the button down then releases once you release the button? For instance, right click, and "c" (crouch)? Can't get the idea. Is it about pressing two buttons in one script? If so they have to be one after another. Or is it about two different buttons with two different scripts? If so - autohotkey itself separates key pressings on low level (send them to keyboard buffer) If you are about holding keys down while mouse button pressed - take a look at 3. Repeat while pressed section here, second example: continuous pressing. Please, explain what you mean. Link to comment Share on other sites More sharing options...
Nosisab Ken Kel Posted September 23, 2012 Share Posted September 23, 2012 PS: I see now the real question, introducing a second key down can be done keeping the first key pressed while pressing the second, or easier yet at editing the macro. Editing a macro is somewhat easier than creating one once you get the gist of it. To do so just right click at the position you want to include/edit/delete something (at the Assign Buttons tab). One have total control of the key status with autohotkey, so is just send the key down and then send another key down (or more if needed), do whatever needed, like specifying the sleep time and then send them up. lets have a small example I use to emergency heal using simultaneous two hands casting the same spell in Skyrim. Sadly this game does not allow setting alternative keyboard keys to LMB and RMB, so I used Autohotkey to do it: $[:: MouseClick, left,,, 1, 0, D ; Hold down the left mouse button. Loop { Sleep, 20 GetKeyState, state, [, P if state = U ; The key has been released, so break out of the loop. break ; ... insert here any other actions you want repeated. } MouseClick, left,,, 1, 0, U ; Release the mouse button. return $]:: MouseClick, right,,, 1, 0, D ; Hold down the right mouse button. Loop { Sleep, 20 GetKeyState, state, ], P if state = U ; The key has been released, so break out of the loop. break ; ... insert here any other actions you want repeated. } MouseClick, right,,, 1, 0, U ; Release the mouse button. return then bond a macro in both M90 and K90: (notice two keys are pressed in sequence before the first being released, this mean both are seen as pressed at that time... so would be the same if the first was Ctrl or Alt or whatever) 4 down 50 mseg 4 up 50ms 4 down 50 mseg 4 up 50ms [ down ] down 50 ms [ up ] up 100 ms [ down ] down 560 ms [ up ] up Explanation: I always bind the heal spell to the key 4 in that game... of course the above macro will power cast any spell bond to that key (just some spells may need a greater wait time to complete the animation. Is possible to assign a sequence of actions, just keep in mind than most spells have a charge time and then you need to give it enough time after actually releasing the emulated mouse button press to the spell animation to terminate before assign a new spell (a new Skyrim hotkey I mean); 400 ms seems enough to all spells I tested. Besides casting this macro will leave bot hands loaded with the heal spell, a tad more complex macro could be done, for example a prebattle buffer where after casting the desired (Skyrim hotkeyed spells) spells the macro changes the hands to be loaded to whatever default offensive spell or weapon... the procedure is always the same, just bind the desired spells/weapons to desired keys. Edit: in the above macro I repeated the [ and ] keystroke instead giving longer wait time because I found it is quicker than the almost 2 seconds needed to grant the spell is cast when loading from different spells/weapons assigned to the hands... a second call of the macro (with the heal spell already loaded) does not need that longer wait time. Edit 2: Understanding charge and wait times in Skyrim Many spells need a time before the mouse button can be released (or the spell will fail) - that is known as the charge time, it is that 560 ms in the above macro. After the mouse button is released the spell need a time to actually complete it's animation, it is the wait time (not shown in the above macro). That wait time becomes very important if the macro is continued, lets say reloading the weapon assigned to key 1 (for example)... to the spell to work a waiting time of something between 300 and 400 ms should be included before including the 1 keystroke... the macro would end this way: . . . [ down ] down 560 ms ; spell charge time [ up ] up 400 ms ; spell animation wait time 1 down 50 ms 1 up ; weapon/offensive spell loaded this effectively would load whatever weapon assigned to the numeric key 1 (or an offensive spell) and yet grant the heal spell is cast. Link to comment Share on other sites More sharing options...
Laufer Posted September 24, 2012 Author Share Posted September 24, 2012 Nice post, Ken! BTW, if you'd use HardMacro you could just add your keyboard bindings $[:: and $]:: to one of the scripts assigned to a mouse. It will work because scripts in Macro folder added to MacroScript file when you press "Launch" button. Give it a try ::pirate:: Link to comment Share on other sites More sharing options...
Nosisab Ken Kel Posted September 24, 2012 Share Posted September 24, 2012 Nice post, Ken! BTW, if you'd use HardMacro you could just add your keyboard bindings $[:: and $]:: to one of the scripts assigned to a mouse. It will work because scripts in Macro folder added to MacroScript file when you press "Launch" button. Give it a try ::pirate:: Actually you are the responsible for a very nice thread :) your original script already has a way to bind the LMB and RMB to the macros what is useful to the m90 and K90 as well. Edit: I use a specific script for Skyrim (the game itself is launched by it, skse in the specific case), mainly because it deals with a few important little things, one being the ability to block the system cursor in game, preventing it appearing when Alt Tab, making things really confuse and awkward. other than that, to date Corsair application for M90 and K90 (I don't know the versions for the 60 series) already implement most things I need in that game and all the other, the lack of LMB and RMB control being the most sore lack in Corsair mice and keyboards. Making them accessible should be the top priority for the developers at this point. Link to comment Share on other sites More sharing options...
Laufer Posted September 24, 2012 Author Share Posted September 24, 2012 Thats why I did it! Thank you :sunglasse BTW, I will update my program soon. I made tons of changes. Feel free to offer some new features. Link to comment Share on other sites More sharing options...
Laufer Posted September 24, 2012 Author Share Posted September 24, 2012 Laufer, How would you do a multiple simultaneous key press? One that is active while you're holding the button down then releases once you release the button? For instance, right click, and "c" (crouch)? Robert, looks like I've got your problem. Correct? Link to comment Share on other sites More sharing options...
robertp Posted September 25, 2012 Share Posted September 25, 2012 I believe so, thanks! =) Link to comment Share on other sites More sharing options...
robertp Posted September 25, 2012 Share Posted September 25, 2012 other than that, to date Corsair application for M90 and K90 (I don't know the versions for the 60 series) already implement most things I need in that game and all the other, the lack of LMB and RMB control being the most sore lack in Corsair mice and keyboards. Making them accessible should be the top priority for the developers at this point. I completely agree and we're working on it. Link to comment Share on other sites More sharing options...
Laufer Posted October 2, 2012 Author Share Posted October 2, 2012 Good news, everyone! Here goes first update of Hard Macro :biggrin: Change list v1.09: - applications now assigned by selecting exe-file (not typing in window name) - switching to profile now opens associated application window. - new sounds for changing profiles, mouse over event and button clicks. - new icon for Hard Macro (http://imageshack.us/a/img35/9835/hardmacrotray.png) and Macro Script (http://imageshack.us/a/img35/3563/macroscripttray.png) - now script can be created by pressing button http://imageshack.us/a/img16/5784/editbuttonx.jpg when blank macro selected. - extended mouse buttons changed from Numpad keys to virtual keys F13-F24. Also button assignment may be changed in HardMacro.cfg file. - inner changes to support further updates (support M90, K90, K60) - many minor changes and bug fixes. Also I written new article about practical use of Hard Macro in Battlefield Heroes game. Link to comment Share on other sites More sharing options...
Laufer Posted October 7, 2012 Author Share Posted October 7, 2012 Another one update for Hard Macro Change list v1.10: - version for M90 mouse. - profile now switch to assigned application automatically once application is opened. Use Win+Z to switch between profiles assigned to same application. - added ability to assign custom sound to profile. Useful for blind switching between profiles assigned to same application. - added "Online help" button. - redesigned drop-down list numeration. Link to comment Share on other sites More sharing options...
Laufer Posted October 21, 2012 Author Share Posted October 21, 2012 Here goes another small update for HardMacro: Change list v1.11: - empty Application field now makes profile act in all applications not assigned to other profiles. - added example scripts and "MultiMedia Control" profile to demonstrate usage of empty application field. - added Using HardMacro 2 article about multimedia control via macros Link to comment Share on other sites More sharing options...
savio Posted January 23, 2013 Share Posted January 23, 2013 I would like a macro to the game Point Blank, the command would be this: > Right Click > 50ms wait > Left Click > 50ms wait > Q key > 50ms wait > Q key > Stop Please help me, I am not aware. Link to comment Share on other sites More sharing options...
Laufer Posted January 24, 2013 Author Share Posted January 24, 2013 Hi, savio! Here goes your script: ; Point Blank ; ; Some PB action script PointBlank: Send {RButton down} Sleep, 50 Send {RButton up} Send {LButton down} Sleep, 50 Send {LButton up} Send {Q down} Sleep, 50 Send {Q up} return Try it and let me know if it works right in your game. Perhaps where should be added some Sleep commands between key-pressings. Link to comment Share on other sites More sharing options...
Jason537 Posted January 31, 2013 Share Posted January 31, 2013 I am trying to map a keystroke 6 to my sniper button,.. is there a way through delay to have it push on and stay on, then push again to turn off, or would that be part of a toggle. I am not using the sniper button to reduce DPI, I am trying to use it so I don't have to hold key 6 down on my keyboard constantly to have a weapon targeting system on. The game needs the button to be continuously pressed for guidance to function. I guess what I am trying to say is I would like it to work like a capslock or numlock button. Thanks Link to comment Share on other sites More sharing options...
Laufer Posted January 31, 2013 Author Share Posted January 31, 2013 Hello, Jason537! You guess it right - you need 6 key to be scripted in toggle mode. Example that I made here is for voice system (Push-To-Talk). For your case try this: ; Press assigned button to toggle key "6" state ; 6_Toggle: If 6_ToggleFlag ; If variable contents are blank (by default) or 0, it is considered false. Otherwise, it is true. Send {6 down} ; Push key 6 else Send {6 up} ; Release key 6 return Also I have one idea - if you have to switch off from sniping mode after one single shot - you may programm left mouse button to release key 6 if 6_ToggleFlag is true. Give me more information - we'll think it out. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.