Dequality

Search for text.

18 posts in this topic

#1 ·  Posted

Can anyone tell me if its possible to make autoit search for text? (im trying to search for a button a pop up(the color changes every time so i cant use img search) so i thought why not try using text search if possible) , the text is following: 'OK', 'Okay', 'Tak', 'Fedt'.

I've searched around most possibilities i found was img search which doesnt work cuz of the color change.. ^^

Any help are HIGHLY appreciatet.

-Dequality.

Share this post


Link to post
Share on other sites



#2 ·  Posted

Edit: it would be even cooler if i could make it so that it's "Controlled" so i can minimize the browser while the script runs if not then it's all cool as long as i can make this work im happy! :D

Share this post


Link to post
Share on other sites

#3 ·  Posted

Deja Vu ...  you simply continue to give hardly any info and expecting an answer?

So the answer to your initial question is: Yes, AutoIt can search for text when text is available.
Now are you searching for real text or are you searching for a image which contains a graphical representation of  text?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#4 ·  Posted

Jos? .. i said its searching for a pop up window with a button inside? what else do you want me to explain? it's a window inside a browser which pops up, cant be pressed with space/enter or anything else THAN a mouse click ? the background is color changing everytime the pop up is comming, so it simply need it to search for the 4 words in the topic if one of them is found click the location :)

Let me know if you need any other info.

-Dequality.

Share this post


Link to post
Share on other sites

#5 ·  Posted

I though I asked a simple question in my post which isn't answered yet...no? ;) 

40 minutes ago, Jos said:

Now are you searching for real text or are you searching for a image which contains a graphical representation of  text?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Well it's a image with a button i guess? i honestly got no clue what you consider 'real text'? if 'real text' is text you can CTRL+A on then No, it isnt real text ^^ then it's a graphical representation..  :)

Edited by Dequality

Share this post


Link to post
Share on other sites

#7 ·  Posted

Just now, Dequality said:

Well it's a image with a button i guess?

So how do you expect us to know the answer when you don't know? 
Start AU3Info and see if you can get some more information about the readable text etc. :)

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#8 ·  Posted

 

1 minute ago, Jos said:

So how do you expect us to know the answer when you don't know? 
Start AU3Info and see if you can get some more information about the readable text etc. :)

Jos

Well Au3info cant target the pop up ;) it is inside a window

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

9 minutes ago, Jos said:

So how do you expect us to know the answer when you don't know? 
Start AU3Info and see if you can get some more information about the readable text etc. :)

Jos

Well.. it's a pop up inside a pop up window and that window is running shockwave or smth like that ^^

 

EDIT : But of what i can find in the source code on the website it's a GIF (its not animated) but apparently it's saved as a gif :) 

Edited by Dequality

Share this post


Link to post
Share on other sites

#11 ·  Posted

Guess we are again in that endless loop of "not enough information to be able to help you without more information", so I am done trying.
good luck with whatever you are trying.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#12 ·  Posted

2 minutes ago, Jos said:

Guess we are again in that endless loop of "not enough information to be able to help you without more information", so I am done trying.
good luck with whatever you are trying.

Jos

Well, i dunno what you expect tbh.. im pretty sure it's a image/graphical 'representation' with text cant you jsut tell me how to do it ? then i will test it out :)

Share this post


Link to post
Share on other sites

#13 ·  Posted

41 minutes ago, Dequality said:

i dunno what you expect tbh..

Don't be shy and just provide the link to this website or the source code of the page  :)

Share this post


Link to post
Share on other sites

#14 ·  Posted

1 minute ago, mikell said:

Don't be shy and just provide the link to this website or the source code of the page  :)

https://pastebin.com/wY05rB7j

That is what i've been able to find about the object :)

Share this post


Link to post
Share on other sites

#15 ·  Posted

4 minutes ago, mikell said:

Don't be shy and just provide the link to this website or the source code of the page  :)

 

while(1)
    $x1=0
    $y1=0
    $ok = "C:\Users\Dequality\Documents\Au3_Scripts\SCRIPT\ns_ok.PNG"
    $okay = "C:\Users\Dequality\Documents\Au3_Scripts\SCRIPT\ns_okay.PNG"
    $tak = "C:\Users\Dequality\Documents\Au3_Scripts\SCRIPT\ns_tak.PNG"

    $box1 = _ImageSearch($ok, 1, $x1, $y1, 5, 255)
    ;_ImageSearch($FindImage, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transperance = 0)

    $box2 = _ImageSearch($okay, 1, $x1, $y1, 5, 255)
    ;_ImageSearch($FindImage, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transperance = 0)

    $box3 = _ImageSearch($tak, 1, $x1, $y1, 5, 255)
    ;_ImageSearch($FindImage, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transperance = 0)

