Juvigy Posted April 14, 2016 Share Posted April 14, 2016 Hi Guys, I have and autoit exe file that i want to be executed every time IE is opened. How can i accomplish this ? The exe file automates website data. I want to be sure that the exe file is executed every time IE is Opened automatcally. Link to comment Share on other sites More sharing options...
Juvigy Posted April 15, 2016 Author Share Posted April 15, 2016 (edited) As there is no guidance , i decided to try to create a IE BHO with visual studio in C++. Final product will be a DLL that is registered into a IE Add-in. As my C++ is practically missing , any help is much appreciated. Here is the base i am using: https://msdn.microsoft.com/en-us/library/bb250489%28v=vs.85%29.aspx Edited April 15, 2016 by Juvigy Spell check Link to comment Share on other sites More sharing options...
Juvigy Posted April 18, 2016 Author Share Posted April 18, 2016 I am almost ready , but i cant fix a small bump and i cant figure out why - it should be very easy but still it doesnt work. I use this to start up notepad for test purposes: CreateProcess(TEXT("C:\\windows\\notepad.exe"), NULL, NULL, NULL, NULL, NULL, NULL, NULL, &si, &pi); Which works great. But later on i cant close this. I tried : PostMessage(pi.hProcess, WM_CLOSE, 0, 0); PostThreadMessage(pi.dwThreadId, WM_CLOSE, ... TerminateProcess(pi.hProcess, 0) Nothing works. I put a msgbox just before to verify it is executed - the msgbox appears. Any idea why this happens ? I know it is C++ code , but it is related to AutoIT script and i know there are people here who know a lot of C++ Link to comment Share on other sites More sharing options...
junkew Posted April 18, 2016 Share Posted April 18, 2016 You can catch the createwindow event. See iuiautomation thread in examples for eventhandlers. When new window is created you can see based on windowname if its a browser started. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Juvigy Posted April 19, 2016 Author Share Posted April 19, 2016 I think you missed my point - i dont want to catch the creation of new IE window - i want Internet Explorer to start my script every time IE is started. Link to comment Share on other sites More sharing options...
AutoBert Posted April 19, 2016 Share Posted April 19, 2016 But if you have a script which knows, ie is started you can also start your mainscript. Link to comment Share on other sites More sharing options...
Juvigy Posted April 19, 2016 Author Share Posted April 19, 2016 I can go that way - to have one main script started as a service which monitors IE process and start/close the IE manipulation script. But IE Add-on seemed more elegant solution. Link to comment Share on other sites More sharing options...
junkew Posted April 19, 2016 Share Posted April 19, 2016 Give a little more background on what you want. Start autoitscript that starts ie and fills the form can also be a solution. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Juvigy Posted April 20, 2016 Author Share Posted April 20, 2016 I want when a page is open in IE - lets say "google.com" , the script to start and automate things. Ideally the script should be closed if the IE page is not opened. I dont want to start the script manually and the script to start the IE. I want ideally the other way around - IE to start the script. The closest thing to that is a master script running all the time as service and monitoring IE pages, so i have decided to go that way. Link to comment Share on other sites More sharing options...
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