Sign in to follow this  
Followers 0
bobheart

Someone Feel Like Helping Me With This

3 posts in this topic

I think I'm on the right track . but so far too .

#cs - ### Generated by AutoBuilder 0.4 -- do not modify ###

511 228

0 3 0 0 0 0 0 0 3 2 0 0 0 0 0 0

input $input_1 Input 1 40 40 320 20 0 0

input $input_2 Input 2 40 120 320 20 0 0

button $button_1 Button 1 380 40 90 20 0 0

button $button_2 Button 2 380 120 90 20 0 0

label $label_1 Label 1 380 10 90 20 0 0

label $label_2 Label 2 380 90 90 20 0 0

button $button_3 Button 3 380 170 90 20 0 0

#ce - ### End of Dump ###

;Script generated by AutoBuilder 0.4

Opt("GUICoordMode", 1)

Opt("GUINotifyMode", 1)

GuiCreate("MyGUI", 509,223,(@DesktopWidth-509)/2, (@DesktopHeight-223)/2 , 0x04CF0000)

$input_1 = GUISetControl("input", "Path to  Compiler", 40, 40, 320, 20)

$input_2 = GUISetControl("input", "Path to Source", 40, 120, 320, 20)

$button_1 = GUISetControl("button", "Compiler", 380, 40, 90, 20)

$button_2 = GUISetControl("button", "Source", 380, 120, 90, 20)

$label_1 = GUISetControl("label", "Compiler", 380, 10, 90, 20)

$label_2 = GUISetControl("label", "Source", 380, 90, 90, 20)

$button_3 = GUISetControl("button", "Run", 380, 170, 90, 20)

GuiShow()

While 1

    sleep(100)

    $msg = GuiMsg(0)

    Select

    Case $msg = -3

        Exit

    Case $msg = 3

        ;;;

    Case $msg = $input_1

        ;;;

    Case $msg = $input_2

        ;;;

    Case $msg = $button_1

        $var = FileOpenDialog($message, "C:\", "Compiler (*.exe;*.com)", 1 + 4 )

      If @error Then

    MsgBox(4096,"","No File(s) chosen")

Else

    $var = StringReplace($var, "|", @CRLF)

    MsgBox(4096,"","You chose " & $var)

EndIf

    Case $msg = $button_2

        $var = FileOpenDialog($message, "C:\", "Source (*.*)", 1 + 4 )

    If @error Then

    MsgBox(4096,"","No File(s) chosen")

Else

    $var = StringReplace($var, "|", @CRLF)

    MsgBox(4096,"","You chose " & $var)

EndIf

    Case $msg = $label_1

        ;;;

    Case $msg = $label_2

        ;;;

    Case $msg = $button_3

        Run(@ComSpec & " /k "Compiler" & "",Source")

    EndSelect

WEnd

Exit

I want to be able to choose the compiler then the source to compile .with this gui .

I can do it right now by hand coding it in but thats no fun .

Share this post


Link to post
Share on other sites



Here it is:

#cs - ### Generated by AutoBuilder 0.4 -- do not modify ###
   511 228
   0 3 0 0 0 0 0 0 3 2 0 0 0 0 0 0 
   input $input_1 Input 1 40 40 320 20 0 0 
   input $input_2 Input 2 40 120 320 20 0 0 
   button $button_1 Button 1 380 40 90 20 0 0 
   button $button_2 Button 2 380 120 90 20 0 0 
   label $label_1 Label 1 380 10 90 20 0 0 
   label $label_2 Label 2 380 90 90 20 0 0 
   button $button_3 Button 3 380 170 90 20 0 0 
#ce - ### End of Dump ###

;Script generated by AutoBuilder 0.4


Opt ("GUICoordMode", 1)
Opt ("GUINotifyMode", 1)
GUICreate("MyGUI", 509, 223, (@DesktopWidth - 509) / 2, (@DesktopHeight - 223) / 2, 0x04CF0000)

$input_1 = GUISetControl("input", "Path to  Compiler", 40, 40, 320, 20)
$input_2 = GUISetControl("input", "Path to Source", 40, 120, 320, 20)
$button_1 = GUISetControl("button", "Compiler", 380, 40, 90, 20)
$button_2 = GUISetControl("button", "Source", 380, 120, 90, 20)
$label_1 = GUISetControl("label", "Compiler", 380, 10, 90, 20)
$label_2 = GUISetControl("label", "Source", 380, 90, 90, 20)
$button_3 = GUISetControl("button", "Run", 380, 170, 90, 20)

GUIShow()

While 1
   Sleep(100)
   $msg = GUIMsg(0)
   Select
      Case $msg = -3
         Exit
      Case $msg = 3
        ;;;
      Case $msg = $input_1
        ;;;
      Case $msg = $input_2
        ;;;
      Case $msg = $button_1
         $Compiler = FileOpenDialog("Choose the compiler", "C:\", "Compiler (*.exe;*.com)", 1)
         If @error Then
            MsgBox(4096, "", "No File(s) chosen")
         Else
            GUIWrite($input_1, 0, $Compiler)
            MsgBox(4096, "", "You chose " & $Compiler)
         EndIf
      Case $msg = $button_2
         $Script = FileOpenDialog("Choose the script to compile", "C:\", "Source (*.au3)", 1)
         If @error Then
            MsgBox(4096, "", "No File(s) chosen")
         Else
            GUIWrite($input_2, 0, $Script)
            MsgBox(4096, "", "You chose " & $Script)
         EndIf
      Case $msg = $label_1
        ;;;
      Case $msg = $label_2
        ;;;
      Case $msg = $button_3
         RunWait($Compiler & ' /in "' & $Script & '"')
         MsgBox(64, "Done!", "Your script is compiled as:" & @CRLF & StringTrimRight($Script, 3) & "exe")
   EndSelect
Wend
Exit

Share this post


Link to post
Share on other sites

Freaking awesome .. thank you for the help SlimShady .

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  
Followers 0