Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

My AHK configuration doesn't work while launching applications from XBMC


  • Please log in to reply
No replies to this topic
djm1319
  • Members
  • 34 posts
  • Last active: Oct 02 2015 03:21 PM
  • Joined: 04 Apr 2014

I've just started using Windows 10 and I'm receiving some problems with using my AHK config while launching applications from XBMC. I'm not sure what to do to fix this.

 

Here's my config. It works perfectly fine without launching things from xbmc:

#NoEnv
#SingleInstance Force
Process, Priority, , High
; #InstallKeybdHook
; #InstallMouseHook
; #UseHook
; SendMode Input
; SetWorkingDir ....
; etc

; Easy Window Dragging:
; Note: You can optionally release Capslock or the middle mouse button after
; pressing down the mouse button rather than holding it down the whole time.
; This script requires v1.0.25+.
~MButton & LButton::
CapsLock & LButton::
CoordMode, Mouse  ; Switch to screen/absolute coordinates.
MouseGetPos, EWD_MouseStartX, EWD_MouseStartY, EWD_MouseWin
WinGetPos, EWD_OriginalPosX, EWD_OriginalPosY,,, ahk_id %EWD_MouseWin%
WinGet, EWD_WinState, MinMax, ahk_id %EWD_MouseWin% 
if EWD_WinState = 0  ; Only if the window isn't maximized 
    SetTimer, EWD_WatchMouse, 10 ; Track the mouse as the user drags it.
return

EWD_WatchMouse:
GetKeyState, EWD_LButtonState, LButton, P
if EWD_LButtonState = U  ; Button has been released, so drag is complete.
{
    SetTimer, EWD_WatchMouse, off
    return
}
GetKeyState, EWD_EscapeState, Escape, P
if EWD_EscapeState = D  ; Escape has been pressed, so drag is cancelled.
{
    SetTimer, EWD_WatchMouse, off
    WinMove, ahk_id %EWD_MouseWin%,, %EWD_OriginalPosX%, %EWD_OriginalPosY%
    return
}
; Otherwise, reposition the window to match the change in mouse coordinates
; caused by the user having dragged the mouse:
CoordMode, Mouse
MouseGetPos, EWD_MouseX, EWD_MouseY
WinGetPos, EWD_WinX, EWD_WinY,,, ahk_id %EWD_MouseWin%
SetWinDelay, -1   ; Makes the below move faster/smoother.
WinMove, ahk_id %EWD_MouseWin%,, EWD_WinX + EWD_MouseX - EWD_MouseStartX, EWD_WinY + EWD_MouseY - EWD_MouseStartY
EWD_MouseStartX := EWD_MouseX  ; Update for the next timer-call to this subroutine.
EWD_MouseStartY := EWD_MouseY
return

; Mame:

#if WinExist("ahk_class MAME")
SC04F & SC051::
  Process, Close, mame64.exe
  Return

 ; PS1:

#if WinExist("ePSXe - Enhanced PSX emulator")
SC002 & SC004::Send {F5}
SC04F & SC051::
  Process, Close, ePSXe.exe
  Return

; Dreamcast:

#if WinExist("ahk_class ConsoleWindowClass")
SC04F & SC051::
  Process, Close, nullDC_Win32_Release-NoTrace.exe 
  Return

; Sega AM2:

#if WinExist("ahk_class MYWIN")
SC04F & SC051::
  Process, Close, emulator_multicpu.EXE *32
  Return

; PS2:

#if WinExist("ahk_class wxWindowClassNR")
SC04F & SC051::
  Process, Close, pcsx2-r5875.exe
  Return

; Gamecube/Wii:

#if WinExist("Dolphin 4.0-5398")
SC04F & SC051::
  Process, Close, Dolphin.exe
  Return
  
#if