gahhon Posted November 20, 2018 Share Posted November 20, 2018 Hi, I am new and beginner to this AutoIT software as well as the code. I just did google research regarding how to design/create the autologin bot, and also tried it worked via IE. I have few questions regarding the browser tho since the google has no give me answer, or YouTube. I wanted to ask, how can I use Google Chrome/Firefox instead of IE (What I should include?) Secondly, If I imported the library, what code I can, where can I check that? Thanks for advance information. Peace out.! Link to comment Share on other sites More sharing options...
gahhon Posted November 20, 2018 Author Share Posted November 20, 2018 Sorry, I was forgot the rename the title and I can't find the edit control over the post. Apology. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 20, 2018 Developers Share Posted November 20, 2018 (edited) You don't have the Edit option yet, but will after you are promoted to the next user group. As to your questions: You will have to be way more exact/clear about what you want to accomplish before we can provide any real help. Jos Edited November 20, 2018 by 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. Link to comment Share on other sites More sharing options...
faustf Posted November 20, 2018 Share Posted November 20, 2018 if i understund , what you want do , you should use this framework , also if is difficult to use (4 me ) i prefer use IE Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted November 21, 2018 Share Posted November 21, 2018 @gahhon There are plenty UDFs about Browser automation. You can find more about here Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
TheDcoder Posted November 21, 2018 Share Posted November 21, 2018 10 hours ago, gahhon said: I wanted to ask, how can I use Google Chrome/Firefox instead of IE (What I should include?) You may want to control chrom/firefox via the Web Driver interface, which is a W3C wed standard There is an excellent Web Driver UDF (library) made for using just that by @Danp2 10 hours ago, gahhon said: Secondly, If I imported the library, what code I can, where can I check that? You will have to directly refer to the code and comments in the included scripts EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
gahhon Posted November 21, 2018 Author Share Posted November 21, 2018 18 hours ago, Jos said: You don't have the Edit option yet, but will after you are promoted to the next user group. As to your questions: You will have to be way more exact/clear about what you want to accomplish before we can provide any real help. Jos What I wanna accomplish is that I want to create a program/software that can automate login based on URL and the login credential. 7 hours ago, TheDcoder said: You may want to control chrom/firefox via the Web Driver interface, which is a W3C wed standard There is an excellent Web Driver UDF (library) made for using just that by @Danp2 You will have to directly refer to the code and comments in the included scripts I have look through the link you given. But I don't see related commands that I can open browser as in Firefox or Google Chrome, and also how to set the value into the HTML element and trigger Login button? 15 hours ago, faustf said: if i understund , what you want do , you should use this framework , also if is difficult to use (4 me ) i prefer use IE After I look through every links that you guys given, I also more prefer to the IE as I can control it. But if that any command that I open the 2nd URL as in New Tab instead? Thanks for advance information. Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 why you want open a second tab??? open directly another session of explorer with 2 different handle variable $oIE = _IECreate("https://pronhub.com", 0, $Hide, 1, 1) ; <--- 0011 invisible explorer <--- 0111 visible explorer $oIE_2 = _IECreate("https://pronhub.com", 0, $Hide, 1, 1) ; <--- 0011 invisible explorer <--- 0111 visible explorer TheDcoder 1 Link to comment Share on other sites More sharing options...
gahhon Posted November 21, 2018 Author Share Posted November 21, 2018 35 minutes ago, faustf said: why you want open a second tab??? open directly another session of explorer with 2 different handle variable $oIE = _IECreate("https://pronhub.com", 0, $Hide, 1, 1) ; <--- 0011 invisible explorer <--- 0111 visible explorer $oIE_2 = _IECreate("https://pronhub.com", 0, $Hide, 1, 1) ; <--- 0011 invisible explorer <--- 0111 visible explorer Because if open as in new tab right, it would look more organize than several browsers. What the 0011 referring to? Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 when you create a macro not think to organize because , your software will do and organize data . 3 minutes ago, gahhon said: What the 0011 referring to? in scite select _iecreate and click F1 you will discover Link to comment Share on other sites More sharing options...
gahhon Posted November 21, 2018 Author Share Posted November 21, 2018 5 minutes ago, faustf said: when you create a macro not think to organize because , your software will do and organize data . in scite select _iecreate and click F1 you will discover Oh. I was thinking how to trigger the F1 [Help] menu out yesterday. = = By the way, according to the document via F1, It should be 1011 for new tab? Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 $sUrl [optional] specifies the Url to navigate to upon creation $iTryAttach [optional] specifies whether to try to attach to an existing window 0 = (Default) do not try to attach 1 = Try to attach to an existing window $iVisible [optional] specifies whether the browser window will be visible 0 = Browser Window is hidden 1 = (Default) Browser Window is visible $iWait [optional] specifies whether to wait for page to load before returning 0 = Return immediately, not waiting for page to load 1 = (Default) Wait for page load to complete before returning $iTakeFocus [optional] specifies whether to bring the attached window to focus 0 = Do not bring window into focus 1 = (Default) bring window into focus $url 1 0 1 1 = $url 1 = Try to attach to an existing window 0 = Browser Window is hidden 1 = (Default) Wait for page load to complete before returning 1 = (Default) bring window into focus read a new tab open or create? Link to comment Share on other sites More sharing options...
gahhon Posted November 21, 2018 Author Share Posted November 21, 2018 I would say, if the IE is not open, then create a new one. Else new tab. Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 (edited) try and tell me, is 3 line of code Edited November 21, 2018 by faustf Link to comment Share on other sites More sharing options...
gahhon Posted November 21, 2018 Author Share Posted November 21, 2018 Either your 2 code, or mine also not working. @@ It either shows 2 windows, or 1 windows with 1 URL Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 my code is a portion of code is not compleate yopu must compleate , if you want learn if you send your code (use a tag for do that) all comunity will be happy to help you , also i Link to comment Share on other sites More sharing options...
gahhon Posted November 21, 2018 Author Share Posted November 21, 2018 1 minute ago, faustf said: my code is a portion of code is not compleate yopu must compleate , if you want learn if you send your code (use a tag for do that) all comunity will be happy to help you , also i Haha. Sure will do. Also please allowed me simply explain what I am trying to do with the software. I believe that AutoIT can design the User-Interface, so I would design it with several checkboxes/radiobuttons and a button to trigger a function. The function will be called and prompt browser to user based on their selection on the checkboxes or radiobuttons. If the IE is opened, then new-tabs for the rest of URLs. Else open new IE for first 1st URL, then new-tabs for the rest of URLs. #include <IE.au3> Call ("LoginKiss918Jack") Call ("LoginKiss918Vongola") Func LoginKiss918Jack () Global $oBrowser = _IEAttach ("https://kiosk.918kiss.com/", 0, 1, 1, 1) Local $username = _IEGetObjByName ($oBrowser, "userName") Local $password = _IEGetObjByName ($oBrowser, "passWd") Local $button = _IEGetObjById ($oBrowser, "loginButton") _IEFormElementSetValue ($username, "TEST") _IEFormElementSetValue ($password, "ABcd") _IEAction ($button, "click") EndFunc Func LoginKiss918Vongola () Global $oBrowser = _IECreate ("https://kiosk.918kiss.com/", 0, 0, 1, 1) Local $username = _IEGetObjByName ($oBrowser, "userName") Local $password = _IEGetObjByName ($oBrowser, "passWd") Local $button = _IEGetObjById ($oBrowser, "loginButton") _IEFormElementSetValue ($username, "TEST") _IEFormElementSetValue ($password, "AB12") _IEAction ($button, "click") EndFunc Link to comment Share on other sites More sharing options...
gahhon Posted November 21, 2018 Author Share Posted November 21, 2018 Correction:- For the Kiss918Jack function, is _IECreate, not Attach. I was trying something else Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 (edited) for draw a GUI you can use koda , in scite alt+m or tool -- koda , after open i suggest pin it in toolbar , or you can use a isn autoit if you find in google you see is good framewoork for draw a gui also if i prefer koda (the old habits is hard to die) good Edited November 21, 2018 by faustf Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 the code work for me , therfore , Bravo Link to comment Share on other sites More sharing options...
Recommended Posts