Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - nightcracker

Pages: 1 ... 18 19 20 21 22 23 24 [25]
481
Discussion / Re: [TOOL] movepixel
« on: May 30, 2011, 04:32:53 PM »
Nah, I won't put it back in unless I can guarantee pixelperfect repositioning. Otherwise it's use would be nullified.

@Sage: The .lnk was accidently zipped in xD It's out now though.

482
Discussion / Re: [TOOL] movepixel
« on: May 30, 2011, 04:16:16 PM »
I had no clue, but yes I'm "white". Getting offtopic are we?

483
Discussion / Re: [TOOL] movepixel
« on: May 30, 2011, 04:13:45 PM »
Looks great cracker! Thanks

Please, when you shorten my name use NC :)

I'm guessing you're white. XD

As in skin color or ??

484
Discussion / Re: [TOOL] movepixel
« on: May 30, 2011, 04:08:58 PM »
Looks great cracker! Thanks

Please, when you shorten my name use NC :)

And update is done, new program uploaded, editing main post.

Removed save/load and added rotating/elevating components.

485
Discussion / Re: [TOOL] movepixel
« on: May 30, 2011, 03:50:08 PM »
i wonder if you can make shortcuts for rotating a raising components... like a hotkey for 90 degree rotation and a hotkey for 1 shift upwards of a component.

Allright, I'll try. Though I think plain rotating is more useful then 90 degree rotating. Do the following (updated) keybinds sound OK (I'm forced to use shift and control because of obvious reasons)?

ALT+Enter - click mouse button
SHIFT+Del - rotate counter-clockwise
SHIFT+Pagedown - rotate clockwise
CTRL+Home - move component up
CTRL+End - move component down
ALT+Home - move cursor one pixel up
ALT+End - move cursor one pixel down
ALT+Delete - move cursor one pixel left
ALT+Pagedown - move cursor one pixel right

@Garvin: I think it's a matter of contributing. If you contribute you get rep :)

486
Discussion / Re: [TOOL] movepixel
« on: May 30, 2011, 02:05:14 PM »
UGH.

I only just noticed that things like "Attach" move your cursor, which is impossible for me to track. I guess I'll scrap the load/save feature.

Any other requests before I make the first "real" release (so far it was pretty much beta)?

487
Discussion / Re: [TOOL] movepixel
« on: May 30, 2011, 01:53:29 PM »
Exactly. The reason why there is only a problem with the right hand side can be easily explained by the fact that the origin of screen coordinates in windows are in the topleft.

If I only had the RA2 source so I could check exactly how they do it it would make it a lot easier. This isn't the first thing I've reverse-engineered but my hopes aren't very high.

On the other hand, I'm going to leave the feature in. It should probably work as long as you don't bump into the sides of the window after saving a position. Perhaps more test cases would help, I would <3 you if you could test the save/load feature under windowed mode and under fullscreen mode.

488
Discussion / Re: [TOOL] movepixel
« on: May 30, 2011, 01:31:10 PM »
Ok, I have a bit deeper understanding of the game cursor in RA2 now, it's a custom cursor that works by tracking the Windows cursor's movement and reflecting that with the in-game cursor. But the second you smash into the side of the RA2 window this data messes up. I'll try and look for alternative ways for saving/restoring the game cursor.

489
Discussion / Re: [TOOL] movepixel
« on: May 30, 2011, 12:42:43 PM »
Both 1280x1024. Outside of RA2 it's only horizontal. Inside it's both horizontally and vertically out.
EDIT: In fact it seems to be choosing random spots all over the place then settling on one random spot.

Is it off in the default desktop too?

And do you use full screen?

490
Discussion / Re: [TOOL] movepixel
« on: May 30, 2011, 12:05:31 PM »
REPORT: All is fine but the X axis of the mouse when loading location seems to be too far to the right.

Thanks for the report, very useful.

Hmm, I suspect that you run RA2 on a different ratio than your desktop. What is the resolution of your desktop and at what resolution do you use RA2?

491
Discussion / Re: [TOOL] movepixel
« on: May 30, 2011, 11:58:02 AM »
Alright, another update fixing the mouse click. I simply had to wait 50 miliseconds between sending  "mousedown" and "mouseup" for RA2 to register it.

492
Discussion / Re: [TOOL] movepixel
« on: May 30, 2011, 11:46:36 AM »
Another update, fixed in-game loading and saving cursor positions, apparently robot arena only supports relative mouse movement events.

Still working on fixing clicking.

@Somebody: Hmm, try removing all related files of movepixel and reinstall with the latest download found in the first post. That should fix this issue.

493
Discussion / Re: [TOOL] movepixel
« on: May 30, 2011, 11:29:51 AM »
Alright, updated the tool. This time I statically compiled the VC++ runtime environment so you don't need to download and install all kinds of DLL's. Now supports loading and saving cursor positions and emulating left mouse clicks. Give me two secs to upload and update main post.