;~  $box4 = _ImageSearch($ok, 1, $x1, $y1, 5, 255)
;~  ;_ImageSearch($FindImage, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transperance = 0)

    If $box1 = 1 Then
        MouseClick("LEFT", $x1, $y1, 1, 1)
    ElseIf $box2 = 1 Then
        MouseClick("LEFT", $x1, $y1, 1, 1)
    ElseIf $box3 = 1 Then
        MouseClick("LEFT", $x1, $y1, 1, 1)
    EndIf


WEnd

What i tried was making the background of the button black & made transperance 255 but then it just clicks on the firefox logo in top left :/

Share this post


Link to post
Share on other sites

#16 ·  Posted

Looking at the PASTEBIN source the question arises how you think this is not against our forumrules?
Not sure we already pointed you before to them so let me do that now. Please read them and ensure you stick to them.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#17 ·  Posted

Just now, Jos said:

Looking at the PASTEBIN source the question arises how you think this is not against our forumrules?
Not sure we already pointed you before to them so let me do that now. Please read them and ensure you stick to them.

Jos

Well arent it just against the rules to make a game bot? ;) this isnt a game it's a chat

Share this post


Link to post
Share on other sites

#18 ·  Posted

You know why your intentions are questioned right? 
You constantly avoid to give exact details as requested, remain vague with everything you do and the little bit you post clearly shows this is on a Games side.

