July 3, 201015 yr Hi all, I'm a long-time player of Harpoon Classic but by no means a seasoned one. I think I picked up the CD when I was 11 (now 25), every year or two it goes back into the CD drive for another play. Definitely aptly-named Since sending Nimrods forth to blow submarines out of the water in the GIUK gap has made up the majority of my Harpoon experience, the lack of a method of precisely ordering a sonobouy search has been a long term irritation. I decided to have a quick go at implementing this using the automation scripting utility 'AutoHotKey' (incredibly useful tool that I've dabbled with in the past) VERY IMPORTANT Put simply, AutoHotKey - the program used by this script - is dangerous! It works by sending virtual keypresses / mouseclicks to the application. There's a danger here: if the user or AutoHotKey accidentally selects another window, keypresses and mouseclicks can end up being sent to the wrong window with 'unpredictable results'. Therefore please make sure Harpoon is the only running program (even then there's a danger of keypresses and mouseclicks going astray to Windows itself, so be warned) and that you quit AutoHotKey (right click on the green H in the system tray and choose 'Exit') after each session. Summary: In this proof of concept the player can order a single sonobouy drop or drag out a search box which is then filled according to the 5-6-5 pattern mentioned here: http://harpgamer.com/harpforum/index.php?s...&hl=pattern (currently the 'road' can only be specified as south-north / north-south) The AutoHotKey script then sends the mouseclicks and keypresses necessary to queue up the sonobouy drops over the search pattern in the in-game course screen. (The sonobouy drops are ordered using the automated sonobouy drop trick mentioned here by Steven:) http://harpgamer.com/harpforum/index.php?showtopic=8884) I'm guessing this should work on all the Windows Harpoon Classic derivatives. Installation: Requires AutoHotKey www.autohotkey.com , installs/runs the same as any other AutoHotKey script (both files must be in the same directory) Use: Ensure the script is running (Green 'H' appears in the taskbar with a tooltip SonobouyProofOfConcept.ahk if you hover the mouse over it). Select the aircraft you wish to order. Press CTRL-2 and set the aircraft's speed and height, this will be the speed and height used between sonobouy drops. If the aircraft is loitering/hovering when the orders are set, its cruise speed on each leg of the search pattern will be set to 0. (This doesn't work well). Bear in mind that the 'automated sonobouy drop trick' requires the aircraft to drop to briefly drop to very low height, so a cruise height of anything more than 'low' will take longer while the aircraft descends and ascends. Press CTRL-3 to enter the course screen. If the aircraft is moving towards its patrol point, you may wish to clear the current orders. (Otherwise the aircraft will reach that point and loiter, requiring you to increase its speed manually before it begins the search pattern.) Keep the course screen open. Single sonobouy drop To queue a single sonobouy drop at a specific search pattern, just move the mouse to where you want the drop to take place (don't click) and press the Windows key and C at the same time. 5-6-5 Search pattern To queue a crude implementation (the 'road' is only north to south) of the 5-6-5 search pattern as detailed in the link above, adjust the zoom and position of the main search window to encompass the area you wish to search. Move the mouse to the SW corner of your search area* (don't click) and press and hold the Windows key and X at the same time. Drag the mouse to the NE corner of your search area and release the windows and X keys. AutoHotKey will begin sending the mouse clicks and keypresses required to queue up the search area (takes about 10s total) *or NW for north - south 'road' Further Development I don't intend to do any further development on this, I have a feeling someone will take this and run with it if it's a positive idea, and if it's too unbalancing people will just ignore it. I don't play Harpoon enough to spend much time on this script (sometimes I think I just like finding problems to solve!). As a scripting language AutoHotKey is relatively easy to learn, though it has some maddening quirks. SonobouyProofOfConcept.zip
July 3, 201015 yr Author Almost forgot: When you're dragging out the search area, if you wish to cancel the orders for any reason, just make the box less than 2 pixels wide.
July 6, 201015 yr Excellent, are you by chance the fellow who posted a similar approach a couple of years ago?
July 8, 201015 yr Author Excellent, are you by chance the fellow who posted a similar approach a couple of years ago? No, but I'd be interested in seeing the approach he took. Can you remember any details that might help me find the post?
July 8, 201015 yr Looks like it wasn't as advanced or universal as your approach but the author, Mark Kratzer called it BuoyBlaster I have coded this up for HCCE and it works very nicely. For example, at 10TC running with a 5 second interval, it produces a beautiful chain of just touching buoys from a Lynx at cruise. It runs via a hotkey from my G15 game keyboard. Pausing or switching away from HCCE will kill it. It will pause if the staff assistant pops-up. It is totally configurable and can be speeded up or slowed down. A little more work will be required to adapt this for H363. I suspect I will not be able to detect child windows and I will have to allow the option of active/passive/both. WinTitle(WinName(), "BuoyBlaster") ; Mark Kratzer 12/19/07 ; ; Utility to feed buoy drop characters into HCCE at a steady ; rate. It will be activated via the G15 keyboard as G15 macro ; key. ; ; Usage is to plot a path for a helo and then start this macro. ; ; It will prompt for an initial frequency, but also use a default. ; ; Hold SHIFT key down to increase delay. Hold CTRL key down to descrease delay. ; ; Staff messages cause a temporary suspension. ; ; Pause the game to terminate. ; ----- Definitions ------ GameWindowName="Harpoon" BuoyDefaultInterval=5 AckSound="AckSound.wav" ; ----- Initialize ----- ; ----- Monitor active window and toggle key state ----- WindowName=WinGetActive() ; get a custom frequency BuoyInterval=AskLine("BuoyBlaster", "Enter seconds (wall clock) between buoys?", BuoyDefaultInterval) Delay(1) WinActivate(WindowName) ; return focus to HCCE While @True Delay(BuoyInterval) ; wait for next buoy drop If IsKeyDown(@SHIFT) Then BuoyInterval=BuoyInterval+2 ; increase by two seconds Beep() ; two beeps for longer delay Delay(1) Beep() End If If IsKeyDown(@CTRL) Then BuoyInterval=BuoyInterval-2 ; decrease by two seconds If BuoyInterval Beep() ; one beep for shorter delay End If If StrIndex(WinGetActive(),GameWindowName,1,@FWDSCAN) Then ; Does HCCE have focus? SendKey(".") ; emit buoy PlayWaveForm(AckSound, 0) ; play sound for buoy drop Else If WinGetActive()"Staff Message" Then Exit ; if pause or lose focus, then terminate End If ; temporarily skip during staff message End If End While ___________________________________________________________ Mark Kratzer
Create an account or sign in to comment