News:

FOR INFORMATION ON DONATIONS, AND HOW TO OBTAIN ACCESS TO THE GAME, PLEASE VIEW THE FOLLOWING TOPIC: http://stick-online.com/boards/index.php?topic=2.0

Main Menu

Stick Online HotKeyz - v1.03, Full Screen Support!

Started by Cactuscat222, February 24, 2010, 03:02:03 AM

Previous topic - Next topic

Cactuscat222

Hey all - for a long time now, people have been asking about my Stick Online HotKeyz, and I've really appreciated the enthusiasm. However, SO went down shortly after their release, so I never updated them. However, just recently Seifer brought it up again, and I finally sat down and completely rewrote the entire thing.

I last left it off with a terribly long executable shortcut name, SOHKV1.00BETA - seeing as that implies it was in beta, I'm pulling it out of beta, and this is Stick Online HotKeyz v1.01 (Now v1.03). Below I'll just put all of the highlights, then I'll explain them as I go on.

Update: v1.03 has been released - this adds FULL SCREEN SUPPORT  ;D

I'd like to thank ARTGames and Lingus especially - they provided me with the math and the motivation. Thank you guys!

Change Log -
Changes from v1.02 to v1.03:
[New Feature] Fullscreen is now supported!
[Improvement] Various small improvements and fixes

Changes from v1.01 to v1.02:
[Fix] Delay function now works correctly for all slots and hot keys

Changes from v1.00 BETA to v1.01:
[New Feature] Delay, which allows you to set the speed at which it switches
[Improvement] On startup, automatically loads settings and sets them
[Improvement] Automatically refreshes hotkeys every time they are saved or loaded - the Refresh button is now removed
[Improvement] Improved performance and memory usage (all leaks removed, and a large reduction in memory usage)
[Improvement] It is now possible to map the most keys on your keyboard (Function keys, Numpad, etc)) in HKSettings.ini (Read on for explanation)
[Fix] You can now exit Hotkeyz even when HotKeyz is paused
[Fix] It will no longer queue up actions and perform them after paused (happened on rare occasions)
[Fix] Stick Online must be active for hotkeys to activate - The program will no longer automatically bring up Stick Online when you press a Hotkey while the program is not paused

Known Bugs/Features to be Implemented:
Cannot type unless HotKeyz is paused

For new users, please read the Read Me included in the zip folder, and also take a look at the 'Options > Controls' within the program itself. Read on if you want too, as well.

DOWNLOAD V1.03 HERE: Download SOHK

Phew, okay. As I said, I completely rewrote it so that the program runs much smoother and faster, and takes up much less memory (not to mention, I removed a large memory leak). But here is some explanations for the things above.

First, the new addition of Delay. At the top of the GUI, you can now change the delay in which the hats switch when you press a hotkey. I recommend 20, as it seems to work on most computers. However, for slower computers, or just those having a problem with the speed, you can increase the number to slow down the speed. 100 is pretty slow, so I'd recommend trying things between 20 and 100. Do not go below 20, thats too fast, and it will more than likely miss switching your items, and it may leave the inventory out.

The other improvement is that I removed the 'Refresh' button - now, the program automatically sets the hotkeys whenever you save or load, and on start up. Additionally, it loads the hotkeys on start up. So every time you change the hotkeys or slot, save it, and it will refresh.

The other big thing, is that now you can edit the HKSettings.ini file located within the same folder as SOHK.exe, and put in hotkeys for F2 through F12, the Numpad, or other special characters on your keyboard. To do so, follow this example:
[HotKeys]
Hotkey1={F2}
Hotkey2={NUMPAD1}
Hotkey3={NUMPADADD}
Hotkey4={END}
Hotkey5={HOME}
...


