jayjay
Members-
Posts
385 -
Joined
-
Last visited
Content Type
Profiles
Forums
Articles
Downloads
Gallery
Blogs
Everything posted by jayjay
-
That's fair enough dude. I was just messing with ya. I was thinking, using @ckp example, something crude like: f1:: { Run, %A_AHKPath% "C:\temp\dostuff.ahk" send {esc down}{esc up} } But that's cool you got it sorted. When you create some awesome scripts dont forget to share with us in the autohotkeys thread.
-
Yeah that's what my post above does, uses LB's ahk... well I think it does... works without ahk installed anyway. Better for making it portable right.. for when we go selling hard drives full of games and BB right?... I mean for when we take our drives round our mates house.
-
It wouldn't work for me with ahk installed or not. But then again my file association for .ahk is with scite4autohotkey. But anyway I think there's enough here for @thedevilsjester to create something. "Two decades of development"... should be jedi mind tricking this shit.
-
Not sure if it will work but can try: $joy10:: ; my start button { keywait, joy10, t5 if errorlevel <> 0 { Process, Close, {{{StartupEXE}}} ;closes emulator } }
- 15 replies
-
- 1
-
- auto hot key
- ahk
-
(and 1 more)
Tagged with:
-
Could you explain how this works because I cant seem to get it to work. Am getting "Cant find script" error. Please use simple steps for a simple mind I figured out, trying your method that LB uses Launchbox\Metadata\Temp as temp directory. So placing do stuff.ahk script there works using : SetWorkingDir %A_ScriptDir% run, Autohotkey.exe "do stuff.ahk" No need to copy autohotkey.exe. Just need to place do stuff.ahk inside Launchbox\Metadata\Temp. You are one hard dude to please lol. Could you not change the esc key in @ckp example? Or you could... Create a txt file at Launchbox\Metadata\Temp Name it "do stuff.ahk", right click and edit in notepad #SingleInstance, Force #Persistent loop { Process, Exist, retroarch.exe pid1 := ErrorLevel If (!pid1) { continue } else { Goto Next } } Next: SetTimer, ProcessCheckTimer, 1000 Return ProcessCheckTimer: Process, Exist, retroarch.exe pid1 := ErrorLevel If (!pid1) { Send !{Space} ExitApp } Return This script uses retroarch as an example, in the script change retroarch.exe to whatever. It will check every 1 second for the process retroarch.exe, when it doesn't exist (when retroarch is closed) it sends !{Space} then exits the script. If 1 second is to fast change the SetTimer, ProcessCheckTimer, 1000 to SetTimer, ProcessCheckTimer, 2000 for 2 seconds and so on. Or if 1 second is to slow use a loop. #SingleInstance, Force #Persistent loop { Process, Exist, retroarch.exe pid1 := ErrorLevel If (!pid1) { continue } else { Goto Next } } Next: loop { Process, Exist, retroarch.exe pid1 := ErrorLevel If (!pid1) { Send !{Space} ExitApp } } Return In LB emulator tab write: SetWorkingDir %A_ScriptDir% run, Autohotkey.exe "do stuff.ahk" This will run along side the emulator but resources are minimal and you wont encounter the race condition. But what it is doing is:
-
Could I request a psn platform logo. Maybe something like this: Please change the black writing as it wont show on my BB. I did try photoshop myself but saying I suck at it is an understatement. Thanks.
-
Thats sweet @ckp.
-
What I like about this suggestion is its usefulness with retroarch. If im remembering correctly using the variable %3% captures retroarch core. Using an ifinstring or maybe a if variable %3% equals bsnes.dll etc - do stuff, basically creating a per system script for retroarch. Cuts the need for multiple scripts acting as emulators. Is a cool solution. Although I haven't really found many uses for it except displaying a controller image.
-
Im sure this will work, you will have to try, not sure its what your after but anyway... As an example... Make a new txt file and name it "my script.ahk". (do your stuff inside this file, use right click and edit to edit the script) In LB directory, go to Launchbox\Autohotkey. COPY Autohotkey.exe and rename it to "my script.exe". Place both "my script.ahk" and "my script.exe" in Launchbox\Autohotkey directory. Now in LB go to emulator ahk script tab and write: SetWorkingDir %A_ScriptDir% run "my script.exe" This will run the script outside LB without the need to install 3rd party stuff, making it portable. But remember LB wont kill the script so you will have to script that in your self.
-
As @ckp says posting a script would help but yeah LB kills the script on game/emu exit. What would be the problem with running a script outside LB so the script can finish before its killed by LB?
-
I dont know if you have copy and pasted the script wrong. You can find a copy of the original script Here. The problem with this script is this line: SetTimer, MouseWheel, %WheelDelay% Your script doesn't have the label MouseWheel. Either delete that line or change it to: ;SetTimer, MouseWheel, %WheelDelay% Then it "should" work... maybe.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
That makes sense. Downloaded logo's fine. Thanks.
-
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.
-
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.