Jump to content

Recommended Posts

Posted

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]
Posted (edited)

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
Posted

$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.18.0 X86 - SciTE 5.5.7WIN 11 24H2 X64 - Other Examples Scripts

Posted

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")
Posted

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.18.0 X86 - SciTE 5.5.7WIN 11 24H2 X64 - Other Examples Scripts

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
×
×
  • Create New...