Here is the script I promised. You shouldn't use it if you don't already know how to use scripts on the G15-type keyboards. All the ideas for the code came from the http://g15forums.com site.
The script for the G1 and G4 keys needs to be edited because it is unlikely your "Selected" target window is in the same place as mine, and the selected PI item window (where you click on the "scan for resources" button, etc.) can be in a different place. Use Microsoft's DBGView.exe and the G6 keypress in the script to get the coordinates of the relevant buttons for the mouse to click.
function OnEvent(event, arg)
--OutputLogMessage("event = %s, arg = %s\n", event, arg);
mkey = GetMKeyState();
if (event == "G_PRESSED" and arg == 1 and mkey == 3) then
-- Pressed G1 key while M3 was active - Click "warp to zero" on selected target
x, y = GetMousePosition();
-- Click the "Warp to zero" button on the "Selected" window
MoveMouseTo(53852, 7495); -- For these coordinates, use the G6 keypress
PressAndReleaseMouseButton(1);
Sleep(5);
ClearLCD();
OutputLCDMessage("Warp to 0 KM!", 3000);
-- Return mouse pointer to previous position
MoveMouseTo(x, y);
end
if (event == "G_PRESSED" and arg == 4 and mkey == 3) then
-- Pressed G4 key while M3 was active - Reset selected PI extractor
x, y = GetMousePosition();
-- Click the "Scan for resources" button
MoveMouseTo(51188, 27995); -- For these coordinates, use the G6 keypress
PressAndReleaseMouseButton(1);
ClearLCD();
OutputLCDMessage("Looking for stuff...", 3000);
Sleep(4000); -- Wait 4 seconds for scan to complete
-- Click the 23 hour option
MoveMouseTo(51495, 36899);
PressAndReleaseMouseButton(1);
Sleep(5);
-- Click the "Install" button
MoveMouseTo(57132, 42665);
PressAndReleaseMouseButton(1);
Sleep(5);
-- Return mouse pointer to previous position
MoveMouseTo(x, y);
end
if (event == "G_PRESSED" and arg == 6 and mkey == 3) then
-- Pressed G6 key while M3 was active -
-- - Output current mouse position to DBG channel
x, y = GetMousePosition();
OutputDebugMessage("G15: Mouse currently at %d, %d\n", x, y)
-- Visit "http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx" for
-- a Microsoft-provided DBG channel viewer
-- Using the debug viewer, filter for "G15" and things become more readable.
end
end
Before anyone mentions it, several Eve-Online forum posts from CCP employees say that the macros and scripts that can be run from the G15-type keyboards do not conflict with the EULA.
Go ahead and post your macros in an answer to this question. The warp to macro sounds really useful and time saving in a pinch for sure.