gahhon Posted November 21, 2018 Author Share Posted November 21, 2018 2 minutes ago, faustf said: the code work for me , therfore , Bravo But the code doesn't work for me Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 (edited) i run in win 7 sp1 and you ?? ofcourse return me login error because user and pass in not correct, but work , i suggest , also try to run a insert script little bit slow 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 7 minutes ago, faustf said: 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 My tool menu don't have koda selection. Do I have download anything else? 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: i run in win 7 sp1 and you ?? ofcourse return me login error because user and pass in not correct Indeed. Because I can't just simply give away the login credential LOL. I am running Window 10 and IE Version 11. The expected result would be have new tab out instead of new window. Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 because you have download only packet autoit download also scite compleate packe in site of autoit and install https://www.autoitscript.com/site/autoit-script-editor/downloads/ Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 work also in windows 10 Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 i suggest use autoit 32 bit version Link to comment Share on other sites More sharing options...
gahhon Posted November 21, 2018 Author Share Posted November 21, 2018 --> IE.au3 T3.0-2 Warning from function _IEGetObjByName, $_IESTATUS_NoMatch (Name: userName, Index: 0) --> IE.au3 T3.0-2 Warning from function _IEGetObjByName, $_IESTATUS_NoMatch (Name: passWd, Index: 0) --> IE.au3 T3.0-2 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (loginButton) --> IE.au3 T3.0-2 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType --> IE.au3 T3.0-2 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType --> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType It shows this error Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 (edited) you attach ?. this code for me work in windows 10 and windows 7 #include <IE.au3> Call ("LoginKiss918Jack") Call ("LoginKiss918Vongola") Func LoginKiss918Jack () Global $oBrowser = _IECreate ("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 i use autoit 32 bit version also in windows 10 64 and in win 7 33 bit 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 (edited) also i suggest if you want run both login jack and vongola #include <IE.au3> Call ("LoginKiss918Jack") Call ("LoginKiss918Vongola") Func LoginKiss918Jack () Global $oBrowser = _IECreate ("https://kiosk.918kiss.com/", 0, 1, 1, 1) ; <--- 0011 invisible explorer <--- 0111 visible explorer 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 $oBrowser2 = _IECreate ("https://kiosk.918kiss.com/", 0, 1, 1, 1) Local $username = _IEGetObjByName ($oBrowser2, "userName") Local $password = _IEGetObjByName ($oBrowser2, "passWd") Local $button = _IEGetObjById ($oBrowser2, "loginButton") _IEFormElementSetValue ($username, "TEST") _IEFormElementSetValue ($password, "AB12") _IEAction ($button, "click") EndFunc 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 4 minutes ago, faustf said: also i suggest if you want run both login jack and vongola #include <IE.au3> Call ("LoginKiss918Jack") Call ("LoginKiss918Vongola") Func LoginKiss918Jack () Global $oBrowser = _IECreate ("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 $oBrowser2 = _IECreate ("https://kiosk.918kiss.com/", 0, 0, 1, 1) Local $username = _IEGetObjByName ($oBrowser2, "userName") Local $password = _IEGetObjByName ($oBrowser2, "passWd") Local $button = _IEGetObjById ($oBrowser2, "loginButton") _IEFormElementSetValue ($username, "TEST") _IEFormElementSetValue ($password, "AB12") _IEAction ($button, "click") EndFunc Do you have other suggestion on doing this so? Because I am still showing the Jack one, but not Vongola one. After I change the Vongola to Browser2 it don't have errors on the log already. Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 (edited) Global $oBrowser = _IECreate ("https://kiosk.918kiss.com/", 0, 1, 1, 1) ; <--- 0011 invisible explorer <--- 0111 visible explorer show Global $oBrowser2 = _IECreate ("https://kiosk.918kiss.com/", 0, 0, 1, 1) ; <--- 0011 invisible explorer <--- 0111 visible explorer not show but do the dirty work i promes , if you wanna look change 0 to 1 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 4 minutes ago, faustf said: Global $oBrowser = _IECreate ("https://kiosk.918kiss.com/", 0, 1, 1, 1) ; <--- 0011 invisible explorer <--- 0111 visible explorer show Global $oBrowser2 = _IECreate ("https://kiosk.918kiss.com/", 0, 0, 1, 1) ; <--- 0011 invisible explorer <--- 0111 visible explorer not show but do the dirty work i promes , if you wanna look change 0 to 1 Yeah. That's will show, but as in 2 different windows already LOL Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 yea Link to comment Share on other sites More sharing options...
gahhon Posted November 21, 2018 Author Share Posted November 21, 2018 Lol. if like that very not organize to my program already, what if I have more than 10 checkboxes and user selected more than 8. LOL Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 the user control only one open and close , for example , or open in hide read a page and rebuild in listview in a gui , solution is much Link to comment Share on other sites More sharing options...
faustf Posted November 21, 2018 Share Posted November 21, 2018 but if you want a tab or dont live use this code by @DaleHohm #include <IE.au3> Const $ie_new_in_tab=0x0800 $oIE = _IECreate("http://www.autoitscript.com") $oIE.Navigate("http://www.autoitscript.com/forum/", $ie_new_in_tab) $oIE2 = _IEAttach("http://www.autoitscript.com/forum/", "url") _IEQuit($oIE2) Link to comment Share on other sites More sharing options...
TheDcoder Posted November 22, 2018 Share Posted November 22, 2018 18 hours ago, gahhon said: 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? I don't think you can have a visible browser window (atleast a proper one) with multiple tabs when you are using web driver interface. I did not use it before so I do not know much about it. 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 22, 2018 Author Share Posted November 22, 2018 Since IE can't make a new tab. Then the idea of my program will be design in buttons based. Every buttons trigger will prompt a new window. Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted November 22, 2018 Share Posted November 22, 2018 (edited) 11 minutes ago, gahhon said: Since IE can't make a new tab. Are you sure? Spoiler #include <IE.au3> Global $objIE, _ $arrURLs[2] = ["www.google.com", "www.youtube.com"] $objIE = _IECreate() If @error Then ConsoleWrite("Error during the creation of IE object. Error: " & @error & @CRLF) Exit Else For $i = 0 To UBound($arrURLs) - 1 Step 1 $objIE.navigate2($arrURLs[$i], 2048) Next Sleep(10000) _IEQuit($objIE) EndIf Thanks to Navigate2 method, and the parameter navOpenInNewTab, you can do it Edited November 22, 2018 by FrancescoDiMuro Added links for the OP Danp2 1 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...
Recommended Posts