
Estimize
Active Members-
Posts
26 -
Joined
-
Last visited
Everything posted by Estimize
-
Help with copying and pasting into variables
Estimize replied to Estimize's topic in AutoIt General Help and Support
Just tried and it worked, thank you, this just makes me confused as to why it works with a small c and not a capital C now, any ideas? -
Help with copying and pasting into variables
Estimize replied to Estimize's topic in AutoIt General Help and Support
They aren't the problem , I've tried it with and without the mouseclicks and it still doesnt work. -
The code below is intended to copy and paste highlighted text but I've been running into trouble. The Text is already highlighted via the Mouseclicks and I've tried selecting text myself and then running code but I've no such luck. The issue is with the send("^C") part of the code I believe because ClipGet() works when I manually copy something. Any help is appreciated. #include <Array.au3> #include <MsgBoxConstants.au3> Sleep(1000) MouseClick("left",1162, 497,2,1) send("^C") sleep(2000) $Time = ClipGet() MsgBox(1,"",$Time,0) Update : I've just ran Send("^c") on its own in blank page in autoit to see what it entered and the photo below shows just that.
-
would the function be PixelSearch?
-
Up until recently I have been using pixelgetcolor but it no longer fits what I need doing and I don't know how I would use that to expand the co-ordinates that I am checking the colour of.
-
Is it possible to get the colour of a large amount of area on screen, and no I don't mean just use pixelgetcolor to get the colour of that individual pixel, I need to check if a colour is present over a 50x50 pixel area for example.
-
Thanks very much bro
-
Is there any way to make a while statement to run only once if the variable it is based on is fulfilled? while 1 if $Var = True then Func_1() WendI have something like this but when the variable is true then it runs func_1 over again. Any way to prevent this and make it only run once?
-
So would it be func_1() While 1 if PixelGetColour(x, y) = Red then mouseclick("left, x, y) wend endfunc
-
I just need to check the colour of the anywhere on the screen I will try format a bit of code. something like Func_1() while 1 if mouseclick("left" , x , y) = Red Then mouseclick("left" x ,y) wend endfunc
-
I don't need to change the colour I just need to make an if statement that checks what the colour is then makes a decision based on that information. and above I meant what is hex?
-
what is x and isn't the x and y just the co-ordinates?
-
if I wanted to use this colour in a function would I just copy and paste what it says in the help window shown in the photo below?
-
Oh right thank you.
-
I am trying to compare two variables and I am having no such luck If $MS1 = >$MS2 Then MouseClick("left" , 1008, 95) sleep (250) MouseClick("left" , 1008, 95) sleep (250) MouseClick("left" , 892, 379) ElseIf $MS1 = <$MS2 Then MouseClick("left" , 1008, 95) sleep(250) MouseClick("left" , 1008, 95) sleep (250) MouseClick("left" , 892, 450) EndIfThis is my string and both variables have been declared I have attached my error message in the thread if it helps my case at all. Thanks in advance.
-
Can anyone help me add two variables together, I am relatively new to autoit so I am sorry in advance for a lack of information. $Call1+$Click1 = $EndValue1I do this and I get an error message saying that a "=" is expected instead.
-
How to use selected text in autoit
Estimize replied to Estimize's topic in AutoIt General Help and Support
what is the action_1 etc meant to represent? -
How to use selected text in autoit
Estimize replied to Estimize's topic in AutoIt General Help and Support
Thanks so much, I'll try it out for a bit and then get back to you with my progress, really appreciated thanks. -
How to use selected text in autoit
Estimize replied to Estimize's topic in AutoIt General Help and Support
The while loop is the bit of program I am stuck on. -
How to use selected text in autoit
Estimize replied to Estimize's topic in AutoIt General Help and Support
there will be a max of 10 calls, and you might have misunderstood, so the program executes call_1 then the result of call_1 which can either be 2.18 or 0.00 decides whether it will move onto call_2 or stay on call_1. the result of call_1 to move onto call_2 is 0.00 but if the result of call_1 is 2.18 then it just repeats call_1. So when it executes call_2 it gets a result back at the end of the function which is either 7.31 or 0.00 if the result is 0.00 it will move onto call_3 but if the result of call_2 was 7.31 then I need it to loop back to call_1 and repeat like that. the numbers are the least relevant bits I think. So if the result of call_1 and 2 and 3 was all 0.00 it moves onto call_4 and if the result of call_4 is 17.16 (that may change in future but it j=should be easily replaced) then the program loops back to call_1 and carries on from there, but if the result of call_4 is 0.00 then it needs to go onto call_5 and so on. -
How to use selected text in autoit
Estimize replied to Estimize's topic in AutoIt General Help and Support
my code is now working and chooses call_1 or 2 appropriately and I renamed them to call because I felt it fitted it's purpose better. I used this #include <MsgBoxConstants.au3> #include <Functions2.au3> HotKeySet("{F6}", "_Terminate") Local $Data, $NewData;variable placeholder for selected text Sleep (5000) MouseClick ("right", 1260, 260) Sleep (250) MouseClick ("left", 1214, 485) sleep (250) Call_1() While 1; make a loop to keep the script running inefinately WinActive("Functions2");You will probably want to use this to make the screen with the text the active window Send("^c");Send Ctrl + C to copy the copied text sleep(250);I add this to give the computer time to copy the data to the clipboard. It may not be necessary $NewData = ClipGet();This will read the clipboard data in windows and set it to the variable $data for comparisons If $NewData == 2.18 Then Call_1() ;$Data = $NewData Else $NewData == 0.00 Call_2() ;$Data == $NewData EndIF Sleep(1000);pause the program for 1 second so it doesn't over use your processor. WEnd Now I need it to go onto call _3 if the result of the If statement call_2 is also 0.00 but if the result of the call_3 statement is 7.31 I need it to start back at call_1. If you don't understand I can explain it better because I'm sure I missed some sort of detail out, also thanks for the help so far very much appreciated. Also there can only be two values (like here 0.00 or 2.18) as what the program is asking a question and there are basically two answers every time it asks the question and one will always be 0.00. If the answer is 0.00 it will always go onto the next function for example if I was on call_2 and the answer was 0.00 I need the program to go onto call_3 but if the answer was 7.31 it goes back to call_1. Best explanation I can give. As well as this the program cannot skip call_1/2/3/4 to get to call_5 it has to go through all the call_'s in numerical order until the answer which isn't 0.00 is given then we loop back to call_1 -
How to use selected text in autoit
Estimize replied to Estimize's topic in AutoIt General Help and Support
what are the last 11 lines for??? -
How to use selected text in autoit
Estimize replied to Estimize's topic in AutoIt General Help and Support
This is the funtions2.au3 page this shouldnt be like the rest of the code sorry Func Click_1() Sleep (10000) MouseClick("left" , 863, 356) ;Click the X button sleep (250) MouseClick("left" , 1300, 186) ;Click the X button sleep (250) MouseClick("left" , 1260, 200) ;Click Amount TextBox sleep (250) for $x - 1 to 8 send ("{BACKSPACE down}") sleep (100) Send("{BACKSPACE up}") sleep (100) Next ;Clicks Backspace 3 times sleep (100) Send("1.16") ;Inputs '1' into the amount box sleep (250) MouseClick("left" , 1245, 512) ;Click Call sleep (250) MouseClick("Left" , 790, 400) sleep (90000) MouseClick("right" , 807, 439) MouseClick("left" , 860, 665) sleep (5000) MouseClick("left" , 1001, 296) MouseClick("left" , 1012, 309) MouseClick("left" , 1046, 351) MouseClick("left" , 1046, 351) EndFunc Func Click_2() Sleep (1000) MouseClick("left" , 863, 563) ;Click the X button sleep (250) MouseClick("left" , 1260, 200) ;Click Amount TextBox sleep (250) for $x - 1 to 8 send ("{BACKSPACE down}") sleep (100) Send("{BACKSPACE up}") sleep (100) Next ;Clicks Backspace 3 times sleep (100) Send("3.74") ;Inputs '1' into the amount box sleep (250) MouseClick("left" , 1245, 512) ;Click Call sleep (250) MouseClick("Left" , 790, 400) sleep (90000) MouseClick("right" , 807, 439) MouseClick("left" , 860, 665) sleep (5000) MouseClick("left" , 1001, 296) MouseClick("left" , 1012, 309) MouseClick("left" , 1046, 351) MouseClick("left" , 1046, 351) EndFuncThis is the mainbot.au3 page #include <MsgBoxConstants.au3> #include <Functions2.au3> HotKeySet("{F6}", "_Terminate") Local $Data, $NewData;variable placeholder for selected text Click_1() While 1; make a loop to keep the script running inefinately WinActive("Functions2");You will probably want to use this to make the screen with the text the active window Send("^c");Send Ctrl + C to copy the copied text sleep(250);I add this to give the computer time to copy the data to the clipboard. It may not be necessary $NewData = ClipGet();This will read the clipboard data in windows and set it to the variable $data for comparisons If $NewData == 2.18 Then Click_1() $Data = $NewData EndIF IF $NewData == 0.00 Then Click_2() $Data == $NewData EndIF Sleep(1000);pause the program for 1 second so it doesn't overuse your processor. WEnd -
How to use selected text in autoit
Estimize replied to Estimize's topic in AutoIt General Help and Support
I am having trouble getting my code to recognise the second if statement any help? My code is shown below -
How to use selected text in autoit
Estimize replied to Estimize's topic in AutoIt General Help and Support
If $NewData == 2.18 Then Click_1() $Data = $NewData EndIF IF $NewData == 0.00 Then Click_2() $Data == $NewData EndIF is this correct or should what i changed to 2.18 stay as $data also thanks very much for the help