Dilip11 Posted July 29, 2011 Posted July 29, 2011 hi i m not able to open any browser using run().. and also... i m using processlist() like $list1 = ProcessList("IEXPLORER.exe") $list1 = ProcessList("firefox.exe") like all browser... but i not able to do this....
smartee Posted July 29, 2011 Posted July 29, 2011 Post the code you tried to run Firefox with, so we can help you
hannes08 Posted July 29, 2011 Posted July 29, 2011 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]
Dilip11 Posted July 29, 2011 Author Posted July 29, 2011 Post the code you tried to run Firefox with, so we can help you i m using following code to watch the process if WinExists("Mozilla Firefox") Then MsgBox(0, "Mozila is open:", $title) EndIf if WinExists(" Windows Internet Explorer") Then MsgBox(0, "Internet is open:", $title) EndIf i try so many function but not get result....
smartee Posted July 29, 2011 Posted July 29, 2011 (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 July 29, 2011 by smartee
wakillon Posted July 29, 2011 Posted July 29, 2011 $list1 = ProcessList("IEXPLORER.exe")IEXPLORER.exe doesn't exists, it's iexplore.exeRemember that ProcessList function returns an array listing the currently running processes (names and PIDs).Also ShellExecute can open default browser ! AutoIt 3.3.18.0 X86 - SciTE 5.5.7 - WIN 11 24H2 X64 - Other Examples Scripts
smartee Posted July 29, 2011 Posted July 29, 2011 Also ShellExecute can open default browserYes, good point wakillon @Dilip11: Try wakillon's advice, certainly this works for you ShellExecute("http://www.google.com")
wakillon Posted July 29, 2011 Posted July 29, 2011 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.7 - WIN 11 24H2 X64 - Other Examples Scripts
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now