Search the Community
Showing results for tags '_IE'.
-
If you press the "Login" button in the top-left of https://www.showroom-live.com/, it creates a popup in which you press "Login with Twitter ID", which then opens a new window with an "Authorize app" button. None of these 3 buttons have a Name or ID, so how do I click on them, because _IEGetObjByName / _IEGetObjByID will not work. Here are the sources of the 3 buttons: ;Login button. ;<a onclick="showLoginDialog();" href="javascript:void(0);">Login</a> ;Twitter button (Note that I am already signed into Twitter and just need to Authorize it). ;<a class="btn-twitter btn-sky-blue submit fs-b5" onclick="window.open('/social/twitter/redirect_authorize_url?login=1&from_browser=1', 'twitter', 'width=500,height=400,menubar=yes,status=yes,scrollbars=yes');" href="javascript:void(0);">Login with Twitter ID</a> ;Popup window appears. ;<input class="submit button selected" id="allow" type="submit" value="Authorize app"> I have also tried: Local $oLinks = _IETagNameGetCollection($ie, "a") For $oLink In $oLinks If $oLink.InnerText = "showLoginDialog()" Then _IEAction($oLink, "Click") ExitLoop EndIf Next I've even tried adding "showLoginDialog()" and "javascript:void(0)" to the end of the URL, but as expected, that wouldn't work either. My goal is something like this: #include <IE.au3> Local $ie = _IECreate("https://www.showroom-live.com/onlive") _IELoadWait($ie) Local $originalHandle = $ie ;===Functions========================================================== Func login() ;Source: <a onclick="showLoginDialog();" href="javascript:void(0);">Login</a> _IEAction(ABOVESOURCE, "Click") ;Source: <a class="btn-twitter btn-sky-blue submit fs-b5" onclick="window.open('/social/twitter/redirect_authorize_url?login=1&from_browser=1', 'twitter', 'width=500,height=400,menubar=yes,status=yes,scrollbars=yes');" href="javascript:void(0);">Login with Twitter ID</a> _IEAction(ABOVESOURCE, "Click") ;New window appears for Twitter sign in, but the URL is locked. ;Source: <input class="submit button selected" id="allow" type="submit" value="Authorize app"> _IEAttach($ie, ABOVEHANDLE) ;How do I get the handle of the new window from above? _IEAction(ABOVESOURCE, "Click") _IEAttach($ie, $originalHandle) EndFunc ;====================================================================== ;===Code=============================================================== login() ;====================================================================== Thank you in advance.
-
hi guys how is possible set a speed of all function _Ie ??
-
Hello all, I'm trying to create a webscrape script using AutoIt. A non-profit I'm involved with is using GroupSpaces.com and there is no notification to the group when someone posts a new topic to the forum. I'm including IE.au3 #include <MsgBoxConstants.au3> #include <Array.au3> #include <String.au3> ; Open Groupspaces.com Global $oIE = _IECreate ("http://www.groupspaces.com") _IENavigate($oIE,"http://groupspaces.com/MyCrazyTest/forum/") ;Grab all the links on the Forum page Global $oLinksCategoryPage = _IELinkGetCollection($oIE) For $oLink In $oLinksCategoryPage Local $oLinkHRef = $oLink.href If StringInStr($oLinkHRef,"forum_id") Then ;This is a category. Click into it. _IENavigate($oIE,$oLinkHRef) Sleep(3) ;Back out to Category List _IEAction($oIE,"back") EndIf Next _IEQuit($oIE)
-
I have a NDIS based Internet sharing device. I got info about my balance inquiry by clicking a button, it's sending ussd *101# to my provider. This was ok in past but no i have changed provider, all other functions are ok, but new provider uses *100# as valid ussd for geting balance inquiry. So i used #include <IE.au3> $oIE=_IECreate('http://192.168.8.1/html/ussd.html') $sHTML=_IEDocReadHTML($oIE) $sHTML=StringReplace($sHTML,'101#','100#') _IEDocWriteHTML($oIE,$sHTML) to get it. But with this script i can't get the info. It replaces correct in <div id="fun_balanceInquiry" style="display: block;"> <div class="ussd_extend_border"><p><label id="balance_inquiry_description0">Auf Guthaben drücken, um Informationen über Ihr Guthaben zu erhalten.</label></p> <table width="500" border="0" cellspacing="0" cellpadding="0"> <tbody><tr><td height="40" class="cls_ussd_label_BalanceInquiry_action"> <label id="balance_inquiry_result0"></label></td> <td class="align_right" id="balance_inquiry_action0"><span class="button_wrapper" id="#BalanceInquiry0" onclick="javascript:ussd_sendCommand('BalanceInquiry0','*101#','CodeType', 'undefined');return false;"><span class="button_left"><span class="button_right"><span class="button_center">Guthaben</span></span></span></span></td> </tr></tbody></table></div></div> <div id="fun_charge" style="display: none;"> </div> but it seems this included script: <script src="../js/ussd.js" type="text/javascript"></script> is called. In DOM Explorer i see: function onclick(event) { javascript:ussd_sendCommand('BalanceInquiry0','*101#','CodeType', 'undefined');return false; } but i can't write a changed ussd.js back to my internet stick. So my question is how can i change htmlcode in a way calling function onclick with new ussd command?
-
Hello Friends, I need your advise automating Facebook search project. I need to enter a string in a search input box, the inspect element shows me this code: <input name="query" class="inputtext" aria-required="true" aria-label="Search" required="1" type="text" maxlength="100" placeholder="Search this group" value="" autocomplete="off">How to treat it? as a form? as an IE object? Really appreciating your help.
-
Hello guys, I want script that locate text box on webpage and write text in it, problem is that, that website is changing their ID of text boxes. The last few digits of ID(highlighted yellow one) is changing every single time, so i would like to ask if there is way how to solve this. /// It is possible to use only part of ID to localize the text box ? Thanks
-
Hello, I believe I have come across a bug in the _IE library. I am trying to make a script that will automatically fill's in data for a restore script for a WP site. It's called Importbuddy by IThemes and it is one of the best, if not the best, backup restore plugins for WordPress. The problem that I am having is once it is on the first step of the script, filling in the password and clicking next, it redirects me to the index.php file and when I keep trying to return to the importbuddy.php file, it keeps redirecting back to the index file. Here is the code I am using, _$o = _IECreate() _IENavigate($o, [url of ImportBuddy]) _IELoadWait($o, 2000) $step0 = _IEGetObjByName($o, "password");Password feild _IEFormElementSetValue($step0, "pass");Password of Importbuddy $Step0submit = _IEGetObjByName($o, "submit") _IEAction($Step0submit, "click") _IELoadWait($o, 2000) ;Goes to index.html, not the next step of the importbuddy Here is a link to the importbuddy.php file, http://bit.ly/1H9YZNb Please only use this file for testing, it is part of a commercial product by IThemes To keep this simple, just install a program like XAMPP to view the file. Also, the password is "pass" Does anyone have any ideas why this isn't working? As always, Thanks for your help Thomas
-
Hi guys, I need help as I have worked for more than 18 hours in trying to get this resolved but couldn't. There's a registration page that has an iframe and I need to put a check on the checkbox inside that iframe. The iframe's content is pointing to external source. Could anybody please share a complete simple _IE code to put a check on any of the checkbox in that page so I can analyze it and post my solution here? I am having trouble understanding the syntax of AutoIt. I tried this for hours and couldn't get it to work. The checkbox ID is showing as NOMATCH in AutoIt error report so I thought I had to reference the iFrame first but the iFrame too shows as NOMATCH when they are both sitting there.
-
_IEGetObjById and _IEGetObjByName functions use variable of an InternetExplorer.Application, Window or Frame object as reference to find any dom element. Is it possible to use a dom element instead of InternetExplorer.Application, Window or Frame to find target dom element instead the dom element. This will help in finding elements using a parent child relationship where duplicate target dom elements exists on the HTML page. Other automation tools like WebDriver do have this feature. It would be great to have something like this in AutoIt. I love the way AutoIt works!!!!! Especially the IE UDF. Cool stuff from DALE and other developers. Ex - i would like to do something like this, $oIE = _IEAttach("Title") $oParentObject = _IEGetObjById($oIE, "Parent Widget or element Id which contains my target widget in its hierarchy below") $oTargetObject = _IEGetObjById(oParentObject , "Id of widget i would like to find and do some action") _IEAction($oTargetObject, "click") This will help in situations where there are widgets with duplicate ids on the page....Ex - 2 Add buttons with same id on the same page.....One add button to add a CAR...another Add button to add a Vehicle. In this case i cannot click on the exact Add button i want just with the Add button id. i will need reference of their immediate parent object to uniquely identify them.
- 4 replies
-
- _IE
- _IEGetObjById
- (and 4 more)
-
Hi i wrote this code to set values in a form field (IE) to search for numbers and was wondering if i can do the reverse as easy, instead of setting the value i want to retrieve an existing value into an variable for later use? Any ideas would be much appreciated Sample code for setting the value: #include <IE.au3> Local $oIE = _IEAttach("Some Site") WinActivate("Some Site") ;MsgBox(0, "The URL", _IEPropertyGet($oIE, "locationurl")) $oIE.document.all.menu.contentWindow.document.getElementById("Cat_pID002_").childNodes.item(2).childNodes.item(0).click Sleep(300) $oIE.document.all.menu.contentWindow.document.getElementById("Cat_pID021_").childNodes.item(2).childNodes.item(0).click Sleep(300) $oIE.document.all.menu.contentWindow.document.getElementById("cID021_12_").childNodes.item(0).click Sleep(300) $oIE.document.all.data.contentWindow.document.forms.CustomerSearchForm.SEARCH_ORGNO.value = "1234567890" Sleep(300) _IELoadWait ($oIE) Thanx in advance
-
Hello, pls can someone give some tips how to stop error. I have an error in script what stop work. Error code: C:Documents and SettingsTeodesktopodno.au3 (37) : ==> The requested action with this object has failed.: FileWrite($odno, $oLink.href & @CRLF) FileWrite($odno, $oLink.href ^ ERROR script part: Func _GetFriends() $a = $a+1 ConsoleWrite('$a = '&$a) _IELoadWait($oIE) FileDelete(@DesktopDir&"/test.txt") $oLinks = _IELinkGetCollection($oIE) $iNumLinks = @extended ConsoleWrite(' 2. Links Found: ' & $iNumLinks & @CRLF) For $oLink in $oLinks FileWrite($odno, $oLink.href & @CRLF) $check = _StringBetween($oLink.href, "chatWith=", "&tkn=") If not @error then FileWrite(@DesktopDir&'/friends.txt',$oLink.href&@CRLF) $check = _StringBetween($oLink.href, "st.page=","&tkn=") If not @error Then $string=_ArrayToString($check) If $a < 9 Then $result = StringLeft($string, 1) Else $result = StringLeft($string, 2) EndIf If $result > $a Then ConsoleWrite ('I found it: '&$result& ' link: ' & $oLink.href & @CRLF) _IENavigate($oIE,$oLink.href) _GetFriends() EndIf EndIf Next EndFunc ; ==> _GetFriends In 3 lines that have all needed variables.. i think something stop it on line 1. I have tried to make something like if $oLinks.href == '' then exitloop But that code also give error on "$oLinks.href" That work successful when $iNumLinks is about 40.. but in case of ~25 that always give error.. Thank you so much for any tips.
-
Hello, i try to parse some info from one site, just for fun and experience. But have some problems, while parsing can't find needed formula, to make it more easy and performance, can someone help. Critics allowed, i know code is very bad.. sorry long time no sleep. Trouble part: I have removed coz question is to stupid ^^ sry for spam. Thanks in any case.