Jump to content
LaunchBox Community Forums

jayjay

Members
  • Content count

    127
  • Joined

  • Last visited

Community Reputation

38 Excellent

About jayjay

  • Rank
    32-Bit GPU
  1. Auto Hotkey Scripts

    JoyMultiplier = 0.30 JoyThreshold = 9 InvertRAxis := false ButtonLeft = 1 ButtonRight = 2 ButtonMiddle = 3 JoystickNumber = 1 JoystickPrefix = %JoystickNumber%Joy Hotkey, %JoystickPrefix%%ButtonLeft%, ButtonLeft Hotkey, %JoystickPrefix%%ButtonRight%, ButtonRight Hotkey, %JoystickPrefix%%ButtonMiddle%, ButtonMiddle JoyThresholdUpper := 50 + JoyThreshold JoyThresholdLower := 50 - JoyThreshold if InvertRAxis RAxisMultiplier = -1 else RAxisMultiplier = 1 SetTimer, WatchJoystick, 10 GetKeyState, JoyInfo, %JoystickNumber%JoyInfo IfInString, JoyInfo, P return ButtonLeft: SetMouseDelay, -1 MouseClick, left,,, 1, 0, D SetTimer, WaitForLeftButtonUp, 10 return ButtonRight: SetMouseDelay, -1 MouseClick, right,,, 1, 0, D SetTimer, WaitForRightButtonUp, 10 return ButtonMiddle: SetMouseDelay, -1 MouseClick, middle,,, 1, 0, D SetTimer, WaitForMiddleButtonUp, 10 return WaitForLeftButtonUp: if GetKeyState(JoystickPrefix . ButtonLeft) return SetTimer, WaitForLeftButtonUp, off SetMouseDelay, -1 MouseClick, left,,, 1, 0, U return WaitForRightButtonUp: if GetKeyState(JoystickPrefix . ButtonRight) return SetTimer, WaitForRightButtonUp, off MouseClick, right,,, 1, 0, U ; Release the mouse button. return WaitForMiddleButtonUp: if GetKeyState(JoystickPrefix . ButtonMiddle) return SetTimer, WaitForMiddleButtonUp, off MouseClick, middle,,, 1, 0, U ; Release the mouse button. return WatchJoystick: MouseNeedsToBeMoved := false ; Set default. SetFormat, float, 03 GetKeyState, joyx, %JoystickNumber%JoyX GetKeyState, joyy, %JoystickNumber%JoyY if joyx > %JoyThresholdUpper% { MouseNeedsToBeMoved := true DeltaX := joyx - JoyThresholdUpper } else if joyx < %JoyThresholdLower% { MouseNeedsToBeMoved := true DeltaX := joyx - JoyThresholdLower } else DeltaX = 0 if joyy > %JoyThresholdUpper% { MouseNeedsToBeMoved := true DeltaY := joyy - JoyThresholdUpper } else if joyy < %JoyThresholdLower% { MouseNeedsToBeMoved := true DeltaY := joyy - JoyThresholdLower } else DeltaY = 0 if MouseNeedsToBeMoved { SetMouseDelay, -1 ; Makes movement smoother. MouseMove, DeltaX * JoyMultiplier, DeltaY * JoyMultiplier * RAxisMultiplier, 0, R } return This is the same script as the one I posted above. Except with no dpad or mouse wheel, only has the mouse pointer and 3 buttons. Also uses the left analogue not right. If you need to change anything compare this script with the one above. I tested it and it works through LB.
  2. Auto Hotkey Scripts

    I use this to control mouse with 360 controller. Not my work. Cant remember where I got it, might be in the docs. Uses right analogue to control mouse: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. SetTimer, WatchPOV, 5 ; Using a Joystick as a Mouse ; http://www.autohotkey.com ; This script converts a joystick into a three-button mouse. It allows each ; button to drag just like a mouse button and it uses virtually no CPU time. ; Also, it will move the cursor faster depending on how far you push the joystick ; from center. You can personalize various settings at the top of the script. ; Increase the following value to make the mouse cursor move faster: JoyMultiplier = 0.30 ; Decrease the following value to require less joystick displacement-from-center ; to start moving the mouse. However, you may need to calibrate your joystick ; -- ensuring it's properly centered -- to avoid cursor drift. A perfectly tight ; and centered joystick could use a value of 1: JoyThreshold = 9 ; Change the following to true to invert the Y-axis, which causes the mouse to ; move vertically in the direction opposite the stick: InvertRAxis := false ; Change these values to use joystick button numbers other than 1, 2, and 3 for ; the left, right, and middle mouse buttons. Available numbers are 1 through 32. ; Use the Joystick Test Script to find out your joystick's numbers more easily. ButtonLeft = 1 ButtonRight = 2 ButtonMiddle = 3 ; If your joystick has a POV control, you can use it as a mouse wheel. The ; following value is the number of milliseconds between turns of the wheel. ; Decrease it to have the wheel turn faster: WheelDelay = 250 ; If your system has more than one joystick, increase this value to use a joystick ; other than the first: JoystickNumber = 1 ; END OF CONFIG SECTION -- Don't change anything below this point unless you want ; to alter the basic nature of the script. JoystickPrefix = %JoystickNumber%Joy Hotkey, %JoystickPrefix%%ButtonLeft%, ButtonLeft Hotkey, %JoystickPrefix%%ButtonRight%, ButtonRight Hotkey, %JoystickPrefix%%ButtonMiddle%, ButtonMiddle ; Calculate the axis displacements that are needed to start moving the cursor: JoyThresholdUpper := 50 + JoyThreshold JoyThresholdLower := 50 - JoyThreshold if InvertRAxis RAxisMultiplier = -1 else RAxisMultiplier = 1 SetTimer, WatchJoystick, 10 ; Monitor the movement of the joystick. GetKeyState, JoyInfo, %JoystickNumber%JoyInfo IfInString, JoyInfo, P ; Joystick has POV control, so use it as a mouse wheel. SetTimer, MouseWheel, %WheelDelay% return ; End of auto-execute section. ; The subroutines below do not use KeyWait because that would sometimes trap the ; WatchJoystick quasi-thread beneath the wait-for-button-up thread, which would ; effectively prevent mouse-dragging with the joystick. ButtonLeft: SetMouseDelay, -1 ; Makes movement smoother. MouseClick, left,,, 1, 0, D ; Hold down the left mouse button. SetTimer, WaitForLeftButtonUp, 10 return ButtonRight: SetMouseDelay, -1 ; Makes movement smoother. MouseClick, right,,, 1, 0, D ; Hold down the right mouse button. SetTimer, WaitForRightButtonUp, 10 return ButtonMiddle: SetMouseDelay, -1 ; Makes movement smoother. MouseClick, middle,,, 1, 0, D ; Hold down the right mouse button. SetTimer, WaitForMiddleButtonUp, 10 return WaitForLeftButtonUp: if GetKeyState(JoystickPrefix . ButtonLeft) return ; The button is still, down, so keep waiting. ; Otherwise, the button has been released. SetTimer, WaitForLeftButtonUp, off SetMouseDelay, -1 ; Makes movement smoother. MouseClick, left,,, 1, 0, U ; Release the mouse button. return WaitForRightButtonUp: if GetKeyState(JoystickPrefix . ButtonRight) return ; The button is still, down, so keep waiting. ; Otherwise, the button has been released. SetTimer, WaitForRightButtonUp, off MouseClick, right,,, 1, 0, U ; Release the mouse button. return WaitForMiddleButtonUp: if GetKeyState(JoystickPrefix . ButtonMiddle) return ; The button is still, down, so keep waiting. ; Otherwise, the button has been released. SetTimer, WaitForMiddleButtonUp, off MouseClick, middle,,, 1, 0, U ; Release the mouse button. return WatchJoystick: MouseNeedsToBeMoved := false ; Set default. SetFormat, float, 03 GetKeyState, joyu, %JoystickNumber%JoyU GetKeyState, joyr, %JoystickNumber%JoyR if joyu > %JoyThresholdUpper% { MouseNeedsToBeMoved := true DeltaU := joyu - JoyThresholdUpper } else if joyu < %JoyThresholdLower% { MouseNeedsToBeMoved := true DeltaU := joyu - JoyThresholdLower } else DeltaU = 0 if joyr > %JoyThresholdUpper% { MouseNeedsToBeMoved := true DeltaR := joyr - JoyThresholdUpper } else if joyr < %JoyThresholdLower% { MouseNeedsToBeMoved := true DeltaR := joyr - JoyThresholdLower } else DeltaR = 0 if MouseNeedsToBeMoved { SetMouseDelay, -1 ; Makes movement smoother. MouseMove, DeltaU * JoyMultiplier, DeltaR * JoyMultiplier * RAxisMultiplier, 0, R } return MouseWheel: GetKeyState, JoyPOV, %JoystickNumber%JoyPOV if JoyPOV = -1 ; No angle. return if (JoyPOV > 31500 or JoyPOV < 4500) ; Forward Send {WheelUp} else if JoyPOV between 13500 and 22500 ; Back Send {WheelDown} return WatchPOV: GetKeyState, POV, JoyPOV ; Get position of the POV control. KeyToHoldDownPrev = %KeyToHoldDown% ; Prev now holds the key that was down before (if any). ; Some joysticks might have a smooth/continous POV rather than one in fixed increments. ; To support them all, use a range: if POV < 0 ; No angle to report KeyToHoldDown = else if POV > 31500 ; 315 to 360 degrees: Forward KeyToHoldDown = Up else if POV between 0 and 4500 ; 0 to 45 degrees: Forward KeyToHoldDown = Up else if POV between 4501 and 13500 ; 45 to 135 degrees: Right KeyToHoldDown = Right else if POV between 13501 and 22500 ; 135 to 225 degrees: Down KeyToHoldDown = Down else ; 225 to 315 degrees: Left KeyToHoldDown = Left if KeyToHoldDown = %KeyToHoldDownPrev% ; The correct key is already down (or no key is needed). return ; Do nothing. ; Otherwise, release the previous key and press down the new key: SetKeyDelay -1 ; Avoid delays between keystrokes. ;traytip,,%keyToHoldDown%,1 if KeyToHoldDownPrev ; There is a previous key to release. Send, {%KeyToHoldDownPrev% up} ; Release it. if KeyToHoldDown ; There is a key to press down. Send, {%KeyToHoldDown% down} ; Press it down. return It also does other stuff like dpad to mouse wheel etc. I was gonna post the script I use up, it uses the left analogue but I cant find it. To change it to left analogue you would need to change... joyr = joyx deltaR = deltaX joyu = joyy deltaU = deltaY or maybe its... joyr = joyy etc etc Cant quite remember. You will have to have a play with it. Also not sure if it will work as intended through LB.
  3. Auto Hotkey Scripts

    Sometimes I would come across something in the docs that wouldn't work correctly. I found that googling "autohotkey blah blah blah" became more useful than the docs, probably more me being crap than anything else. But that links pov section was the final piece I needed to ditch xpadder and map everything with ahk for my 360 controller only set up. I miss playing with ahk more than missing gaming or LB (which doesn't get enough love anymore). Anyway never mind the off topic. Its 9.20pm, way past my bedtime. Growing up, having a job and responsibility is the worse human invention ever created. Take it easy mate.
  4. Auto Hotkey Scripts

    In the test script you posted it says... ; July 6, 2005: Added auto-detection of joystick number. ; May 8, 2005 : Fixed: JoyAxes is no longer queried as a means of ; detecting whether the joystick is connected. Some joysticks are ; gamepads and don't have even a single axis. It may be a little out dated now. But im not sure on that. Dont know if its been updated since 2005.
  5. Auto Hotkey Scripts

    Iv got the wired 360 controller. Dont know if that will make a difference, it shouldn't do....right?. But ahk wont recognise the home button being held down for X amount of seconds. And if I remember correctly wouldnt play well with key wait commands. But still useful to have the extra button.
  6. Auto Hotkey Scripts

    Xbox 360 home button is vk07sc000 in ahk. Im lead to believe its also the same for XB1 controller. But haven't tested myself... If the first script that @Zombeaver posted doesnt show anything try key history. #InstallKeybdHook esc:: keyhistory return run the script press home button a few times press escape track down the button press on the screen that pops up. Other than that I cant help. Dont have time to play with ahk any more.
  7. Unless xbox 360 disk ripping has changed over the years, dont you need a samsung-SH-something-something dvd rom drive (cant remember the exact name) flashed with modded firmware to rip the disks. Do you have one? I used to have one, about 10 years ago now. Those where the days.... having a flashed 360 drive, cheap DL disks that wouldn't read without crashing and an open 360 with a fan blowing down on top of it to keep it from over heating. You prob better off trying to "acquire" the game for pc instead of 360.
  8. lol. Tip 11: You dont get rich by giving refunds. When your customers complain that their "3 day old" seagate drive has broken down. Tell them to email the complaints department, JasonCarr@Launchbox.com. Close ebay account and set up a new one.
  9. So... you have just completed your 10th platform in LB. All the meta data has been added. All video's and images are complete. Up next your "arcade" platform and OMFG... thousands of games, missing images, missing video's and missing a **** load of meta data. Here's some pro tips to complete this in double quick time. Tip 1: If it looks Chinese, delete it. This also applies for titles you cannot pronounce. Tip 2: Ratings: Open your arcade.xml in notepad. Launchbox\Data\Platform\Arcade.xml Use the replace all feature in notepad. Replace = <Rating /> Replace with = <Rating>E - Everyone</Rating> If kids are playing games they shouldnt, who cares. Their parents are probably passed out on the floor pissed anyway. Ratings done. Tip 3: Region: In notepad use replace all feature. Replace = <Region/> Replace with = <Region>World</Region> Since the introduction of the world wide web, anyone can download mame. Its available world wide. Region done. Tip 4: Genre: If the game title includes the word mahjong or mahjong or even if its mahjong, then its safe to say its a puzzle game, otherwise... its an action game. Genre done. Tip 5: This one is quite simple... Replace = <Date /> Replace with = <Date>1990-01-01</Date> Done Tip 6: Notes: If your missing game notes... Replace = <Notes /> Replace with = <Notes>Made for the arcade</Notes> Notes done Tip 7: Developer and publisher: Now im quite proud of this one: fileselectfile, xml dev := [] pub := [] data := [] xml2 = %xml% fileread, xml2, arcade.xml loop, parse, xml, `r, `n { IfInString, A_LoopField, <Publisher { IfInString, a_loopfield, <Publisher /> { pub.insert("<Developer />") } else { stringreplace, var, a_loopfield,%A_Space%%A_Space%%A_Space%%A_Space%<Publisher>, stringreplace, var2, var, </Publisher>, pub.insert(var2) } } } aaa = 0 loop, parse, xml, `r, `n { IfInString, A_loopfield, </Developer> { aaa += 1 dev.insert(a_loopfield) } IfInString, A_loopfield, <Developer /> { aaa += 1 pubvar := pub[aaa] ifinstring, pubvar, <Developer /> { dev.insert(" <Developer>Some Dude</Developer>") } else { dev.insert(" <Developer>" pubvar "</Developer>") } } } bbb = 0 loop, parse, xml, `r, `n { ifinstring, a_loopfield, <Developer { bbb += 1 } ifinstring, A_LoopField, <Developer /> { ccc := dev[bbb] data.insert(ccc) } else { data.insert(a_loopfield) } } file2 = a.txt file := fileopen(file2, "w") for i, value in data { file.write(value "`r`n") } Using this script will replace all empty developer fields with the matching publisher fields. If the publisher field is empty it will enter "Some Dude" as the developer. I take no responsibility if this f**ks your stuff up, Which it will. Done Tip 8: Missing images and video's. Quite simply... Delete it. Done And finally... Tip 9: Dont forget 90% of the people you know are PS4 owning hillbillies and probably cant read anyway. And there you have it. Adding your arcade collection doesn't have to take the rest of your life. It cant take 10 years instead. And dont forget to upload you data to the Launchbox database to share with everyone else. Creating these tips has taken up a considerable amount of time. I do take donations... I think im losing it, lol.
  10. Auto Hotkey Scripts

    Edit: Iv just tested the following: I import my windows games as roms. So under the games edit options there is the emulation tab. I dont know if you get that tab if games have been imported as windows games or steam games. But if it is there, you can bulk edit an emulator for windows games. Also just to note. In LB, in the edit options of a game. Whatever is in the path under the launcher tab can be passed to a script. As an example, my james bond blood stone path is e:\xbox 360 games\james bond blood stone\bond.exe. In a script, using the variable %1% will capture this path. So what you could do... hopefully I can explain this properly. Create a controller image named bond.png. (needs to be named the same as the .exe, so for me I would have bond.exe and bond.png) Create this script ImageDir = T:\Launchbox\Images\Controller ;directory with controller images Var1 = %1% SplitPath, Var1, , , , Filename IfExist, %ImageDir%\%Filename%.png { Gui, -Caption +ToolWindow Gui, Margin, 0, 0 Gui, Add, Picture, , %ImageDir%\%Filename%.png Gui, Show KeyWait, Joy1, d KeyWait, Joy1 ;change both joy1 to whatever you want Run, %1% Sleep, 1000 Exitapp } else { Run, %1% Exitapp } Bulk edit windows games to use this as an emulator. The idea is, it takes the .exe filename without the extension and looks in your image directory for a png with the same filename as the .exe. If your .exe has a funny name. You could create a shortcut. rename it whatever. Point LB launcher path to the shortcut and name the png the same as the shortcut. And again its prob best to wait for jason to do something lol.
  11. Auto Hotkey Scripts

    I haven't started with dos games yet and prob not going to for a while yet. I dont know how they work. Still got so much other stuff to do. Had a pc melt down, so yeah, sucks... Iv never used steam so dont know how it works. Im guessing you just click a .url? If so its going to be like windows games. Gui, -Caption +ToolWindow Gui, Margin, 0, 0 Gui, Add, Picture, , T:\Launchbox\Images\Controller\Snes Controller.png ;change to image path Gui, Show KeyWait, Joy1, d KeyWait, Joy1 ;change both joy1 to whatever you want Run, path-to-game-exe-or-url-etc Sleep, 1000 Exitapp Change path to image and path-to-game-exe-or-url-etc. Then in LB you would have to change the path in the game launcher tab to the new script. But you would have to do 1 script per game. Depending on how many games you have, could be a bit of a mission. Might be worth waiting for jason to come up with something at some point.
  12. Downloading images

    That makes sense. Downloaded logo's fine. Thanks.
  13. Downloading images

    I was searching for a gameboy advance clear logo pack here (missing about 200 ) and I came across this: https://forums.launchbox-app.com/topic/38957-clear-logos-scraping-issue/?tab=comments#comment-243769 I created a thread about this almost a year ago lol. Almost the same wording as well. Unless it was fixed since my last posts above, the way to download the images is to select "get information from launchbox" and also "force replace meta and media". Might not be a good idea to do it this way if meta and media have been added manually.
  14. Downloading images

    Yeah its only gba. Nds and sega cd are downloading fine. Maybe its something iv done. I have just used the import wizard to download gba and they downloaded fine. None missing by the looks of it. Edit: oh ok, not something iv done then. Makes a nice change.
  15. Downloading images

    Yeah. Im working on game boy advanced. I removed all my clear logo images from GBA directory and tried again but same thing happens, doesnt find anything. I also tried deleting the system, importing them again. I DIDN'T try to download the images through the import wizard. I tried highlighting all and use download meta and media under the tools tab. Dont suppose you can try it to see if its just me?
×