Jump to content
Epic007

Copy text from a specific website

Recommended Posts

Epic007

Hey guys I'm stuck with a program.....I need a make an automation which copies text from a chat bot app and paste it in notepad to log the replies of my chat bot and to analyse stuff....a lil help pls

 

 

 

 

 

 

 

Thanks in advance

Share this post


Link to post
Share on other sites
Epic007

Hey guys I'm stuck with a program.....I need a make an automation which copies text from a chat bot app and paste it in notepad to log the replies of my chat bot and to analyse stuff....a lil help pls

 

 

 

 

 

 

 

Thanks in advance

Share this post


Link to post
Share on other sites
caramen

Hello there :)

 

May you can look at this and make again your help request ? 

Paticulary this part: 

Quote
  • Include a detailed description of what you are trying to do, what you have tried on your own, and what problem/error you are experiencing: "Doesn't work" or "AutoIt's broke" doesn't cut it. Forum members are also here to help you write and improve your own scripts; this is not a forum where you put in an order and someone writes the code for you.
  • Always Post Code: Even if the code is not doing what you want it to, posting the code you are working from rather than asking forum members to guess is always going to result in more rapid assistance. If you cannot post the code for business reasons, create a script that reproduces the issue you are seeing.

I will be back to you soon :) 

Edited by caramen

My video tutorials : HERE ( In construction ) 

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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Epic007

Hey buddy I read those.....I'm just having the problem of pressing keys simutaneously.....eg: ctrl+alt+del....at the same time.....when I use the Send function...it doesn't work....help pls..

Share this post


Link to post
Share on other sites
caramen

Why make a second post ? 

 

Same unswer : 

Read this : 

Quote
  • Include a detailed description of what you are trying to do, what you have tried on your own, and what problem/error you are experiencing: "Doesn't work" or "AutoIt's broke" doesn't cut it. Forum members are also here to help you write and improve your own scripts; this is not a forum where you put in an order and someone writes the code for you.
  • Always Post Code: Even if the code is not doing what you want it to, posting the code you are working from rather than asking forum members to guess is always going to result in more rapid assistance. If you cannot post the code for business reasons, create a script that reproduces the issue you are seeing.

 


My video tutorials : HERE ( In construction ) 

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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Epic007

Sorry....I don't know how to delete a post...and I created one by mistake...

Share this post


Link to post
Share on other sites
caramen
Just now, Epic007 said:

Hey buddy I read those.....

Please. Follow what you readed then. 

It 's not yet the case.

 

If you could say exactly what are you trying to accomplish and post your code. It will be fine.


My video tutorials : HERE ( In construction ) 

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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Epic007

Brainia is the name of the chat bot app....i need to press ctrl+alt+space simultaneously....help pls....the send function is not workin

oew.png

Share this post


Link to post
Share on other sites
Epic007

Thats the interface of the bot.....i want to copy the text from it and paste it on notepad...to log the replies of the bot only....help plssss

oew.png

Share this post


Link to post
Share on other sites
VIP
20 minutes ago, Epic007 said:

Brainia is the name of the chat bot app....i need to press ctrl+alt+space simultaneously....help pls....the send function is not workin

oew.png

You can try:

#RequireAdmin
Send("^!{SPACE}")


Application "Braina - Human Language Interface" use QtGui - QWidget 
Its not GUI standard Windows, AutoIt can not use  ControlGetText() to read text.
I think you can use Send() to automate some of the selected and copy text.

GoodLucky!


Regards,
 

Share this post


Link to post
Share on other sites
Epic007

Guys i tried pixel searching x and y axes separately but it gives an error pls help...#this is only the part of the code....of a compex big code which i made

MouseMove(539, 718, 0)

Local $pix=PixelGetColor(539,718);
Local $pix2=0;

Do
   $pix2=PixelGetColor(539+$x,718);
  If $pix<>$pix2 Then
     $x=$x+1;
  Else
   MouseMove(539+$x,718, 0)

  EndIf

  Until $pix<>$pix2


Do

   $pix2=PixelGetColor(539+$x,718+$y);
  If $pix<>$pix2 Then
     $y=$y+1;
   Else
     MouseClickDrag ($MOUSE_CLICK_LEFT,539,718,539+$x,718+$y,0)
EndIf

 Until $pix<>$pix2

 

op.png

Share this post


Link to post
Share on other sites
BrewManNH
1 minute ago, Epic007 said:

but it gives an error pls help

The error message TELLS you what the problem is. Declare $x with a value and that will go away.

 


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
Epic007

 

 

Yep..I put $x=0....still the code is not working...instead my mouse gets stuck on a specific coordinates.....any ideas???🐒.....

 

 

Thanks in advance

Edited by Epic007
Lil mistakes

Share this post


Link to post
Share on other sites
Epic007

Yep..I put $x=0....still the code is not working...instead my mouse gets stuck on a specific coordinates.....any ideas???🐒.....

 

