Jump to content

Why won't think work? I think it's FileSelectFolder related.


Recommended Posts

The error is at $var = C:\Soldat\

I think. I want that directory the default directory when you press Open Soldat...

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\rce_aw_wierd\hacks\soldat.kxf
Global $Form1_1 = GUICreate("DJ5's Soldat and Notepad Opener", 637, 445, 206, 152)
GUISetBkColor(0x800000)
Global $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\Mike\My Documents\My Pictures\soldat DS.jpg", 0, 0, 636, 444, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
GUICtrlSetState($Pic1, $GUI_DISABLE)
Global $Button1 = GUICtrlCreateButton("Open Notepad", 328, 200, 83, 25, $WS_GROUP, $WS_EX_CLIENTEDGE)
GUICtrlSetCursor($Button1, 3)
Global $Button2 = GUICtrlCreateButton("Open Soldat", 224, 200, 75, 25, $WS_GROUP, $WS_EX_CLIENTEDGE)
GUICtrlSetCursor($Button2, 3)
Global $Button3 = GUICtrlCreateButton("About", 272, 408, 83, 25, $WS_GROUP)
GUICtrlSetCursor($Button3, 3)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

$var = C:\Soldat\

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
            #include <ButtonConstants.au3>
            #include <GUIConstantsEx.au3>
            #include <StaticConstants.au3>
            #include <WindowsConstants.au3>
            #Region ### START Koda GUI section ### Form=c:\rce_aw_wierd\hacks\soldat.kxf
            Global $Form1_1 = GUICreate("DJ5's Soldat and Notepad Opener", 637, 445, 206, 152)
            GUISetIcon("C:\Documents and Settings\Mike\My Documents\Icons\Icons\Devices\84.ico")
            GUISetBkColor(0x800000)
            Global $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\Mike\My Documents\My Pictures\soldat DS.jpg", 0, 0, 636, 444, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
            GUICtrlSetState(-1, $GUI_DISABLE)
            Global $Button1 = GUICtrlCreateButton("Open Notepad", 272, 376, 83, 25, $WS_GROUP, $WS_EX_CLIENTEDGE)
            GUICtrlSetCursor(-1, 3)
            Global $Button2 = GUICtrlCreateButton("Open Soldat", 279, 178, 75, 25, $WS_GROUP, $WS_EX_CLIENTEDGE)
            GUICtrlSetCursor(-1, 3)
            Global $Button3 = GUICtrlCreateButton("About", 416, 304, 83, 25, $WS_GROUP)
            GUICtrlSetCursor(-1, 3)
            Global $Label1 = GUICtrlCreateLabel("Not working? Browse for Soldat.", 239, 205, 156, 17)
            GUICtrlSetBkColor(-1, 0xC0C0C0)
            Global $Button4 = GUICtrlCreateButton("Browse...", 280, 224, 75, 17, $WS_GROUP)
            GUICtrlSetCursor(-1, 3)
            GUISetState(@SW_SHOW)
            #EndRegion ### END Koda GUI section ###

            While 1
                $nMsg = GUIGetMsg()
                Switch $nMsg
                    Case $GUI_EVENT_CLOSE
                        Exit
                    Case $Button1
                        Run("Notepad.exe", "", @SW_MAXIMIZE)
                    Case $Button2
                        Run("Soldat.exe", "$var")
                    Case $Button3
                        #Region --- CodeWizard generated code Start ---
                        ;MsgBox features: Title=Yes, Text=Yes, Buttons=OK, Icon=Info
                        MsgBox(64, "About DJ5's Soldat and Notepad Opener", "DJ5's Soldat and Notepad Opener" & @CRLF & @CRLF & "Author: DJ5 " & @CRLF & "Email: PM me at:" & @CRLF & "Website: http://www.anarchynetwork.com/")
                    Case $Button4
                        $var = FileSelectFolder("Please select your soldat directory.", "", 7)
                EndSwitch
            WEnd

    EndSwitch
WEnd
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...