Mannyfresh31 Posted February 16, 2021 Posted February 16, 2021 (edited) OK here I go... The script used to work but now it doesn't due to Edge update and now edge pops up automatically instead Internet Explorer I wish I could do this with edge as I used to do with IE there is the script I Wrote Someone Help Please side note: I check Webdriver and I'm unable to achieve it due to lack of knowledge but if someone gives me an idea maybe. expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> ;/////////Custom Library//////// #include <IE.au3> #include <MsgBoxConstants.au3> #include <Array.au3> #RequireAdmin MsgBox(0,"",IsAdmin()) #Region ### START Koda GUI section ### Form=C:\Users\Manuel\Documents\GetLinks theme.kxf $Form1 = GUICreate("Descargar Enlaces de Youtube", 729, 228, 192, 124) $LabelScroll = GUICtrlCreateLabel("Scrolls", 640, 75, 66, 17) $ComboScroll = GUICtrlCreateCombo("", 640, 90, 60, 21) ; Add additional items to the combobox. GUICtrlSetData($ComboScroll, "10|20|30|40|50|60|70|80|100","10") $Input1 = GUICtrlCreateInput("", 8, 48, 489, 21) $Button1 = GUICtrlCreateButton("Optener Enlaces", 513, 40, 103, 33) $Input2 = GUICtrlCreateInput("", 9, 136, 487, 21) $Button2 = GUICtrlCreateButton("Guardar", 513, 123, 103, 41) $Label1 = GUICtrlCreateLabel("Ingrese un Canal de Videos de Youtube", 16, 16, 260, 17) $ButtonP = GUICtrlCreateButton("Pegar", 400, 10, 80, 30) $Label2 = GUICtrlCreateLabel("Guardar en...", 24, 112, 66, 17) $Label3 = GUICtrlCreateLabel("0", 16, 176, 66, 17) $Label4 = GUICtrlCreateLabel("Links/Videos", 60, 176, 76, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 GetLinks () Case $Button2 Save () Case $ButtonP GUICtrlSetData($Input1, ClipGet()) EndSwitch WEnd Func Save () $Name = "Mis Enlaces_" & @MON & "-" & @MDAY & "-" & @HOUR & "-" & @MIN $mensaje = "Elige un Lugar y Nombre para el Archivo de los Enlaces" Global $sFileSaveDialog = FileSaveDialog ( $mensaje, "::{450D8FBA-AD25-11D0-98A8-0800361B1103}", "Texto (*.txt)",2,$Name,$Form1 ) GUICtrlSetData($Input2,$sFileSaveDialog) EndFunc Func GetLinks () $MyURL = GUICtrlRead($Input1 ) $MyFile = GUICtrlRead($Input2 ) if $MyURL = "" then MsgBox(16,"Hey!!","Ingresa un Canal de Youtube!!!",0) Return EndIf if $MyFile = "" Then MsgBox(16,"Hey!!","Ingresa un Lugar para Guardar el Archivo con Los Enlaces!!!",0) Return EndIf $MyComboRead = GUICtrlRead($ComboScroll) $oIE = _IECreate($MyURL,0,1,1) _IENavigate ($oIE,$MyURL) Sleep(500) Send("{TAB}") For $scroll = 1 To $MyComboRead Send("{PGDN}") Sleep(1000) Next $oLinks = _IELinkGetCollection($oIE) $iNumLinks = @extended $sTxt = "" For $oLink In $oLinks if StringInStr ($oLink.href, "watch?v=") then $sTxt &= $oLink.href & @CRLF Next $MyFileOpened = FileOpen($MyFile,2) FileWrite($MyFileOpened,$sTxt) FileClose($MyFileOpened) $MyFileArray = FileReadToArray($MyFile) GUICtrlSetData($Label3,(@extended /2)) for $i = 1 to UBound($MyFileArray) Step 1 _ArrayDelete($MyFileArray,$i) Next $MyFileOpened = FileOpen($MyFile,2) For $MyLine in $MyFileArray FileWriteLine($MyFileOpened,$MyLine ) Next FileClose($MyFileOpened) ShellExecute($MyFile) EndFunc Edited February 17, 2021 by Mannyfresh31 typo
caramen Posted February 17, 2021 Posted February 17, 2021 I think you could learn webdriver like all of us did. Yeah you gonna have hard time doing it depending on how you can assimilate syntax. I'm the first to do mistake when I try to learn, but all the community is very patient and help me even when I multiple fail to understand. Follow me. My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
Nine Posted February 17, 2021 Posted February 17, 2021 14 hours ago, Mannyfresh31 said: now edge pops up automatically instead Internet Explorer That is strange. I have both IE and Edge on Win7 and Win10. _IECreate always bring me Explorer, never Edge. Are you sure about that statement ? “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
Mannyfresh31 Posted February 17, 2021 Author Posted February 17, 2021 (edited) 2 hours ago, Nine said: That is strange. I have both IE and Edge on Win7 and Win10. _IECreate always bring me Explorer, never Edge. Are you sure about that statement ? Yes yes It brings Edge instead of IE It used to work just fine but not anymore I just want to cry 😞 Edited February 17, 2021 by Mannyfresh31
Mannyfresh31 Posted February 17, 2021 Author Posted February 17, 2021 7 hours ago, caramen said: I think you could learn webdriver like all of us did. Yeah you gonna have hard time doing it depending on how you can assimilate syntax. I'm the first to do mistake when I try to learn, but all the community is very patient and help me even when I multiple fail to understand. Follow me. I will try 😞
mLipok Posted February 17, 2021 Posted February 17, 2021 (edited) 18 hours ago, Mannyfresh31 said: now edge pops up automatically instead Internet Explorer 3 hours ago, Nine said: That is strange. I have both IE and Edge on Win7 and Win10. _IECreate always bring me Explorer, never Edge. Are you sure about that statement ? It depends sometime is changed ... or not. Using Edge Configuration search for "Explorer" or "compability". Edited February 17, 2021 by mLipok typo Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24
caramen Posted February 17, 2021 Posted February 17, 2021 1 hour ago, Mannyfresh31 said: Yes yes It brings Edge instead of IE It used to work just fine but not anymore I just want to cry 😞 Maybe updating edge put it again in the default used browsers. You could check that maybe ? You have to push [Windows]+ -> Application tab -> Default applications My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
Nine Posted February 17, 2021 Posted February 17, 2021 11 minutes ago, caramen said: Maybe updating edge put it again in the default used browsers. Nah. _IECreate open an object [ObjCreate("InternetExplorer.Application")]. It has nothing to do with default browser. “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
Mannyfresh31 Posted February 17, 2021 Author Posted February 17, 2021 (edited) Ok guys thanks for the replies but It has nothing to do with settings Edited February 17, 2021 by Mannyfresh31
Skeletor Posted February 23, 2021 Posted February 23, 2021 Even though I didnt understand the language and what the buttons meant, I eventually figured it out... I also got the same result as the OP... However, with mine, it first opened iExplore then opened two windows of Edge... then it closed the iExplore and left Edge open. Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI
Mannyfresh31 Posted February 24, 2021 Author Posted February 24, 2021 11 hours ago, Skeletor said: Even though I didnt understand the language and what the buttons meant, I eventually figured it out... I also got the same result as the OP... However, with mine, it first opened iExplore then opened two windows of Edge... then it closed the iExplore and left Edge open. @Skeletor sorry I left It in Spanish my bad and yes It opens both but It doesn't do what It supposed to do "get all videos's links from YT Page" 😞 from Channel in vídeos section of course 😞
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