Jump to content
Sign in to follow this  
Dilip11

open any browser

Recommended Posts

Hi Dilip11

try, Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe")

Because iexplore.exe and firefox.exe are not in the "PATH" environment variable.


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites

Did you try Hannes123's solution? What was the result?

Try this to run Firefox, assuming you used the default install directory

$iPID = Run(@ProgramFilesDir & "\Mozilla Firefox\firefox.exe")

Edit: Added the run Firefox bit

Edited by smartee

Share this post


Link to post
Share on other sites

$list1 = ProcessList("IEXPLORER.exe")

IEXPLORER.exe doesn't exists, it's iexplore.exe

Remember that ProcessList function returns an array

listing the currently running processes (names and PIDs).

Also ShellExecute can open default browser ! Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Also ShellExecute can open default browser

Yes, good point wakillon ;)

@Dilip11: Try wakillon's advice, certainly this works for you :)

ShellExecute("http://www.google.com")

Share this post


Link to post
Share on other sites

you can filter you winlist result like this

#include <Array.au3>

$_WinList = WinList ( "[REGEXPCLASS:(IEFrame|Mozilla|Chrome)]" )
For $_I = 1 To UBound ( $_WinList ) -1
    If $_WinList[$_I][0] <> '' Then
        $_Classname = _WinGetClassName ( $_WinList[$_I][1] )
        If $_Classname Then
            ConsoleWrite ( '-->-- Title : ' & $_WinList[$_I][0] & @Crlf )
            ConsoleWrite ( '+->-- Classname : ' & $_Classname & @Crlf )
        EndIf
    EndIf
Next

Func _WinGetClassName ( $hWnd )
    If Not IsHWnd ( $hWnd ) Then $hWnd = WinGetHandle ( $hWnd )
    $aClassName = DLLCall ( "user32.dll", "int", "GetClassName", "hWnd", $hWnd, "str", "", "int", 64 )
    If Not @error And $aClassName[0] <> 0 Then Return $aClassName[2]
EndFunc ;==> _WinGetClassName ( )

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...