emil12345 Posted November 29, 2019 Posted November 29, 2019 Hello everybody ! Can anyone help me with a script ? Need to do the following : -Check if is already opend any ie webpage and if my string is present on that page it will be modified with a new a word string for example : word "black" with word "white" ! -The autoitscript must running always and check if ie browser will be open to change again . - if webpage refreshing or opened again or ie closed and re-open - the script must work - not stopping. the script must work only for internet explorer ! link example : https://subscription.packtpub.com/book/application_development/9781782165781/1/ch01lvl1sec23/automating-internet-explorer-intermediate
Developers Jos Posted November 29, 2019 Developers Posted November 29, 2019 6 minutes ago, emil12345 said: Can anyone help me with a script ? Help means you have something that doesn't work yet or are you looking for somebody to code it for you? 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.
emil12345 Posted November 29, 2019 Author Posted November 29, 2019 2 minutes ago, Jos said: Help means you have something that doesn't work yet or are you looking for somebody to code it for you? Jos hi JOS ! i am looking for somebody to code for me . i`m think it is easy for somebody that know autoit - i think is not more than 50 lines of code in autoit .
Developers Jos Posted November 29, 2019 Developers Posted November 29, 2019 ... and why exactly do you think we should do that for you? Either way: These forums are here to help you with issues and is not a rent-a-coder forum, so the choice is yours: Are you going to code this yourself or not? 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.
emil12345 Posted November 29, 2019 Author Posted November 29, 2019 (edited) i have this part of code that will replace a string in webpage ! #include <IE.au3> $oIE = _IECreate() _IENavigate($oIE, "http://www.autoitscript.com/") $body = _IEBodyReadHTML($oIE) If StringInStr($body, "autoit") Then MsgBox(0, "Success", "The string was found. Press enter to modify web page") $newbody = StringReplace($body, "autoit", "AUTOMATION: YOUR NAME HERE, XXX!") _IEBodyWriteHTML($oIE, $newbody) Else MsgBox(0, "Fail", "The string was NOT found") EndIf this code is ok but is using IECreate() ! i need to wait for ie to open manualy not auto or check if already ie opened . can you help me to modify this code ? thank you ! Edited November 29, 2019 by Jos added codebox
Nine Posted November 29, 2019 Posted November 29, 2019 24 minutes ago, emil12345 said: this code is ok but is using IECreate() so what is the problem, what else do you want to use ? 25 minutes ago, emil12345 said: i need to wait for ie to open manualy not auto or check if already ie opened check for _IEAttach in help file 27 minutes ago, emil12345 said: can you help me to modify this code ? I could but I won't. Open help file and learn how you could do it by yourself... emil12345 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
emil12345 Posted November 29, 2019 Author Posted November 29, 2019 I finished my code . how can i add a second word-StringReplace to script? #include <IE.au3> While(1) $oIE = _IEAttach ("Google") $body = _IEBodyReadHTML($oIE) If StringInStr($body, "Gmail") Then $newbody = StringReplace($body, "Gmail", "M U I E") _IEBodyWriteHTML($oIE, $newbody, $newbody1) Else EndIf WEnd
emil12345 Posted November 30, 2019 Author Posted November 30, 2019 1 hour ago, Nine said: so what is the problem, what else do you want to use ? check for _IEAttach in help file I could but I won't. Open help file and learn how you could do it by yourself... i made myself ! but somthing is not ok .... it crash after a few min. please sombody help me now to fixing my script ! #include <IE.au3> While(1) $oIE = _IEAttach ("Google") $body = _IEBodyReadHTML($oIE) If StringInStr($body, "Images") Then $newbody = StringReplace($body, "Images", "word1") _IEBodyWriteHTML($oIE, $newbody) EndIf If StringInStr($body, "Gmail") Then $newbody = StringReplace($body, "Gmail", "word2") _IEBodyWriteHTML($oIE, $newbody) EndIf WEnd
emil12345 Posted November 30, 2019 Author Posted November 30, 2019 hi. i dont know what is wrong in my script ! #include <IE.au3> While(1) $oIE = _IEAttach ("Google") $body = _IEBodyReadHTML($oIE) If StringInStr($body, "Images") Then $newbody = StringReplace($body, "Images", "word1") _IEBodyWriteHTML($oIE, $newbody) EndIf If StringInStr($body, "Gmail") Then $newbody = StringReplace($body, "Gmail", "word2") _IEBodyWriteHTML($oIE, $newbody) EndIf WEnd
Moderators Melba23 Posted November 30, 2019 Moderators Posted November 30, 2019 (edited) Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. And please do not start a new thread when you still have one running with exactly the same question - threads merged Moderation Team Edited November 30, 2019 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
emil12345 Posted November 30, 2019 Author Posted November 30, 2019 hi. i dont know what is wrong in my script ! #include <IE.au3> While(1) $oIE = _IEAttach ("Google") $body = _IEBodyReadHTML($oIE) If StringInStr($body, "Images") Then $newbody = StringReplace($body, "Images", "word1") _IEBodyWriteHTML($oIE, $newbody) EndIf If StringInStr($body, "Gmail") Then $newbody = StringReplace($body, "Gmail", "word2") _IEBodyWriteHTML($oIE, $newbody) EndIf WEnd
Developers Jos Posted November 30, 2019 Developers Posted November 30, 2019 @emil12345, Please stick to your original thread instead of opening a new one on the same subject! 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.
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