--

EDIT: Update done, but saving/loading cursor positions still seem bugged. Hang on while I'm trying to get this fixed. You can still download and install, the rest of the features work fine.

494
Discussion / Re: [TOOL] movepixel
« on: May 30, 2011, 07:26:11 AM »
I get "The system cannot find movepixel.exe" when I try anything.
EDIT: Missing .dll file. Fixed now. Pretty cool. Might help with stacking in Stock  :eek:

I'm sorry, this is my fault I guess I'll recompile it soon and make sure to have as little weird visual c++ dll requirements as possible.

Well... That was the single greatest first post on this forum..
I feel flattered :)

Since there is such a huge interest I've been thinking and when I get home I will add three more keys:
ALT+Page up - save cursor position
ALT+Insert - load cursor position
SHIFT+Insert - click the left mouse button, this is to prevent accidently moving the mouse while clicking

The save/load cursor position should make tweaking with sliders a bit easier (since some sliders always reset to their default value, like the height slider).

495
Discussion / Re: [TOOL] movepixel
« on: May 29, 2011, 10:04:50 PM »
THATS SO AMAZING.

EDIT: BFE/AAM is going outside of the game and editing the files that are inside the game, aka cheating. But this is inside the game, so I think it's ok!
Ah yeah, anything you can do with this can be done the normal way, it just makes it a bit easier.

496
Discussion / Re: [TOOL] movepixel
« on: May 29, 2011, 09:57:50 PM »
We're getting so close to BFE/AAM, yet far enough to not cross the line. xD
Forgive my noobness, but what is BFE/AAM?

497
Discussion / Re: [TOOL] movepixel
« on: May 29, 2011, 09:53:07 PM »
YOU ARE AWESOME, BRO.
*Cough*

I'm an awesome programmer/script kiddo, but so far I haven't been able to create even a half-decent bot xD

But thanks :)

498
Discussion / Re: [TOOL] movepixel
« on: May 29, 2011, 09:43:56 PM »
Sweet... Now we can all build at 123's level of precision.

Oh and welcome to GTM!
Thanks!

499
Discussion / [TOOL] movepixel
« on: May 29, 2011, 09:25:54 PM »
I'm sorry if this is not allowed/wrong forum/against any other rule. I just find this useful and wanted to share.

I got sick of trying to move one pixel while stacking and stuff in the bot lab, so I wrote this little application. It allows you to move your cursor one pixel at a time by using a keybind for super precise movement, and while your at it you can rotate, elevate and place the component too. Basically this allows you to do keyboard component placing.

Download here.

Requirements:
Autohotkey - Direct download

Usage:
Unzip and extract somewhere. Double click movepixel.ahk and you're good to go! The default keybindings can be found below this paragraph. You can edit the keybindings in the movepixel.ahk file. Read up on Autohotkey documentation for further guidance.

Once you look at your keyboard these keybindings will make sense :)
Enter - click mouse button
F8 - alternative for pause break
SHIFT+Del - rotate counter-clockwise one "tick"
SHIFT+Pagedown - rotate clockwise one "tick"
CTRL+SHIFT+Del - rotate counter-clockwise 90 degrees
CTRL+SHIFT+Pagedown - rotate clockwise 90 degrees
CTRL+Home - move component up
CTRL+End - move component down
Home - move cursor one pixel up
End - move cursor one pixel down
Delete - move cursor one pixel left
Pagedown - move cursor one pixel right

If you do not trust my binary, here is the source, compile it yourself:
Code: [Select]
#include <cstring>

#include <windows.h>

void movecursor(long x, long y);
void leftclick();

#ifdef _MSC_VER
#define argc __argc
#define argv __argv
int WINAPI WinMain(HINSTANCE hInstance,
                   HINSTANCE hPrevInstance,
                   LPSTR lpCmdLine,
                   int nCmdShow) {
#elif
int main(int argc, char *argv[]) {
#endif
if (argc == 2 && !strcmp(argv[1], "click")) {
leftclick();
} else if (argc == 4 && !strcmp(argv[1], "move")) {
long x, y;
x = atol(argv[2]);
y = atol(argv[3]);

movecursor(x, y);
}

return 0;
}

void movecursor(long x, long y) {
INPUT buffer = {0};

buffer.type = INPUT_MOUSE;
buffer.mi.dwFlags = MOUSEEVENTF_MOVE;
buffer.mi.dx = x;
buffer.mi.dy = y;

SendInput(1, &buffer, sizeof(INPUT));
}


void leftclick() {
INPUT buffer = {0};
buffer.type = INPUT_MOUSE;

buffer.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
SendInput(1, &buffer, sizeof(INPUT));

Sleep(50);

buffer.mi.dwFlags = MOUSEEVENTF_LEFTUP;
SendInput(1, &buffer, sizeof(INPUT));
}

Pages: 1 ... 18 19 20 21 22 23 24 [25]