So I am done playing this hide and seek game with you and this thread is now locked.
Don't start a new one on the same topic and only come back when you are prepared to ask explicit questions!

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Similar Content

    • DiveHigh
      By DiveHigh
      Hello There!  
      I've encountered a small issue i just cant seem to program my way out of...

      What im doing is:        ;or rather, what im trying to do is
      Pixelsearch for a color, within a part of my screen,
      If color is present, i will rightclick it, for a menu to appear,
      in which i want to Leftclick an option. Simplicity itself.   

      The issue is that because this menu appears in different parts of my screen, its complicated to select the option i want to click.
      There is no special color to it, and i cannot define the area in which to click, because the menu appears different places.
      The only thing that is in common for the menu is that the Leftclick needs to be (lets say) 30pixels below the rightclick
      .

      What can be done,  but seemingly not by me, is to get the coordinates of the rightclick, and use them as the "starting point" from where the coordinates for the leftclick will be.
      (Not sure if that makes sence, but maybe the code below will help you understand)

      You guys like example codes, so therefore i will give it my best shot, and hope it proves usefull

      $pos = Pixelsearch(200, 400, 200, 400, 0xFFFFFF)        ;This color is what i need to rightclick to bring up the menu
      If not @Error then                                                               ;If the color is present
      (Mouseclick("Right", $pos[0], $pos[1], 1, 1)                   ;Rightclick it, to bring up menu
      ;Here comes the part i cannot get to work
      $x = MousegetPos(X)                                                          ;To get the Coordinate "X", so we can calculated with it for the position of the leftclick
      $y = MousegetPos(Y)                                                           ; To get the Coordinate "Y", so that can be calculated with for the position of the leftclick

      MouseClick("Left", $x[0], $y-30[1], 1, 1)                         ;This was supposed to give me a leftclick that is 30pixels below the rightclick.
      (The MouseGetPos(X), may seem as a waste of space in this example, but in my script i will need both. 
              Im only using one in the example, mainly so that i wont confuse myself, but also to make it easier to digest for you guys)


      I have not been able to find any topic that covers this, but my apologies if such a topic already exist in the forums. 

      Maybe while im at it, can i ask,   what good does the [0] and [1] do, when using a "$variable" as coordinate?   


      Thanks in advance
      - DiveHigh
    • galan2015
      By galan2015
      yo, i need some help.

      Im training with _StringsBetween, on big site! Alot fun, My script turned 8 times created a text file with a weight of 1GB. I saw that in the file was a lot of repetition. Is it possible to somehow set the string to save the file, only one URL without repetition?
      #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <INet.au3> #include <StringConstants.au3> #include <File.au3> ;I'm coming for blood, no code of conduct, no law. ;I'm coming for blood, no code of conduct, no law. #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 1211, 812, 43, 110) $Button1 = GUICtrlCreateButton("Button1", 0, 8, 249, 81) $Button2 = GUICtrlCreateButton("Button2", 350, 8, 249, 81) $Edit1 = GUICtrlCreateEdit("0", 8, 128, 609, 257, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN)) $Edit2 = GUICtrlCreateEdit("2", 632, 0, 577, 809) GUISetState(@SW_SHOW) #EndRegion ### END Koda local $iFileSize = FileGetSize('') Func VisitFrontPage() local $Liczba = _FileCountLines(@ScriptDir&'\data\links.txt') local $liczba2 = GUICtrlSetData($Edit1,Random(1,$Liczba,1)) local $Liczba3 = GUICtrlRead($Edit1) local $Liczba4 = FileReadLine(@ScriptDir&'\data\links.txt',$Liczba3) $data = _INetGetSource ( FileReadLine(@ScriptDir&'\data\links.txt',Random(1,$Liczba,1))) $linki = StringRegExp($data, '<a href="http://www.wykop.pl/link/(.*?)/" title=""',3) For $q = 0 To UBound($linki) -1 FileWrite(@ScriptDir&'\data\links.txt','http://www.wykop.pl/link/'&$linki[$q]&@CRLF) Next $linki = StringRegExp($data, 'href="http://www.wykop.pl/ludzie/(.*?)/">',3) ; pobieranie ludzi co dodali znaleziska For $w = 0 To UBound($linki) -1 FileWrite(@ScriptDir&'\data\links.txt','http://www.wykop.pl/ludzie/'&$linki[$w]&@CRLF) Next $linki = StringRegExp($data, '<a href="http://www.wykop.pl/ludzie/(.*?)/" title="',3) ; pobieranie ludzi co sa na stronie z mikro For $e = 0 To UBound($linki) -1 FileWrite(@ScriptDir&'\data\links.txt','http://www.wykop.pl/ludzie/'&$linki[$e]&@CRLF) Next $linki = StringRegExp($data, '<a class="tag create" href="http://www.wykop.pl/tag/(.*?)/"><em>',3) ; pobieranie ludzi co sa na stronie z mikro For $r = 0 To UBound($linki) -1 FileWrite(@ScriptDir&'\data\links.txt','http://www.wykop.pl/tag/'&$linki[$r]&@CRLF) Next $linki = StringRegExp($data, '<class="showTagSummary" href="http://www.wykop.pl/tag/(.*?)">',3) ; pobieranie ludzi co sa na stronie z mikro For $t = 0 To UBound($linki) -1 FileWrite(@ScriptDir&'\data\links.txt','http://www.wykop.pl/tag/'&$linki[$t]&@CRLF) Next $linki = StringRegExp($data, 'href="http://www.wykop.pl/ludzie/(.*?)/" title=""',3) ; pobieranie ludzi z znaleziska, komentarze For $a = 0 To UBound($linki) -1 FileWrite(@ScriptDir&'\data\links.txt','http://www.wykop.pl/ludzie/'&$linki[$a]&@CRLF) Next $linki = StringRegExp($data, 'href="http://www.wykop.pl/tag/index/(.*?)/"',3) ; pobierane tagi ze znaleziska, For $s = 0 To UBound($linki) -1 FileWrite(@ScriptDir&'\data\links.txt','http://www.wykop.pl/tag/index/'&$linki[$s]&@CRLF) Next $linki = StringRegExp($data, '<a class="clearfix" href="http://www.wykop.pl/link/(.*?)/?utm_source',3) ; pobierane znaleziska z prawego menu For $d = 0 To UBound($linki) -1 FileWrite(@ScriptDir&'\data\links.txt','http://www.wykop.pl/link/'&$linki[$d]&@CRLF) Next Sleep(5000) GuiCtrlSetData($Edit2, GuiCtrlRead($Edit2)+1) _FileWriteToLine(@ScriptDir&'\data\links.txt',GuiCtrlRead($edit1),'',1) VisitFrontPage() EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $Button1 Case $Button2 VisitFrontPage() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd  
    • forever0donotknowme
      By forever0donotknowme
      hi my friends,

      please can you check next link




      i want to know if there is any dos command that perform same work / disable access to folder or file
    • Tuurngait
      By Tuurngait
      Okay so basically I have another problem with my script again, Not exactly the script it's self but more finding how to add a certain pixel color into it. I've made a few attempts and got it close but not close enough. I'm trying to make the mouse hover over the Pause Button on my Media Player. I'll add the Pixel color into the attachments. If someone could show me how to find the Pixel color in the form of the line "PixelSearch( 0, 0, $i, 768, 0xFF0000, 10 )" then I'd be the most greatful noobie that ever existed
      misc4.au3