This is the full list, for those who really want to deck out their HotKeyz
{!}  !
{#} #
{+} +
{^} ^
{{} {
{}} }
{SPACE} SPACE
{ENTER} ENTER key on the main keyboard
{ALT} ALT
{BACKSPACE} or {BS} BACKSPACE
{DELETE} or {DEL} DELETE
{UP} Up arrow
{DOWN} Down arrow
{LEFT} Left arrow
{RIGHT} Right arrow
{HOME} HOME
{END} END
{ESCAPE} or {ESC} ESCAPE
{INSERT} or {INS} INS
{PGUP} PGUP
{PGDN} PGDN
{F1} - {F12} Function keys
{TAB} TAB
{PRINTSCREEN} PRINTSCR
{LWIN} Left Windows key
{RWIN} Right Windows key
{NUMLOCK} NUMLOCK
{BREAK} for Ctrl+Break processing
{PAUSE} PAUSE
{CAPSLOCK} CAPSLOCK
{NUMPAD0} - {NUMPAD9} Numpad digits
{NUMPADMULT} Numpad Multiply
{NUMPADADD} Numpad Add
{NUMPADSUB} Numpad Subtract
{NUMPADDIV} Numpad Divide
{NUMPADDOT} Numpad period
{NUMPADENTER} Enter key on the numpad
{APPSKEY} Windows App key
{LALT} Left ALT key
{RALT} Right ALT key
{LCTRL} Left CTRL key
{RCTRL} Right CTRL key
{LSHIFT} Left Shift key
{RSHIFT} Right Shift key
{SLEEP} Computer SLEEP key


So yeah, you can do that now, which is a major plus - but due to some limitations, I haven't gotten it too work within the actual GUI.

As far as fixes go, you can now quit even if HotKeyz is paused. I know that was annoying for me, so I'm betting it was annoying for alot of other people. Also, in rare cases, the program would queue up hotkeys while it was paused, and when it was unpaused, all hell would break loose. That has now been fixed. Additionally, if you forgot to pause, and are working on something outside of Stick Online and you press a hotkey, its not going to bring up SO like it did before and do its jazz. Hotkeys will only work if SO is running. You still must pause it, however, to type outside of SO while SOHK is running.

Finally, I know one thing that was really wanted, especially by Seifer, was full screen support. However, this hotkeys program is all done externally; there is no way for me to mess with the functions of the game. As such, I can't do full screen currently because the resolution adjusts to the resolution of the monitor you are playing it on. Since that occurs, it would take too much work for me to map every single coordinate for the inventory on every single resolution out there (not to mention, I don't have a big monitor). So, until there is a way I can detect where the inventory icon is, and where the inventory itself is, I'll keep trying to see if I can find a way to make it work.


So yeah. Have fun with it. If you find any bugs, feel free to post 'em here, or if you have any suggestions/comments/criticisms, post them here as well. PM me if you want.


Check out Stick Online HotKeyz v1.03 (Now with Full Screen Support!): Click Here

Lucifer

#1

For you sir, on the house.

*Edit*
A couple problems I've encountered so far. First, W doesn't seem to appear, but it works nontheless, so that's not really an issue. Second, I can't seem to change the delay using the program, only using the .ini file, however even then I see no change occur. One thing if possible I would like to see in the future, would be the ability to add more than just 8 hotkeys. Whether it be added visually as seperate pages, or just give us the ability to add "Hotkey9" and "Equip9" manually to the .ini, either would be nice. (If you actually can do this, please correct me!)
Great stuff though!

Cactuscat222

The delay should work, I just tested it though. I think I know why it wouldn't be working for you - try a larger number like 500 or something, and you should see a considerable difference. I changed it directly in the program, and it was working for me. If it still isn't working for you, let me know. Just try a large number, and it should work.

The 'w' doesn't show up because of the input box width (it needs to be longer) Though technically is does, if you highlight it. I have to fix the input boxes, so I'll get on that.

Yeah, I'll probably add more hotkeys in the near future. I've waited thus far on that, because I've been trying to allow it so that you could choose how many hotkeys you want.


Check out Stick Online HotKeyz v1.03 (Now with Full Screen Support!): Click Here

Seifer


Prosper

Cool.. I just used JitBit Macro recorder for mine.

I'ma try urs later.

Cactuscat222

