Sign in to follow this  
Followers 0
Rawox

[ SOLVED ] Is there any way to do this?

6 posts in this topic

#1 ·  Posted (edited)

Does anyone knows how to do this?

I want to make this work:

While 1
      $msg = GUIGetMsg()
        Select
        Case $msg = $dirbutton
            GuiDelete()
            Run ( $dirinput )
            If @error Then
                FireFoxUser()
            Else
                WinWaitActive ( "Firefox" )
                Sleep ( 500 )
                WinSetState ( "Firefox", "", @SW_MAXIMIZE )
                Sleep ( 500 )
        Case $msg = $GUI_EVENT_CLOSE
            GuiDelete()
            Send ( "{F4}" )
            Exit
        Case $msg = $quitbutton
            GuiDelete()
            Send ( "{F4}" )
            Exit
        EndSelect
    WEnd
    GUIDelete()
EndFunc
Edited by Rawox

Share this post


Link to post
Share on other sites



Your code is incomplete but I can see you forgot to close the If.

To be able to debug your code look at the console in Scite and post the error.

Share this post


Link to post
Share on other sites

While 1
      $msg = GUIGetMsg()
        Select
        Case $msg = $dirbutton
            GuiDelete()
            Run ( $dirinput )
            If @error Then
                FireFoxUser()
            Else
                WinWaitActive ( "Firefox" )
                Sleep ( 500 )
                WinSetState ( "Firefox", "", @SW_MAXIMIZE )
                Sleep ( 500 )
            EndIf       
        Case $msg = $GUI_EVENT_CLOSE
            GuiDelete()
            Send ( "{F4}" )
            Exit
        Case $msg = $quitbutton
            GuiDelete()
            Send ( "{F4}" )
            Exit
        EndSelect
    WEnd
    GUIDelete()
EndFunc

Share this post


Link to post
Share on other sites

Your code is incomplete but I can see you forgot to close the If.

To be able to debug your code look at the console in Scite and post the error.

Thanks I forgot to close it yes... :) That's one

My other Problem is that I have an input box

$dirinpunt = GUICtrlCreateInput ( "", 25, 188, 300 )

and I want to run the file that is filled in in the input box, but this doesn't work...

Run ( "$dirinpunt" )

So my problem now is... Someone fills in a path (C:\.....\jads.exe ) and I want to run it like in my last code...

Anyone?

Share this post


Link to post
Share on other sites

Try GuiCtrlRead($dirinpunt).

Share this post


Link to post
Share on other sites

Oops. I already close the GUI Before I requested it. Stupid 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  
Followers 0