Jump to content
LaunchBox Community Forums

LaunchBox Beta Testing - 6.8+


Jason Carr

Recommended Posts

Yes, potentially I can, but before we go down that path I want to make sure that that is the solution we want to take. That will require some development to implement (the previous work we had done is ancient and wouldn't fit into the current code, not to mention it had some numerous issues). So I want to re-evaluate things to come up with the best solution. We've had a ton of controller issues with AutoHotkey, and I understand that AutoIt is a more flexible option and also has a less restrictive license, so that's one possible idea.

Link to comment
Share on other sites

15 minutes ago, Jason Carr said:

Yes, potentially I can, but before we go down that path I want to make sure that that is the solution we want to take. That will require some development to implement (the previous work we had done is ancient and wouldn't fit into the current code, not to mention it had some numerous issues). So I want to re-evaluate things to come up with the best solution. We've had a ton of controller issues with AutoHotkey, and I understand that AutoIt is a more flexible option and also has a less restrictive license, so that's one possible idea.

AutoHotKey is a fork of AutoIT afaik, AutoIT is the original.  Never used AutoHotKey before, always used AutoIt (it's very easy to use).

Here's a little program I made in autoit to solved bejeweled in starcraft 2 LOL


#include <Color.au3>

hotkeyset( "{esc}" , "Quit" )

HotKeySet("2", "execute")

global $grid[8][8]

global $i = 0

global $j = 0

Global $tolerance = 20

Global $number_found = 0



Func get_pixel_colour()

$grid[0][0] = hex(PixelGetColor(1150,143),6)

$grid[0][1] = hex(PixelGetColor(1150+66,143),6)

$grid[0][2] = hex(PixelGetColor(1150+66+66,143),6)

$grid[0][3] = hex(PixelGetColor(1150+66+66+66,143),6)

$grid[0][4] = hex(PixelGetColor(1150+66+66+66+66,143),6)

$grid[0][5] = hex(PixelGetColor(1150+66+66+66+66+66,143),6)

$grid[0][6] = hex(PixelGetColor(1150+66+66+66+66+66+66,143),6)

$grid[0][7] = hex(PixelGetColor(1150+66+66+66+66+66+66+66,143),6)





$grid[1][0] = hex(PixelGetColor(1150,143+66),6)

$grid[1][1] = hex(PixelGetColor(1150+66,143+66),6)

$grid[1][2] = hex(PixelGetColor(1150+66+66,143+66),6)

$grid[1][3] = hex(PixelGetColor(1150+66+66+66,143+66),6)

$grid[1][4] = hex(PixelGetColor(1150+66+66+66+66,143+66),6)

$grid[1][5] = hex(PixelGetColor(1150+66+66+66+66+66,143+66),6)

$grid[1][6] = hex(PixelGetColor(1150+66+66+66+66+66+66,143+66),6)

$grid[1][7] = hex(PixelGetColor(1150+66+66+66+66+66+66+66,143+66),6)



$grid[2][0] = hex(PixelGetColor(1150,143+66+66),6)

$grid[2][1] = hex(PixelGetColor(1150+66,143+66+66),6)

$grid[2][2] = hex(PixelGetColor(1150+66+66,143+66+66),6)

$grid[2][3] = hex(PixelGetColor(1150+66+66+66,143+66+66),6)

$grid[2][4] = hex(PixelGetColor(1150+66+66+66+66,143+66+66),6)

$grid[2][5] = hex(PixelGetColor(1150+66+66+66+66+66,143+66+66),6)

$grid[2][6] = hex(PixelGetColor(1150+66+66+66+66+66+66,143+66+66),6)

$grid[2][7] = hex(PixelGetColor(1150+66+66+66+66+66+66+66,143+66+66),6)



$grid[3][0] = hex(PixelGetColor(1150,143+66+66+66),6)

$grid[3][1] = hex(PixelGetColor(1150+66,143+66+66+66),6)

$grid[3][2] = hex(PixelGetColor(1150+66+66,143+66+66+66),6)

$grid[3][3] = hex(PixelGetColor(1150+66+66+66,143+66+66+66),6)

$grid[3][4] = hex(PixelGetColor(1150+66+66+66+66,143+66+66+66),6)

$grid[3][5] = hex(PixelGetColor(1150+66+66+66+66+66,143+66+66+66),6)

$grid[3][6] = hex(PixelGetColor(1150+66+66+66+66+66+66,143+66+66+66),6)

$grid[3][7] = hex(PixelGetColor(1150+66+66+66+66+66+66+66,143+66+66+66),6)



$grid[4][0] = hex(PixelGetColor(1150,143+66+66+66+66),6)

$grid[4][1] = hex(PixelGetColor(1150+66,143+66+66+66+66),6)

$grid[4][2] = hex(PixelGetColor(1150+66+66,143+66+66+66+66),6)

$grid[4][3] = hex(PixelGetColor(1150+66+66+66,143+66+66+66+66),6)

$grid[4][4] = hex(PixelGetColor(1150+66+66+66+66,143+66+66+66+66),6)

$grid[4][5] = hex(PixelGetColor(1150+66+66+66+66+66,143+66+66+66+66),6)

$grid[4][6] = hex(PixelGetColor(1150+66+66+66+66+66+66,143+66+66+66+66),6)

$grid[4][7] = hex(PixelGetColor(1150+66+66+66+66+66+66+66,143+66+66+66+66),6)



$grid[5][0] = hex(PixelGetColor(1150,143+66+66+66+66+66),6)

$grid[5][1] = hex(PixelGetColor(1150+66,143+66+66+66+66+66),6)

$grid[5][2] = hex(PixelGetColor(1150+66+66,143+66+66+66+66+66),6)

$grid[5][3] = hex(PixelGetColor(1150+66+66+66,143+66+66+66+66+66),6)

$grid[5][4] = hex(PixelGetColor(1150+66+66+66+66,143+66+66+66+66+66),6)

$grid[5][5] = hex(PixelGetColor(1150+66+66+66+66+66,143+66+66+66+66+66),6)

$grid[5][6] = hex(PixelGetColor(1150+66+66+66+66+66+66,143+66+66+66+66+66),6)

$grid[5][7] = hex(PixelGetColor(1150+66+66+66+66+66+66+66,143+66+66+66+66+66),6)



$grid[6][0] = hex(PixelGetColor(1150,143+66+66+66+66+66+66),6)

$grid[6][1] = hex(PixelGetColor(1150+66,143+66+66+66+66+66+66),6)

$grid[6][2] = hex(PixelGetColor(1150+66+66,143+66+66+66+66+66+66),6)

$grid[6][3] = hex(PixelGetColor(1150+66+66+66,143+66+66+66+66+66+66),6)

$grid[6][4] = hex(PixelGetColor(1150+66+66+66+66,143+66+66+66+66+66+66),6)

$grid[6][5] = hex(PixelGetColor(1150+66+66+66+66+66,143+66+66+66+66+66+66),6)

$grid[6][6] = hex(PixelGetColor(1150+66+66+66+66+66+66,143+66+66+66+66+66+66),6)

$grid[6][7] = hex(PixelGetColor(1150+66+66+66+66+66+66+66,143+66+66+66+66+66+66),6)



$grid[7][0] = hex(PixelGetColor(1150,143+66+66+66+66+66+66+66),6)

$grid[7][1] = hex(PixelGetColor(1150+66,143+66+66+66+66+66+66+66),6)

$grid[7][2] = hex(PixelGetColor(1150+66+66,143+66+66+66+66+66+66+66),6)

$grid[7][3] = hex(PixelGetColor(1150+66+66+66,143+66+66+66+66+66+66+66),6)

$grid[7][4] = hex(PixelGetColor(1150+66+66+66+66,143+66+66+66+66+66+66+66),6)

$grid[7][5] = hex(PixelGetColor(1150+66+66+66+66+66,143+66+66+66+66+66+66+66),6)

$grid[7][6] = hex(PixelGetColor(1150+66+66+66+66+66+66,143+66+66+66+66+66+66+66),6)

$grid[7][7] = hex(PixelGetColor(1150+66+66+66+66+66+66+66,143+66+66+66+66+66+66+66),6)







EndFunc





Func ColorInBounds($pMColor, $pTColor, $pVariation)

    $lMCBlue = _ColorGetBlue("0x"&$pMColor)

    $lMCGreen = _ColorGetGreen("0x"&$pMColor)

    $lMCRed = _ColorGetRed("0x"&$pMColor)



    $lTCBlue = _ColorGetBlue("0x"&$pTColor)

    $lTCGreen = _ColorGetGreen("0x"&$pTColor)

    $lTCRed = _ColorGetRed("0x"&$pTColor)



    $a = Abs($lMCBlue - $lTCBlue)

    $b = Abs($lMCGreen - $lTCGreen)

    $c = Abs($lMCRed - $lTCRed)



    If ( ( $a < $pVariation) AND ( $b <$pVariation) AND ( $c < $pVariation) ) Then

        Return True

    Else

        Return False

    EndIf

EndFunc



Func solve()

	while ($j < 8)



			While ($i < 8)



				;;1

				if ($i + 0 < 8 And $j + 3 < 8) Then



					if (ColorInBounds($grid[$i + 0][$j + 0],$grid[$i + 0][$j + 1],$tolerance) And ColorInBounds($grid[$i + 0][$j + 1] , $grid[$i + 0][$j + 3],$tolerance)) Then

						MouseClick("left",1150+$j*66+66*3,143+$i*66,1,1)

						MouseClick("left",1150+$j*66+66*2,143+$i*66,1,1)

						;sleep(1000)

							get_pixel_colour()

							$number_found = $number_found + 1

					EndIf

				EndIf



				;;2

				if ($i + 1 < 8 And $j + 2 < 8) Then

					if (ColorInBounds($grid[$i + 0][$j + 0] , $grid[$i + 0][$j + 1],$tolerance) And ColorInBounds($grid[$i + 0][$j + 1] , $grid[$i + 1][$j + 2],$tolerance)) Then

						MouseClick("left",1150+$j*66+66*2,143+$i*66+66,1,1)

						MouseClick("left",1150+$j*66+66*2,143+$i*66,1,1)

						;sleep(1000)

						get_pixel_colour()

						$number_found = $number_found + 1

					EndIf

				EndIf

;;3

				if ($i + 1 < 8 And $j + 2 < 8) Then



					if (ColorInBounds($grid[$i + 0][$j + 0] , $grid[$i + 0][$j + 2],$tolerance) And ColorInBounds($grid[$i + 0][$j + 2] , $grid[$i + 1][$j + 1],$tolerance)) Then

						MouseClick("left",1150+$j*66+66,143+$i*66+66,1,1)

						MouseClick("left",1150+$j*66+66,143+$i*66,1,1)

						;sleep(1000)

							get_pixel_colour()

						$number_found = $number_found + 1

					EndIf

				EndIf

;;4



				if ($i + 1 < 8 And $j + 2 < 8) Then



					if (ColorInBounds($grid[$i + 1][$j + 0] , $grid[$i + 0][$j + 1],$tolerance) And ColorInBounds($grid[$i + 0][$j + 1] , $grid[$i + 0][$j + 2],$tolerance)) Then

						MouseClick("left",1150+$j*66,143+$i*66+66,1,1)

						MouseClick("left",1150+$j*66,143+$i*66,1,1)

						;sleep(1000)

							get_pixel_colour()

							$number_found = $number_found + 1



					EndIf

				EndIf



;;5

				if ($i + 0 < 8 And $j + 3 < 8) Then



					if (ColorInBounds($grid[$i + 0][$j + 0] , $grid[$i + 0][$j + 2],$tolerance) And ColorInBounds($grid[$i + 0][$j + 2] , $grid[$i + 0][$j + 3],$tolerance)) Then

						MouseClick("left",1150+$j*66,143+$i*66,1,1)

						MouseClick("left",1150+$j*66+66,143+$i*66,1,1)

						;sleep(1000)

							get_pixel_colour()

						$number_found = $number_found + 1

					EndIf

				EndIf





;;6

				if ($i + 1 < 8 And $j + 2 < 8) Then



					if (ColorInBounds($grid[$i + 0][$j + 2] , $grid[$i + 1][$j + 1],$tolerance) And ColorInBounds($grid[$i + 1][$j + 1] , $grid[$i + 1][$j + 0],$tolerance)) Then

						MouseClick("left",1150+$j*66+66+66,143+$i*66,1,1)

						MouseClick("left",1150+$j*66+66+66,143+$i*66+66,1,1)

						;sleep(1000)

							get_pixel_colour()

							$number_found = $number_found + 1

					EndIf

				EndIf



;;7

				if ($i + 1 < 8 And $j + 2 < 8) Then



					if (ColorInBounds($grid[$i + 0][$j + 1] , $grid[$i + 1][$j + 0],$tolerance) And ColorInBounds($grid[$i + 1][$j + 0] , $grid[$i + 1][$j + 2],$tolerance)) Then

						MouseClick("left",1150+$j*66+66,143+$i*66,1,1)

						MouseClick("left",1150+$j*66+66,143+$i*66+66,1,1)

						;sleep(1000)

							get_pixel_colour()

							$number_found = $number_found + 1

					EndIf

				EndIf

;;8

				if ($i + 1 < 8 And $j + 2 < 8) Then



					if (ColorInBounds($grid[$i + 0][$j + 0] , $grid[$i + 1][$j + 1],$tolerance) And ColorInBounds($grid[$i + 1][$j + 1] , $grid[$i + 1][$j + 2],$tolerance)) Then

						MouseClick("left",1150+$j*66,143+$i*66,1,1)

						MouseClick("left",1150+$j*66,143+$i*66+66,1,1)

						;sleep(1000)

							get_pixel_colour()

							$number_found = $number_found + 1

					EndIf

				EndIf

;;9

				if ($i < 5) Then



					if (ColorInBounds($grid[$i][$j] , $grid[$i + 1][$j],$tolerance) And ColorInBounds($grid[$i + 1][$j] , $grid[$i + 3][$j],$tolerance)) Then

						MouseClick("left",1150+$j*66,143+$i*66+66+66+66,1,1)

						MouseClick("left",1150+$j*66,143+$i*66+66+66,1,1)

						;sleep(1000)

							get_pixel_colour()

							$number_found = $number_found + 1

					EndIf

				EndIf

;;10

				if ($i + 2 < 8 And $j + 1 < 8) Then



					if (ColorInBounds($grid[$i + 1][$j] , $grid[$i + 2][$j],$tolerance) And ColorInBounds($grid[$i + 2][$j] , $grid[$i + 0][$j + 1],$tolerance)) Then

						MouseClick("left",1150+$j*66+66,143+$i*66,1,1)

						MouseClick("left",1150+$j*66,143+$i*66,1,1)

						;sleep(1000)

							get_pixel_colour()

							$number_found = $number_found + 1

					EndIf

				EndIf

;;11

				if ($i + 2 < 8 And $j + 1 < 8) Then



					if (ColorInBounds($grid[$i + 0][$j] , $grid[$i + 2][$j],$tolerance) And ColorInBounds($grid[$i + 2][$j] , $grid[$i + 1][$j + 1],$tolerance)) Then

						MouseClick("left",1150+$j*66+66,143+$i*66+66,1,1)

						MouseClick("left",1150+$j*66,143+$i*66+66,1,1)

						;sleep(1000)

							get_pixel_colour()

							$number_found = $number_found + 1

					EndIf

				EndIf

;;12

				if ($i + 2 < 8 And $j + 1 < 8) Then



					if (ColorInBounds($grid[$i + 0][$j] , $grid[$i + 1][$j],$tolerance) And ColorInBounds($grid[$i + 1][$j] , $grid[$i + 2][$j + 1],$tolerance)) Then

						MouseClick("left",1150+$j*66+66,143+$i*66+66+66,1,1)

						MouseClick("left",1150+$j*66,143+$i*66+66+66,1,1)

						;sleep(1000)

							get_pixel_colour()

							$number_found = $number_found + 1

					EndIf

				EndIf

;;13

				if ($i + 3 < 8) Then



					if (ColorInBounds($grid[$i][$j] , $grid[$i + 2][$j],$tolerance) And ColorInBounds($grid[$i + 2][$j] , $grid[$i + 3][$j],$tolerance)) Then

						MouseClick("left",1150+$j*66,143+$i*66,1,1)

						MouseClick("left",1150+$j*66,143+$i*66+66,1,1)

						;sleep(1000)

							get_pixel_colour()

							$number_found = $number_found + 1

					EndIf

				EndIf

;;14

				if ($i + 2 < 8 And $j + 1 < 8) Then



					if (ColorInBounds($grid[$i + 0][$j] , $grid[$i + 1][$j + 1],$tolerance) And ColorInBounds($grid[$i + 1][$j + 1] , $grid[$i + 2][$j + 1],$tolerance)) Then

						MouseClick("left",1150+$j*66,143+$i*66,1,1)

						MouseClick("left",1150+$j*66+66,143+$i*66,1,1)

						;sleep(1000)

							get_pixel_colour()

							$number_found = $number_found + 1

					EndIf

				EndIf

;;15

				if ($i + 2 < 8 And $j + 1 < 8) Then



					if (ColorInBounds($grid[$i + 0][$j + 1] , $grid[$i + 1][$j],$tolerance) And ColorInBounds($grid[$i + 1][$j] , $grid[$i + 2][$j + 1],$tolerance)) Then

						MouseClick("left",1150+$j*66,143+$i*66+66,1,1)

						MouseClick("left",1150+$j*66+66,143+$i*66+66,1,1)

						;sleep(1000)

							get_pixel_colour()

							$number_found = $number_found + 1

					EndIf

				EndIf

;;16

				if ($i + 2 < 8 And $j + 1 < 8) Then



					if (ColorInBounds($grid[$i + 0][$j + 1] , $grid[$i + 1][$j + 1],$tolerance) And ColorInBounds($grid[$i + 1][$j + 1] , $grid[$i + 2][$j + 0],$tolerance)) Then

						MouseClick("left",1150+$j*66,143+$i*66+66+66,1,1)

						MouseClick("left",1150+$j*66+66,143+$i*66+66+66,1,1)

						;sleep(1000)

							get_pixel_colour()

						$number_found = $number_found + 1

					EndIf

				EndIf

				$i = $i + 1



			WEnd

			$i = 0

			$j = $j + 1

		WEnd

		$j = 0

		$i = 0

EndFunc



Sleep(2000)

	get_pixel_colour()



Func execute()

	HotKeySet("2")

	solve()

	If $number_found > 0 Then

		$number_found = 0

		$tolerance = 20

	Else

		$tolerance = $tolerance + 5

	EndIf

	get_pixel_colour()

	HotKeySet("2", "execute")

EndFunc



While True

	Sleep(10)

WEnd



func Quit()

	exit

endfunc

 

Edited by spektor56
  • Like 1
Link to comment
Share on other sites

@damageinc86 I would hardly call RocketLauncher easy for anything. Not something you can just jump into without having already had an intimate knowledge of its use. Maybe if you were to volunteer for making a proper guide? I am sure the community as a whole would love you for it if they used it or not.


Man, this whole AHK thing sucks. I mean, I never used it personally because I use my steam controller so I always just have it close the emulator, whatever shortcut that may be for that specific emulator, bound to holding the select button for 5 seconds. LBs implementation of AHK was built in code and not a separate program? GPL is a very restrictive license and use of third party apps that use it should probably be avoided. Open source was not meant for this at all and if it causes projects like LB to have to remove features or even worse, have a chance of legal backlash everyone should just leave it at a bus station like a red headed step child. I am confident, though, that Jason is the right guy to find the perfect solution. Never fear Jason, I believe in you. :P

Link to comment
Share on other sites

Yeah telling people to use RocketLauncher for AHK functionality is most certainly not the right answer.

It's great that it is an option for people wanting to use it but many people including myself have zero interest in using it and it is why many of us use Launchbox in the first place over HyperSpin. And yes I have used it in the past and I truly despise it, yes it is powerful but it so needlessly complicated. It is the very definition of piss poor UI design in every way. Also before anyone says I just don't know how to use it or im not smart enough to learn how to use. I learned how to use it, I also learned how to use Photoshop and 3D animation software like 3D Studio Max and SoftImage so I am fully capable of learning complicated software.

I am fully confident in Jasons ability to come up with a solution that works for both him and us, even if that means having to wait a little while.

Link to comment
Share on other sites

Thanks guys, I think we'll end up re-integrating AutoHotkey, just with the standalone EXE version instead of the DLL. It's exceedingly stupid that it's perfectly legal to use it one way and not the other, but such are the terms of the GPL. I will tackle that tomorrow. I'd rather not make everyone have to re-make their scripts.

@WolfRamiO, that makes more sense. I'll take a look tomorrow. :)

  • Like 1
Link to comment
Share on other sites

1 hour ago, Jason Carr said:

Thanks guys, I think we'll end up re-integrating AutoHotkey, just with the standalone EXE version instead of the DLL. It's exceedingly stupid that it's perfectly legal to use it one way and not the other, but such are the terms of the GPL. I will tackle that tomorrow. I'd rather not make everyone have to re-make their scripts.

Thanks Jason. AHK integration is important to me also, hopefully with your next update everything AHK in launchbox is working again.

Link to comment
Share on other sites

Thanks for all of your hard work, Jason. Keep it up! :)

Sorry to go a little off topic but I was curious if there are any plans to implement a random game selector into Big Box in the future? If this is something that comes up a lot, I apologize. I just haven't been able to find too many mentions of it within the forums and the ticket doesn't seem to have much action on it on BitBucket. I only ask because I find myself using Big Box almost exclusively and I love it quite a bit. Unfortunately this feature only seems to be present in launchbox, not in bigbox and I'd just like to be able to jump around to random games haha. Thanks for your time, you're creating a wonderful application. Take care!

Edited by Magical Kingdom
  • Like 2
Link to comment
Share on other sites

8 hours ago, Magical Kingdom said:

Sorry to go a little off topic but I was curious if there are any plans to implement a random game selector into Big Box in the future? If this is something that comes up a lot, I apologize. I just haven't been able to find too many mentions of it within the forums and the ticket doesn't seem to have much action on it on BitBucket. I only ask because I find myself using Big Box almost exclusively and I love it quite a bit. Unfortunately this feature only seems to be present in launchbox, not in bigbox and I'd just like to be able to jump around to random games haha. Thanks for your time, you're creating a wonderful application. Take care!

Well, it's not a button to go to a random game, but you have Attract Mode, which jumps from game to game randomly. It's a pretty great feature if you let your system sit for a minute or two.

Edited by creamdonut
  • Like 2
Link to comment
Share on other sites

I just read about the autohotkey situation. Autohotkey is super valuable for me with LB. The main reason I use it is because LB doesn't provide a more global way to use before and after additional apps, like for Platform and Emulator level, as it is only there at the individual game level. If that was there, we could easily add our own autohotkey (or any other scripts and programs) scripts to do all stuff we need.

If you added that, I "think" the only thing I would be worried about is the controller automation for closing the emulator or startup app. I need that for some emulators or I can't exit them with my controller.

Please keep us updated on this topic and what we need to do to keep our existing <=6.12 LB installs working after an upgrade. I never took the plunge on the 7.0 betas because the changes are too big for me to want to risk my currently working setup and it's holiday time, so I am depending on things to work well and stable for guests that will come over. But when I upgrade I want to be confident I am not going to be lacking something I needed that was there before.

Thanks!

 

Edit: Note, even if @Jason Carr figures out a good way to restore the ahk tab in a way that is legal and doesn't require anyone to have to redo anything, I still want the before/after additional apps functionality at emulator and platform level :)  . Please add that capability if it's possible.

Edited by ckp
  • Like 1
Link to comment
Share on other sites

The only thing I was able to grasp about ahk was how to do the save states in Rocketlauncher's PAUSE menu,...which also can show manuals btw.  I went looking for how to do ahk stuff and it was overwhelming because i'm not super tech-savvy.  Rocketlauncher took some time, but for keymapping and controls it was just a matter of getting joy2key, setting it as active in the system you are on, and then either making a system-wide profile, or a game-specific profile.  After some poking around, all the options were there for me to find relating to keymapping.  I don't know about other stuff being done with ahk, but I was responding to igotdvds mame control and game manual post specifically.

Edited by damageinc86
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...