Jump to content

Paranthaman

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by Paranthaman

  1. Hi Everyone, I am a beginner and I am currently learning and practicing what Autoit can do, so kindly pardon if it sound's silly. What my program does ----> I had written a program where I have a FOR (i=0 to n) loop which is running for n times. Inside the FOR loop, contents of array is written into excel using _Excel_RangeWrite . _Excel_RangeWrite($oExcelDoc, $oExcelDoc.Activesheet, $arrayname, "A1") Problem ------> During every loop run the contents of column A is only altered What i intend to do ------> For every loop run (i=0,1,2,3...) I want to write the array contents into respective next adjacent excel columns i.e) For i=0 loop, every array content should be written in A Column of excel For i = 1 loop, every array content should be written in B Column of excel. Can anyone give me an idea of how can i do this? Thanks
  2. Yes that's a JSON output, will start learning JSON UDF Soon .Thanks for help
  3. Tht's it It worked as I wanted. Thanks a lot @iamtheky @mikell .
  4. Hi Everyone, i am a complete beginner to autoit and i am in a learning stage,so if this question looks so dumb,pls pardon me. Can anyone help me with a code where i want to take only particular values from a text and store it to array I have shared the input text which i have in below code window and i want to take only text's inside the Value tag ex: "Value":"Copy_anything_inside_this" i.e: "Value":"Jan 2016" ---->Copy Jan 2016 into a array[0,0] "Value":"5.99" --->Copy 5.99 into a array[0,1] etc { "records":[ { "checkbox":{ "marked":false, "rowNum":"0", "sortable":false }, "0":{ "value":"Dec 2015" }, "1":{ "id":"0_0", "value":"6.38" } }, { "checkbox":{ "marked":false, "rowNum":"1", "sortable":false }, "0":{ "value":"Jan 2016" }, "1":{ "id":"0_1", "value":"5.99" } }, { "checkbox":{ "marked":false, "rowNum":"2", "sortable":false }, "0":{ "value":"Feb 2016" }, "1":{ "id":"0_2", "value":"5.73" } }, { "checkbox":{ "marked":false, "rowNum":"3", "sortable":false }, "0":{ "value":"Mar 2016" }, "1":{ "id":"0_3", "value":"6.51" } } ], "recordsReturned":12, "totalRecords":12, "pageSize":25, "startIndex":0, "sort":"Timestamp", "dir":"ASC", "pclassid":0, "metadata":[ ] } Can anyone give me a rough idea how can i do this?
  5. Thank you so much, it worked . Used StringRight to 3 characters with "-ID" and it clicked . Thanks a lot.
  6. Sorry for being in such a hurry , would never repeat this again @mLipok @water
  7. i need something like SQL Operator % . SELECT * FROM CustomersWHERE Country LIKE '%land%';
  8. It is working fine for "Random-1-ID" but on next refresh for "Randowm-2-ID" it fails.
  9. Hi, I want to click a link by the element ID through IEGetObjById. <!DOCTYPE html> <html> <body> <button type="button" id="Random-1-ID" onclick="alert('Hello world!')"></button> </body> </html> I intend to click the button with ID"Random-1-ID". But on every refresh the ID changes to next number like "Random-2-ID" "Random-3-ID" The code i which i wrote for this function is #include <IE.au3> #include <MsgBoxConstants.au3> Local $oIE = _IECreate("I:\Documents\1. Work\Automation\My codes\Collections\11. Clicking button by Value and ID\button.html") Local $oDiv = _IEGetObjById($oIE, "Random-1-ID") _IEAction($oDiv, "click") _IELoadWait($oIE) So can anyone help me to alter this code like it clicks for every ID in format "Random-%-ID"
  10. Thanks for helping out. but I tried that too, instead of redirecting to " https:capserver.root.net:8000/console/analyse/freesearch.do?operation=search&searchtext=tag%3AProduction" it is redirecting to "I:\console\analyze\freesearch.do" Any help?
  11. @Juvigy The code which i had written doesn't seems to work and so I thought if I post that, it will be confusing for others too. But still,will add that here Local $oIE = _IECreate("capserver.root.net:8000/console/analyse") ;Opened the website ;Collected all frames Local $oFrames = _IEFrameGetCollection($oIE) Local $iNumFrames = @extended ;Total no of frames available Local $oFrame = 0 $i = 3 ;To select iframe name="main which is 4th in order $oFrame = _IEFrameGetCollection($oIE, $i) ;Fecth all properties from iframe no4 $sTxt2 = _IEPropertyGet($oFrame, "locationurl") ;Fetch the iframe no4's url and store in sTxt2 Local $oIE2 = _IECreate($sTxt2) ;Open the iframe no4 url Local $sMyString = "Production," ;"String to Search and open the link which has this as text Local $oLinks = _IELinkGetCollection($oIE2) ;Returns all link in the document For $oLink In $oLinks ;Searches for all links and click that one with text "Production," Local $sLinkText = _IEPropertyGet($oLink, "innerText") If StringInStr($sLinkText, $sMyString) Then _IEAction($oLink, "click") ExitLoop EndIf Next 1.It's not running and i can't figure out the reason 2. Also if it run's , when I fetch that Iframe link and open it again at line " Local $oIE2 = _IECreate($sTxt2) " the page gets expired .So is there any function to read the link inside iframe ,without opening it in a seperate window. pls guide me how I need to proceed
  12. Hi Danp2, Updated the questions with more clarity,details and attached HTML code for reference. Thanks
  13. Hello, I'm trying to manipulate IE but the webapplication is using frames. All frames are using JS and Autoit doesn't seem to find any of the frames. I have seen there is a bunch of similar topics, but for some reason (probably because I´m really a beginner with AutoIt and do not have other programming experience) what I have seen there didn´t really help me. <frameset class="level1" rows="95,*" border="0" frameborder="0" framespacing="0" id="bco-level1-frameset"> <frame src="topbar.jsp?liferaypageid=&amp;bcoCommunityId=&amp;defaultsection=APPLVIEW&amp;actionid=" name="topbar" scrolling="no" noresize="noresize"> <frameset class="level2" frameborder="1" framespacing="1" border="4" cols="220,*"> <frame src="sidebar.jsp" name="menu" scrolling="no"> <frame src="" name="main" scrolling="auto"> </frameset> </frameset> The link which i want to click is within frame name= main. In <frame src="" name="main" scrolling="auto"> am having the following tags <div class="actionItemDesc button "> <div class="size16X16"> <a title="" class="treeurl voidfunc" href="javascript:voidFunc();"> <span class="size16X16 iconContainer tagtype" style="background-color:#000099"> </span> </a> </div> <span class="actionLinks "> <a class="actionItemName" href="/production.html" title="">Production,</a> </span><!--[if IE]> <![endif]--> </div> The link which i try to click is <a class="actionItemName" href="/production.html" title="">Production,</a>. Can anyone help?
  14. Hi all, I am new to AUTOIT and i doubt this would be a silly doubt to ask ,but as i was not able to figure it out for more than a day I am asking here I'm having trouble in using _IELinkclickbytext function .I am trying to click a link with the following html syntax but not able to do. HTML Code <span class="actionLinks "> <a class="actionItemName" href="/console/analyze/addtoquickanalysis.do?id=26041672&structureid=SYS&appid=2279" title="Add to Quick Analysis">CPU <wbr></wbr>Util<wbr></wbr>izat<wbr></wbr>ion <wbr></wbr>%</a> </span> Auto IT code I used Local $sMyString = "CPU" Local $oLinks = _IELinkGetCollection($oIE) For $oLink In $oLinks     Local $sLinkText = _IEPropertyGet($oLink, "innerText")     If StringInStr($sLinkText, $sMyString) Then         _IEAction($oLink, "click")         ExitLoop     EndIf Next Can anyone help me where i am wrong.
×
×
  • Create New...