Jump to content
dharani077

Unable to run firefox with script

Recommended Posts

dharani077

HELLO,

I written a script for running firefox from a GUI but i am able to see all buttons and other actions if i click on firefox button its not happening.  Could please help me to solve.

 

#include <GUIConstantsEx.au3>

Button()

Func Button()

   Local $oGUI = GUICreate ("Test Box", 800,240)

   Local $var = GUICtrlCreateButton("firefox", 210, 170, 85, 25)
   Local $var1 = GUICtrlCreateButton ("Cancel", 350, 170, 85, 25)
   Local $var2 = GUICtrlCreateButton ("Help", 120, 170, 85, 25)

   GUISetState(@SW_SHOW, $oGUI)

   Local $iPID = 0

   While 1
      Switch GUIGetMsg()
      Case $GUI_EVENT_CLOSE, $var1
         ExitLoop


      Case $var
         $iPID = Run("firefox.exe", "", @SW_SHOWMAXIMIZED)

      EndSwitch
   WEnd

   GUIDelete($oGUI)

   If $iPID Then ProcessClose($iPID)
   EndFunc

 

 

 

Share this post


Link to post
Share on other sites
dharani077

Hello,

 

Thanks mate i got it.

Edited by dharani077

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

×