Sign in to follow this  
Followers 0
bang

a function on button and input

4 posts in this topic

#include <GuiConstants.au3>

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("MyGUI", 1276, 947,(@DesktopWidth-1276)/2, (@DesktopHeight-947)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$Button_1 = GuiCtrlCreateButton("msn", 40, 60, 90, 80)

$Input_2 = GuiCtrlCreateInput("Input2", 40, 20, 130, 20)

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case Else

;;;

EndSelect

WEnd

Exit

help i need a function on button (then open a feks notepad.exe) and then open then

and this same with input need then will open a exe program!!

plz help me

Share this post


Link to post
Share on other sites



GuiSetState()
While 1
$msg = GuiGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button_1
run("notepad.exe")
EndSelect
WEnd
Exit


[font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]

Share this post


Link to post
Share on other sites

maybe this can help... not "sure" what you wanted

#include <GuiConstants.au3>

;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GUICreate("MyGUI");, 1276, 947,(@DesktopWidth-1276)/2, (@DesktopHeight-947)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$Button_1 = GUICtrlCreateButton("msn", 40, 60, 90, 80)
$Input_2 = GUICtrlCreateInput("Input2", 40, 20, 130, 20)

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $Button_1
            Run_Program()
        Case Else
        ;;;
    EndSelect
WEnd
Exit

; ---------- Functions -----------

Func Run_Program()
    
    $Prog_name = GUICtrlRead($Input_2)
    Run("notepad.exe")
    WinWait('')
    Send($Prog_name)
EndFunc

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

The select and If can be used


My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!

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