Playtool for ToEE 800x600 resolution

Discussion in 'General Modification' started by Zoltec, Nov 5, 2013.

Remove all ads!
  1. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    Heya folks, I've created a borderless ToEE using the power of 'Ahk script'. I also added a feature to lock the cursor on ToEE window, Enjoy!

    PS. This is only for 800x600 resolution. If you want to make one for higher resolutions, then you can compile it with diff. setup using the source code below.

    Important

    You need to set 'window mode' on TFE-X Front-End and choose 800x600 resolution to work.

    Source code

    Code:
    #Persistent
    
    	WinWait toee.exe ahk_class TIGClass								
    		hwnda:=WinExist()									
    		ClipMouse(hwnda)									
    		
    			OnExit, Exit										
    			SetTimer, Watch, 1								
    			return									
    			Exit:									
    			ClipMouse(hwnda,false)													
    
    			ExitApp
    
    
    			ClipMouse(hwnda,	Param=true)
    			{
    				If (Param)
    				{
    					WinSet, Style, -0xC00000,toee.exe 						
        					WinMove, toee.exe, , , , 800, 600			
    					WinGetPos, XPos, YPos, Width, Height, ahk_id %hwnda%
    					ClipCursor(True,XPos,YPos,XPos+Width,YPos+Height)
    				}
    				else
    					ClipCursor(false)
    			}
    
    			Watch:
    				If !WinExist("ahk_id " . hwnda)								
    				ExitApp
    
    				else if GetKeyState("INS")								
    				ClipMouse(hwnda)
    
    				else if GetKeyState("DEL")								
    				ClipMouse(hwnda,	false)
    
    				else if GetKeyState("NumpadAdd")
    				WinRestore, toee.exe, , ,
    
    				else if GetKeyState("NumpadSub")
    				WinMinimize, toee.exe, , ,
    
    				else
    			return
    
    			ClipCursor(Confine,	xloc1=0,	yloc1=0,	xloc2=0,	yloc2=0	)
    			{
    				If !Confine								
    				return DllCall("ClipCursor")
    				
    				VarSetCapacity(RecF,	16,	0)
    				NumPut(xloc1,	RecF,	0,	"UInt")
    				NumPut(yloc1,	RecF,	4,	"UInt")
    				NumPut(xloc2,	RecF,	8,	"UInt")
    				NumPut(yloc2,	RecF,	12,	"UInt")
    				return DllCall("ClipCursor", 	UInt,	&RecF)
    			}
    
    Keys

    Restore Window(NumpadAdd or '+')
    Minimize Window(NumpadSub or '-')
    Lock cursor on screen(Insert key)
    Free cursor on screen(Delete key)

    Executable

    Unfortunately this is only for windows, if you want to convert this on linux then use 'Autokey'.

    Additional Info

    I may add the original ToEE cursor if I had the time.

    Screenshot

    Image
     

    Attached Files:

    Last edited: Nov 5, 2013
Our Host!