Quickstart Elma

Advertise your levels, contests, sites etc.

Moderator: Moporators

Post Reply
User avatar
trew
38mins club
Posts: 504
Joined: 2 Dec 2009, 00:04

Quickstart Elma

Post by trew »

I wrote a script for autohotkey that open or closes windowed elma when double-tapping Right Control.

Code: Select all

; Double-Tap RControl to Open/Close Elma

ElmaFolder = C:\Path\To\Elma\Folder
WinElmaName = Elasto Mania
ElmaFile = eol.exe
WinDXWindowerName = DirectX Windower v1.88
DXWindowerFile = D3DWindower.exe

~RControl::
if (A_PriorHotkey <> "~RControl" or A_TimeSincePriorHotkey > 400)
{
    ; Too much time between presses, so this isn't a double-press.
    KeyWait, RControl
    return
}

IfWinNotExist, %WinElmaName% 
{
    IfWinNotExist, %WinDXWindowerName% 
        Run, %DXWindowerFile%, %ElmaFolder%
    else
        WinActivate
    WinWaitActive, %WinDXWindowerName%
    MouseClick, left, 30, 70, 2
    Process Wait, %ElmaFile%, 5
    WinWaitActive, %WinElmaName%
    Send {Space down} ; Bypass splashscreen
    Sleep, 10
    Send {Space up}
    Sleep, 1200 ; Usually works around 1000 - 1500ms
    Send {Enter down} ; Select first player
    Sleep, 10
    Send {Enter up}
    return
} else {
    WinActivate
    WinWaitActive, %WinElmaName%
    Loop 5 {
        Send {Esc down} 
        Sleep, 10
        Send {Esc up}
        Sleep, 10
    }
    Send {Enter down}
    Sleep, 10
    Send {Enter up}
    Sleep, 300
    Send {Space down}
    Sleep, 10
    Send {Space up}
    IfWinExist, %WinDXWindowerName%
        WinKill
    return
}
Figured someone else might find it useful. You could of course modify it to access whatever key combination you want. I have mine starting on boot.

Edit: changed the closing part of the script to exit normally instead of terminating the eol.exe process.
Image
Fucking broken image every month
User avatar
danitah
Kuski
Posts: 818
Joined: 24 May 2004, 16:22
Contact:

Re: Quickstart Elma

Post by danitah »

Cool i might use it :)
User avatar
Mats
39mins club
Posts: 1183
Joined: 5 Apr 2007, 12:30
Location: Norway, Sandnes

Re: Quickstart Elma

Post by Mats »

whats the point with windowed elma, win8 issue?
TT:39.59.86|| AvgTT:41.49.24 || Multi TT:27:43:82 || Team [TR]
User avatar
Igge
38mins club
Posts: 6393
Joined: 7 Apr 2007, 12:15
Location: Stockholm, Sweden

Re: Quickstart Elma

Post by Igge »

I play with windowed just because it's nice.
John: lol hittade ett popcorn i naveln
(19:52:06) (@Madnezz) The Golden Apple Award goes to.....
(19:52:36) (@Madnezz) ib9814.lev by igge!!!
Zweq wrote:99.9999% of nabs haven't even opened the book yet and most of those that have are still on the first pages
User avatar
danitah
Kuski
Posts: 818
Joined: 24 May 2004, 16:22
Contact:

Re: Quickstart Elma

Post by danitah »

Mostly so can easily switch back and forth between mirc and elma (doesnt take 3-5s to change from and to elma)
User avatar
trew
38mins club
Posts: 504
Joined: 2 Dec 2009, 00:04

Re: Quickstart Elma

Post by trew »

Yea windowed makes alt-tabbing easier.
Image
Fucking broken image every month
User avatar
Tigro
Kuski
Posts: 2198
Joined: 6 Jan 2009, 13:08
Location: Srdcom vychodniar
Contact:

Re: Quickstart Elma

Post by Tigro »

windowed also prevents broadcast from freezing when alttabbed, correct me if i am wronk.
Image
User avatar
Mawane
Kuski
Posts: 3299
Joined: 15 Apr 2007, 01:05
Team: SV
Contact:

Re: Quickstart Elma

Post by Mawane »

wronk! lol nevermind
Website || TT:41:45:64 || Team Image
Image[url=steam://friends/add/76561198025490048]Image[/url]
User avatar
iCS
Kuski
Posts: 352
Joined: 31 Dec 2015, 11:36
Location: Hungary
Contact:

Re: Quickstart Elma

Post by iCS »

trew wrote: 3 Mar 2014, 16:17 I wrote a script for autohotkey that open or closes windowed elma when double-tapping Right Control.

Code: Select all

; Double-Tap RControl to Open/Close Elma

ElmaFolder = C:\Path\To\Elma\Folder
WinElmaName = Elasto Mania
ElmaFile = eol.exe
WinDXWindowerName = DirectX Windower v1.88
DXWindowerFile = D3DWindower.exe

~RControl::
if (A_PriorHotkey <> "~RControl" or A_TimeSincePriorHotkey > 400)
{
    ; Too much time between presses, so this isn't a double-press.
    KeyWait, RControl
    return
}

IfWinNotExist, %WinElmaName% 
{
    IfWinNotExist, %WinDXWindowerName% 
        Run, %DXWindowerFile%, %ElmaFolder%
    else
        WinActivate
    WinWaitActive, %WinDXWindowerName%
    MouseClick, left, 30, 70, 2
    Process Wait, %ElmaFile%, 5
    WinWaitActive, %WinElmaName%
    Send {Space down} ; Bypass splashscreen
    Sleep, 10
    Send {Space up}
    Sleep, 1200 ; Usually works around 1000 - 1500ms
    Send {Enter down} ; Select first player
    Sleep, 10
    Send {Enter up}
    return
} else {
    WinActivate
    WinWaitActive, %WinElmaName%
    Loop 5 {
        Send {Esc down} 
        Sleep, 10
        Send {Esc up}
        Sleep, 10
    }
    Send {Enter down}
    Sleep, 10
    Send {Enter up}
    Sleep, 300
    Send {Space down}
    Sleep, 10
    Send {Space up}
    IfWinExist, %WinDXWindowerName%
        WinKill
    return
}
Figured someone else might find it useful. You could of course modify it to access whatever key combination you want. I have mine starting on boot.

Edit: changed the closing part of the script to exit normally instead of terminating the eol.exe process.
Thanks a lot for this. I couldn't figure out how to make work AHK in windowed Elma. This works well! I'm modifying this script, now it navigates to the Replay menu and starts rendering pcx files with F1+Enter 8)
User avatar
trew
38mins club
Posts: 504
Joined: 2 Dec 2009, 00:04

Re: Quickstart Elma

Post by trew »

I originally made this script back when I worked at uni. Quick-exiting was essential because my boss would enter my office at random times. :beer:
Image
Fucking broken image every month
Post Reply