19 hours ago, BrewManNH said:

The error message TELLS you what the problem is. Declare $x with a value and that will go away.

 

Thanks in advance

Share this post


Link to post
Share on other sites
Epic007

Guys.....Im currently analysing various chatbots....in online.....I need to copy the chat bot replies and paste them in notepad after each reply

 

Here's the link of the chatbot.....whose text I need to copy...

http://www.mitsuku.co.uk

 

 

Please give me the code....thanks in advance

Share this post


Link to post
Share on other sites
Danp2
3 minutes ago, Epic007 said:

Please give me the code....thanks in advance

Sorry, but we don't just barf up code on demand. The expectation is for you to actually put in some effort and then post your code for further assistance.

P.S. How is this thread different from your prior one?

Share this post


Link to post
Share on other sites
Epic007
On 10/11/2018 at 11:13 PM, Jos said:

Stick to one thread please and show some effort from your side.

Jos

Sorry.... my bad

Edited by Epic007

Share this post


Link to post
Share on other sites
Epic007
On 10/11/2018 at 11:00 PM, Epic007 said:

Guys.....Im currently analysing various chatbots....in online.....I need to copy the chat bot replies and paste them in notepad after each reply

 

Here's the link of the chatbot.....whose text I need to copy...

http://www.mitsuku.co.uk

 

Anyone???help pls....just tell me how to access the reply of the chatbot....I'm bad at getting the HTML codes from websites...any suggestions or ideas ????...I'll write the code....give me ideas

