Jump to content

Help with Gui Functions


Recommended Posts

Here is my code

Posted Image

(by the way this is a simple launcher for the sdl version of VisualBoyAdvance)

Could anybody help me please

#NoTrayIcon

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 350, 79, 193, 125)
$Button1 = GUICtrlCreateButton("Button1", 8, 8, 75, 25, 0)
$Input1 = GUICtrlCreateInput("Input1", 88, 8, 249, 21)
$Button2 = GUICtrlCreateButton("Button2", 8, 40, 331, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            $File = FileOpenDialog("Open Rom", @ScriptDir, "GBA (*.gba;*.zip)")
            GuiCtrlSetData($Input1, $File)
        Case $Button2
            ShellExecute(@ScriptDir + 'App\VisualBoyAdvance\vba.exe' + $Button1)

    EndSwitch
WEnd
Link to comment
Share on other sites

ShellExecute(@ScriptDir + 'App\VisualBoyAdvance\vba.exe' + $Button1)

This line is a problem. I don't know what you intended to do here, but I know that won't work.

Did you perhaps mean to use & to combine strings? + is only for addition of numbers and will not join strings.

Also, you'll need spaces and a slash. And I think that $Button1 was supposed to be $File.

ShellExecute(@ScriptDir & '\App\VisualBoyAdvance\vba.exe ' & $File)

Edited by Richard Robertson
Link to comment
Share on other sites

Thanks Mate I just found that out my self XD it's been sometime since I last used Autoit (mostly been working with delphi which does use the + sign XD), Really thanks a lot though man

Edited by thibeaz
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...