Jump to content
Sign in to follow this  
wander

ShellExecuting .BIN file

Recommended Posts

wander

Hi folks. I am making a launcher for a game and i need to ShellExecute a .bin file to start it, but when i try it i am getting an error.

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>

$Form = GUICreate("Vitality Aion Launcher by Crowen v1.10", 417, 157, -1, -1)
GUISetBkColor(0xA0A0A4)
$Label2 = GUICtrlCreateLabel("Please chose your Aion Bin32 Folder:", 8, 56, 200, 100)
$SavePath = GUICtrlCreateInput("", 11, 80, 345, 21)
$Label1 = GUICtrlCreateLabel("Welcome to Vitality Aion Launcher", 8, 8, 409, 32)
GUICtrlSetFont(-1, 16, 800, 2, "Rosewood Std Regular")
$Browsr = GUICtrlCreateButton("&...", 360, 79, 50, 24, 0)
$Launch = GUICtrlCreateButton("Launch Vitality Aion", 160, 120, 100, 25, 0)
GUISetState(@SW_SHOW)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Launch
        Launch()
        Case $Browsr
            $get = FileSelectFolder('Please select a directory', @DesktopDir, 5, GUICtrlRead($SavePath), $Form)
            If Not @error Then
                GUICtrlSetData($SavePath, $get)
            EndIf
    EndSwitch
WEnd

Func Launch()
    ShellExecute(GUICtrlRead($SavePath)&"\Aion.bin", "-ip:66.231.190.130 -ng")
EndFunc

And the error is

The File does not have a program associated with it for performing this action. Create in the association in the Folder Options control panel.

How can i fix it ?

Share this post


Link to post
Share on other sites
Mobius

Don't use shellexecute, use run instead. that is unless you want to integrate an association for for the bin extension in your shell :) (which is not recommended.)

Func Launch()
     Run(GUICtrlRead($SavePath)&"\Aion.bin -ip:66.231.190.130 -ng")
EndFunc

*snip*

Is this bin file an executable?

Edited by Mobius

Share this post


Link to post
Share on other sites
wander

Thanks man it realy helped me :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×