Edited by Epic007

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • XinYoung
      By XinYoung
      HI! ... this is a big one (at least for me) 
      You guys previously helped me copy the used range in column A and paste them into a Website one at a time in a loop. Cool! Now, for another function, I have 2 columns, A and B, and two input boxes in the Website. I'm having a hard time replicating the loop for the 2 columns. 
      This is how I'm opening the Excel workbook (copied from the previous function that only had 1 column). I need to also get the used range in column B.
      Func OpenExcelForCopy() Global $aBBTableData Global $oExcel = _Excel_Open() Global $oWorkbook = _Excel_BookOpen($oExcel, $ChosenFileName, Default, True, True) $oExcel.Sheets("CopyCourses").Activate ;~ Get all used cells in column A:A Global $aSearchItems = _Excel_RangeRead($oWorkbook, 1, $oWorkbook.Sheets("CopyCourses").Usedrange.Columns("A:A")) ;~ Duplicate the $aSearchItems Array Global $aSearchResult = $aSearchItems ;~ Loop through the array starting at 0 until the end of the array which is (Ubound($aSearchItems) - 1) For $i = 0 To UBound($aSearchItems) - 1 $aSearchResult[$i] = SearchCourseForCopy($aSearchItems[$i]) Next _Excel_RangeWrite($oWorkbook, Default, $aSearchResult, "C1") Finished() EndFunc ;==>OpenExcelForCopy Then we eventually get here. I don't think anything needs to change here but I'm not sure. This is where I paste the data from Column A into an input field (which is a search tool in a website). If the search is good, then we get to the tricky part...
      ;~ OK, we logged in and we searched for a course. Lets COPY it! Func CopyCourseBegin() Local $sResult $iSearchIndex = _ArraySearch($aBBTableData, "Course ID", 0, 0, 0, 1, 1, 0) ;~ If the course was not found, do this. If $iSearchIndex = -1 Then ;~ MsgBox(4096, "Search Error", "Item not found") $sResult = "Source Not Found" _Excel_RangeWrite($oWorkbook, Default, $aSearchResult, "C1") ;~ Now go back to the Excel sheet and search for the next one. ;~ If the course was found, begin the COPY process. Else For $i = 0 To UBound($aSearchItems) - 1 $aSearchResult[$i] = CopyCourseNow($aSearchItems[$i]) Next $sResult = "Copied" _Excel_RangeWrite($oWorkbook, Default, $aSearchResult, "C1") EndIf Return $sResult EndFunc ;==>CopyCourseBegin This is the "tricky part" where I'm confused. I can copy and paste what's in column A just fine, but I can't manage to replicate it for column B. I need to paste whats in Column B into "destinationCourseId"
      ;~ The course search was successful. COPY the course now. Func CopyCourseNow($_sSearchResult) ;~ Navigate to the course copy page. _IENavigate($oIE, $urlBBCourseCopy) ;~ Copy the SOURCE course ID from the Excel sheet ;~ Paste whats copied from column A into the Source Course ID text box Local $oForm = _IEGetObjByName($oIE, "selectCourse") Local $oSearchString = _IEFormElementGetObjByName($oForm, "sourceCourseId") _IEFormElementSetValue($oSearchString, $_sSearchResult) ;~ Paste whats copied from column B into the Destination Course ID text box ?!?!?!?! Local $oForm = _IEGetObjByName($oIE, "selectCourse") Local $oSearchString = _IEFormElementGetObjByName($oForm, "destinationCourseId") _IEFormElementSetValue($oSearchString, $_sSearchResult) ;~ Just exit cause im stuck :( _Exit() EndFunc ;==>CopyCourseNow After I paste the data from column A into "sourceCourseId" and column B into "destinationCourseId", I'll make it do some stuff. Then I need it to loop around until the used ranges in column A & B is finished.
      Does the entire code need to change now that there's two columns?
       
       
    • vin1
      By vin1
      i have a script that selects  a text file and deletes a line (text input required) in the text file selected
      i have to make it remove all lines found on a file i name, toRemoveLines.txt
      it has to remove lines from all text files found in a folder
      this is the script that has to be modified
      where it says "select file" it has to be "select folder"
      where it says "line text input" it has to be all lines from a text file
      #Include <File.au3> Global $success = False $file_name = FileOpenDialog("Select file", @ScriptDir, "All files (*.*)", 1+4) $line_text_input = InputBox("Line's text", "Line must contain following text:", "line contains this text") $file_count_lines = _FileCountLines($file_name) for $i = 0 to $file_count_lines $Lines_text_output = FileReadLine($file_name, $i) if StringInStr($Lines_text_output, $line_text_input) then _FileWriteToLine($file_name, $i, "", 1) $success = True ExitLoop EndIf Next if $success = True Then MsgBox(0, "Success", "Line has been deleted") Else MsgBox(0, "Failure", "Line wasn't found") EndIf  
    • nooneclose
      By nooneclose
      I need to send a string of text to this popup and click on the ok button to save it.
      Here is the code I have so far:
      ;Start IE Sleep(7000) $oIE = _IECreate("http://www.google.com") Sleep(500) _IELoadWait($oIE) $hIE = _IEPropertyGet($oIE, "hwnd") ; Get Handle of the IE window Sleep(500) WinSetState($hIE, "", @SW_MAXIMIZE) ;Wait for a browser page load to complete Sleep(3000) _IENavigate($oIE, "https://properURL.com") Sleep(8000) _IELoadWait($oIE) ;Attach to a browser control embedded in another window $oIE = _IEAttach("https://"properURL.com", url") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $oIE = ' & $oIE & @CRLF & '>Error code: ' & @error & ' Extended code: 0x' & Hex(@extended) & @CRLF) ;### Debug Console Sleep(2000) ;Get the title of the webpage ;Local $wTitle = _IEPropertyGet($oIE, "title") ;MsgBox($MB_SYSTEMMODAL, "Webpage title:", $wTitle) ;Clicks the new button Sleep(3000) _IEAction($nWorkOrderB, "focus") _IEAction($nWorkOrderB, "click") Sleep(5000) ;Store the Element names where the important data will be sent ;Store the long description button Local $wLongDButton = _IEGetObjById($oIE, "m65d795a4-img") ;Store the long Description field id Local $wComments = _IEGetObjById($oIE, "ma6499a9c-rte_iframe") ;Store the ok button id that is in the long description Local $wCommOk = _IEGetObjById($oIE, "m74031266-pb") ;******************************************************************************* ; Send the stored data to the proper field ;******************************************************************************* ;Click the long description button Sleep(300) _IEAction($wLongDButton, "focus") _IEAction($wLongDButton, "click") Sleep(300) ;Sends the Comments Sleep(500) _IEAction($wComments, "focus") _IEAction($wComments, "click") Sleep(500) _IEFormElementSetValue($wComments, "hello darkness my old friend") ;Click the ok button Sleep(500) _IEAction($wCommOk, "focus") _IEAction($wCommOk, "click") Sleep(500)  
      Here is the popup:

    • reida
      By reida
      Hello. Help to write the text.
      <textarea tabindex="4" class="js-input compose__labels__input" style="width: 407px; max-width: 413px;" wrap="off" autocomplete="off" data-original-name="To"></textarea>  I can not make.
      #include <IE.au3> $sLogin = 'adv' $iError = 1 $sUrl = 'https://......' $oIE = _IECreate($sUrl) ;;; _IELoadWait($oIE) $oLogin = _IEGetObjByName($oIE, "To") Sleep(7000) If IsObj($oLogin) Then _IEFormElementSetValue($oLogin, $sLogin) _IELoadWait($oIE) ; EndIf EndIf Through the selector it can be possible?
      #toolkit-154163367424641composeForm > div:nth-child(1) > div > div.compose-head__content.js-collapsed-off > div.compose-head__row-wrapper.compose-head__row-wrapper_to.js-row > div > div > div:nth-child(2) > div > div > div > textarea.js-input.compose__labels__input  
    • cramaboule
      By cramaboule
      Hi all,
       
      I was wondering if it is possible (and how) to put text on video on-the-fly (like VLC displays Title movie at the begining)
      and of course doing that in AutoIt
      Thanks in advance...
       
      C.
×