Quote from: Seifer on February 24, 2010, 04:01:29 PM
Awwwww!!!! :(:(:(

I wanted full screen.


Ahhh, I know Seifer :(

Its really difficult, but I'm trying!


Check out Stick Online HotKeyz v1.03 (Now with Full Screen Support!): Click Here

Meiun

Theres no reason you should need to have seperate settings for each possible resolution as far as I can see. If you can figure out the current screen resolution, then the items should all be the same percentage of the way down the screen.

ARTgames

Quote from: Meiun on February 24, 2010, 07:08:09 PM
Theres no reason you should need to have seperate settings for each possible resolution as far as I can see. If you can figure out the current screen resolution, then the items should all be the same percentage of the way down the screen.
I guess it depends how he treating the screen. Now i do not know this is for sure (meaning i think im wrong) but game maker probably makes the window bigger and scales the image. So im guessing when this thing tries to click it misses its point because to it all it does is go to an x/y on the window and not from the graphics output its self.  

Non the less the easy fix is to let the user set ware the mouse needs to click.

Cactuscat222

Quote from: Meiun on February 24, 2010, 07:08:09 PM
Theres no reason you should need to have seperate settings for each possible resolution as far as I can see. If you can figure out the current screen resolution, then the items should all be the same percentage of the way down the screen.

That is just the thing. I tested it on my monitor by changing the resolution, and as far as I could tell, there was no set equation for the distance that the icon/inventory moved. They get stretched out, and appear in different places depending on your resolution, and I couldn't find any correlation between how far the things move and the resolution of the game.


Check out Stick Online HotKeyz v1.03 (Now with Full Screen Support!): Click Here

ARTgames

Now you could read the screen height and depth and make an accurate assumption ware things might go when they are full screen.

Cactuscat222

Quote from: ARTgames on February 24, 2010, 07:42:30 PM
Now you could read the screen height and depth and make an accurate assumption ware things might go when they are full screen.

Yeah, I know how to find the screen height and width - however, there is just no accounting for how much the thing is stretched based on resolution. Like I said, I went through multiple resolutions, some very small to some very high, and the difference between positions were just large and unaccountable.


Check out Stick Online HotKeyz v1.03 (Now with Full Screen Support!): Click Here

ARTgames

#11
Quote from: Cactuscat222 on February 24, 2010, 07:55:08 PM
Quote from: ARTgames on February 24, 2010, 07:42:30 PM
Now you could read the screen height and depth and make an accurate assumption ware things might go when they are full screen.

Yeah, I know how to find the screen height and width - however, there is just no accounting for how much the thing is stretched based on resolution. Like I said, I went through multiple resolutions, some very small to some very high, and the difference between positions were just large and unaccountable.
well use variables! :D


stick online window height = SoH
stick online window width = SoW
screen height = SH
screen width = SW
click placement for windows x (the x the mouse clicks on your so hot keys) = x
click placement for windows Y (you get the idea) = y

when in full screen use:
Y = SoH / SH * Y + Y
X = SoW / SW * X + X


Edit: ok so im not good at that math stuff, fixed it:
Y = Y - (SoH/SH * Y) + Y
X = X - (SoW/SW * X) + X

Or basically see how much it scaled and add that onto the old click x and y.

edit: ok i fixed the typos. i think

Cactuscat222

No no. When you go into full screen on Stick Online, it adjusts to your current resolution. So if you are running at 1280 x 1024, SO will become 1280 x 1024; if you are running at 800 x 600, then SO will adjust to 800 x 600 full screen, etc etc.

Right now, in non-fullscreen, SO runs at 950 x 600 or something. When you change from that to any other resolution, there is no set way to tell where the icon/inventory will be, because there is no equation. I would have to go through every resolution and add the correct coordinates, which would take forever, and I can't account for all of them.

EDIT: I see what you mean now, I'll try something.


Check out Stick Online HotKeyz v1.03 (Now with Full Screen Support!): Click Here

ARTgames

#13

Edit:
Yeah man this is what that's for. When stick online grows or shrinks to anything that math will also finger out ware to scale the mouse to match up. or so i hope (my math suck ok :P)

try my 2ed one out or post ur source code.

Cactuscat222

Okay, so I figured out the Delay problem Lucy - an error was making it so only Slot1 hotkeys would be affected by the delay. That has now been fixed, and I'll upload that with the next version.

Art, you got me alot closer, but its still not working. This is what I'm working with
SO is 950 x 600. Respectively, the mouse coordinates for the Inventory Icon are (545, 63). As such, the equation appears as:

(545 - (950/$_size[0] * 545) + 545) for X
(63 - (600/$_size[1] * 63) + 63) for Y

Where $_size[0] is the Full Screen Width, and $_size[1] is the Full Screen Height. So, when SO is not full screen, it works fine, just as the hotkeys always have.

However, putting in my resolution of 1280 x 1024, the numbers come out off

(545 - (950/1280 * 545) + 545) = 685.5
(63 - (600/1024 * 63) + 63) = 89.08

From my own investigation though, the numbers should be around 720 - 730, and 190 - 200. As I try other resolutions, the numbers are further off... so I'm not sure what to do.


Check out Stick Online HotKeyz v1.03 (Now with Full Screen Support!): Click Here