Jump to content

MrDjBthu

Members
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

MrDjBthu's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. hey pixelsearch! tested your script and it works like a charm. ill go ahead and replace the one i wrote with it Cheers!
  2. hi again and thanks for another answer pixelsearch! like i said im quite a beginner here so pretty much im just winging it with the code. i did manage to get it working though its something that a neanderthal would write ( as code ) : $sPageContent = ClipGet() $searchstring11 = "05:30" $searchstring12 = "04:30" $searchstring13 = "06:00" $searchstring22 = "23:30" $searchstring23 = "00:30" $searchstring24 = "23:00" $searchstring33 = "20:00" $searchstring34 = "15:30" $searchstring35 = "16:30" $searchstring36 = "17:30" $searchstring37 = "18:00" If StringInStr($sPageContent, $searchstring11) Then MouseClick("left", 370, 995) Send("11") ElseIf StringInStr($sPageContent, $searchstring12) Then MouseClick("left", 370, 995) Send("11") ElseIf StringInStr($sPageContent, $searchstring13) Then MouseClick("left", 370, 995) Send("11") ElseIf StringInStr($sPageContent, $searchstring33) Then MouseClick("left", 370, 995) Send("6") ElseIf StringInStr($sPageContent, $searchstring34) Then MouseClick("left", 370, 995) Send("6") ElseIf StringInStr($sPageContent, $searchstring35) Then MouseClick("left", 370, 995) Send("6") ElseIf StringInStr($sPageContent, $searchstring36) Then MouseClick("left", 370, 995) Send("6") ElseIf StringInStr($sPageContent, $searchstring36) Then MouseClick("left", 370, 995) Send("6") ElseIf StringInStr($sPageContent, $searchstring22) Then MouseClick("left", 370, 995) Send("3") ElseIf StringInStr($sPageContent, $searchstring23) Then MouseClick("left", 370, 995) Send("3") ElseIf StringInStr($sPageContent, $searchstring24) Then MouseClick("left", 370, 995) Send("3") Sleep ( 1000 ) EndIf and looking at what you wrote i first need to figure out what that exactly does / translate it into something that i can think with/about. basically youve added the - 11 , - 6 and - 3 into my predefined strings that i would be searching for , but when doing the actual search you are only searching the first 5 characters and if the search finds something you tell it to sendus whats after character 9 in our predefined strings, correct ? im not exactly sure what this if does : If $searchstring[$i] <> "" Then im guessing its meant to keep the For above going and increment the $i so that it passes through all our searchstrings ? ill give this a try tomorrow when at work and will let you know. as right now im beat and the only thing i want is to open a beer and relax for the rest of the evening. again, much appreciated man!
  3. aaaaaand im stuck again. keep trying to get all my star times together but im getting this message that im missing a Next on line 37. What am i doing wrong ? #include <MsgBoxConstants.au3> MouseClick("left", 1370, 940) Send("^a") Sleep( 1000 ) Send("^c") Sleep( 1000 ) $sPageContent = ClipGet() $searchstring11 = "04:30" $searchstring12 = "05:30" $searchstring13 = "06:00" $searchstring22 = "23:30" $searchstring23 = "00:30" $searchstring24 = "23:00" $searchstring33 = "20:00" $searchstring34 = "15:30" $searchstring35 = "16:30" $searchstring36 = "17:30" $searchstring37 = "18:00" For $i = 11 to 13 If StringInStr($sPageContent, $searchstring[$i]) Then MouseClick("left", 370, 940) Send("11") Else For $j = 22 to 24 If StringInStr($sPageContent, $searchstring[$j]) Then MouseClick("left", 370, 940) Send("3") Else For $k = 33 to 37 If StringInStr($sPageContent, $searchstring[$k]) Then MouseClick("left", 370, 940) Send("6") EndIf Next Sleep ( 13000 )
  4. owww man this is a great idea! basically the shortcut of my copying into the notepad and it saves me the trouble of opening said notepad and closing it, which would not have taken that much time but would have been onscreen and somewhat annoying. but if this works its perfect, get all the clipboard text into the $sPageContent and then just do a search ( need to figure out a tidy logical way to jungle around all my start times and what these will trigger ) in it for what i need. thanks man, excellent idea! later edit : got it! MouseClick("left", 1370, 940) Send("^a") Sleep( 1000 ) Send("^c") Sleep( 1000 ) $sPageContent = ClipGet() $searchstring1 = "05:30" If StringInStr($sPageContent, $searchstring1) Then MouseClick("left", 370, 940) Send("11") that was what i needed! now i need to tweak it to add the other times and thens. cheers man!
  5. owww man this is a great idea! basically the shortcut of my copying into the notepad and it saves me the trouble of opening said notepad and closing it, which would not have taken that much time but would have been onscreen and somewhat annoying. but if this works its perfect, get all the clipboard text into the $sPageContent and then just do a search ( need to figure out a tidy logical way to jungle around all my start times and what these will trigger ) in it for what i need. thanks man, excellent idea!
  6. ive seen those IE functions but using IE is really ... hard ... and taking a toll on my nerves ... so this has to be something browser specific, otherwise autoit cannot simply read from the screen regardless of the program used ? ive been reading around other topics around here and there were users with all sorts of software that they were using. i would have thought that for a browser it would be easier. im really starting to consider copy pasting all in a notepad and just sorting it there and closing it after. problem is that i need to do this for 50+ page and not just one but should still be doable. thank you for the help man!
  7. Hey guys, Im new in autoit and the community and ive started using autoit for my work in order to automate some of the tasks that i need to do. while ive managed so far on my own as a newbee now im in need of a little help. what i need is this : in a chrome webpage ( local work page ) i need to search for a value ( its the start time of an event ) and its in HH:MM format ( usually 05:30 . 23:30 or 20:00 ). What i need to do is search for these predefined times and depending on which of them the page holds i need to enter a value in an empty field thats on the bottom of the page somewhere. Ive been trying to use ControlGetText , WinGetText , etc but i just cant figure out where im wrong. The window is the active one btw and the field on the bottom i can just go to with the basic mouseclick command as it never changes position. i was thinking that it could be done more complicated by selecting all the text in the page with a ctrl a , copy pasting it in a notepad and then just reading through that notepad to see what start time is mentioned but im sure there has to be an easier way. Thanks in advance!
×
×
  • Create New...