Author Topic: [TOOL] movepixel  (Read 18690 times)

Offline Somebody

  • *
  • Posts: 7200
  • Rep: 13
  • CP: +2
    • SomebodyofGTM
    • View Profile
    • My site
    • Awards
Re: [TOOL] movepixel
« Reply #20 on: May 30, 2011, 11:41:03 AM »
Ok, I downloaded an installed AutoHotKey_L

Then I unzipped movepixel and double clicked the script, and Autohotkey says that it IS running.

But when I go to use it, I get this.



halp?
I built that big robot on that TV show that time


Offline nightcracker

  • *
  • Posts: 505
  • Rep: 7
  • Script kiddo
    • View Profile
    • NC Labs
    • Awards
  • Skype: orsonpeters
Re: [TOOL] movepixel
« Reply #21 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.

Offline Squirrel_Monkey

  • Squirrel_Monkeyweight
  • *
  • Posts: 7587
  • Rep: 7
  • [Insert clever and witty comment here]
    • 0SquirrelMonkey0
    • View Profile
    • Awards
Re: [TOOL] movepixel
« Reply #22 on: May 30, 2011, 11:55:10 AM »
Great job.
Better than GK since 2009.
I think SM is a pretty cool guy, eh builds unicycle-bots and doesn't afraid of anything

Offline nightcracker

  • *
  • Posts: 505
  • Rep: 7
  • Script kiddo
    • View Profile
    • NC Labs
    • Awards
  • Skype: orsonpeters
Re: [TOOL] movepixel
« Reply #23 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.

Offline Squirrel_Monkey

  • Squirrel_Monkeyweight
  • *
  • Posts: 7587
  • Rep: 7
  • [Insert clever and witty comment here]
    • 0SquirrelMonkey0
    • View Profile
    • Awards
Re: [TOOL] movepixel
« Reply #24 on: May 30, 2011, 12:01:23 PM »
REPORT: All is fine but the X axis of the mouse when loading location seems to be too far to the right.
Better than GK since 2009.
I think SM is a pretty cool guy, eh builds unicycle-bots and doesn't afraid of anything

Offline nightcracker

  • *
  • Posts: 505
  • Rep: 7
  • Script kiddo
    • View Profile
    • NC Labs
    • Awards
  • Skype: orsonpeters
Re: [TOOL] movepixel
« Reply #25 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?

Offline Squirrel_Monkey

  • Squirrel_Monkeyweight
  • *
  • Posts: 7587
  • Rep: 7
  • [Insert clever and witty comment here]
    • 0SquirrelMonkey0
    • View Profile
    • Awards
Re: [TOOL] movepixel
« Reply #26 on: May 30, 2011, 12:09:41 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.
Better than GK since 2009.
I think SM is a pretty cool guy, eh builds unicycle-bots and doesn't afraid of anything

Offline nightcracker

  • *
  • Posts: 505
  • Rep: 7
  • Script kiddo
    • View Profile
    • NC Labs
    • Awards
  • Skype: orsonpeters
Re: [TOOL] movepixel
« Reply #27 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?

Offline Squirrel_Monkey

  • Squirrel_Monkeyweight
  • *
  • Posts: 7587
  • Rep: 7
  • [Insert clever and witty comment here]
    • 0SquirrelMonkey0
    • View Profile
    • Awards
Re: [TOOL] movepixel
« Reply #28 on: May 30, 2011, 12:49:27 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?
It's off on the desktop as well and I've tried both full screen and windowed mode.
Better than GK since 2009.
I think SM is a pretty cool guy, eh builds unicycle-bots and doesn't afraid of anything

Offline nightcracker

  • *
  • Posts: 505
  • Rep: 7
  • Script kiddo
    • View Profile
    • NC Labs
    • Awards
  • Skype: orsonpeters
Re: [TOOL] movepixel
« Reply #29 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.

Offline Jack Daniels

  • *
  • Posts: 2719
  • Rep: 9
  • Losing Tournaments with Style
    • matt.morrill.12
  • Awards BOTM Winner
    • View Profile
    • My abandoned online RPG project.
    • Awards
Re: [TOOL] movepixel
« Reply #30 on: May 30, 2011, 01:43:59 PM »
Excellent work sir! Figuring out the mouse tracking voodoo when the game is in window-ed mode will be a pain.

Whenever I run the game in window-ed mode my shadowed cursor runs amok on the desktop.  It only seems to be a factor on the right hand side of the game though. If I push the cursor too far and click it will bring me to the desktop instead (more than half the time it makes RA2 lock up in the process).

Offline nightcracker

  • *
  • Posts: 505
  • Rep: 7
  • Script kiddo
    • View Profile
    • NC Labs
    • Awards
  • Skype: orsonpeters
Re: [TOOL] movepixel
« Reply #31 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.

Offline nightcracker

  • *
  • Posts: 505
  • Rep: 7
  • Script kiddo
    • View Profile
    • NC Labs
    • Awards
  • Skype: orsonpeters
Re: [TOOL] movepixel
« Reply #32 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)?

Offline Sage

  • *
  • Posts: 6182
  • Rep: 11
  • RA2 Wizard & GTM's Favorite Stock Builder 2015
  • Awards Sage's Favorite BOTM Winner
    • View Profile
    • Awards
Re: [TOOL] movepixel
« Reply #33 on: May 30, 2011, 03:20:11 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.
You got my vote for RA2 Wizard. Always and forever.

Offline GarvinTheGreat

  • Ultra Heavyweight
  • Posts: 1495
  • Rep: 1
    • View Profile
    • Awards
Re: [TOOL] movepixel
« Reply #34 on: May 30, 2011, 03:31:17 PM »
Lol, This guy only has 14 posts and hes got rep of three. By the time I had 14 posts, I was already Pulling Garvins  :mrgreen: Anyway welcome to GTM and dont end up like me!

Offline nightcracker

  • *
  • Posts: 505
  • Rep: 7
  • Script kiddo
    • View Profile
    • NC Labs
    • Awards
  • Skype: orsonpeters
Re: [TOOL] movepixel
« Reply #35 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 :)

Offline Sage

  • *
  • Posts: 6182
  • Rep: 11
  • RA2 Wizard & GTM's Favorite Stock Builder 2015
  • Awards Sage's Favorite BOTM Winner
    • View Profile
    • Awards
Re: [TOOL] movepixel
« Reply #36 on: May 30, 2011, 04:01:50 PM »
Looks great cracker! Thanks
You got my vote for RA2 Wizard. Always and forever.

Offline nightcracker

  • *
  • Posts: 505
  • Rep: 7
  • Script kiddo
    • View Profile
    • NC Labs
    • Awards
  • Skype: orsonpeters
Re: [TOOL] movepixel
« Reply #37 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.
« Last Edit: May 31, 2011, 09:23:41 PM by ACAMS »

Offline Enigm@

  • convicted sex offender
  • *
  • Posts: 6616
  • Rep: 5
  • :really_makes_you_think:
    • http://www.youtube.com/us
    • View Profile
    • Awards
  • Skype: uncle_slamm
Re: [TOOL] movepixel
« Reply #38 on: May 30, 2011, 04:10:48 PM »
Looks great cracker! Thanks

Please, when you shorten my name use NC :)

I'm guessing you're white. XD
(◕‿◕✿) discord: uncle_slamm steam: bigmommaprodz #unbanlra2

Offline nightcracker

  • *
  • Posts: 505
  • Rep: 7
  • Script kiddo
    • View Profile
    • NC Labs
    • Awards
  • Skype: orsonpeters
Re: [TOOL] movepixel
« Reply #39 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 ??