SCAR Code:Writeln('The Answer Is: ' + IntToStr(Result))
SendKeys(IntToStr(Result));
The send keys just sends "))))))))))"
Am i doing something wrong?
SCAR Code:Writeln('The Answer Is: ' + IntToStr(Result))
SendKeys(IntToStr(Result));
The send keys just sends "))))))))))"
Am i doing something wrong?
"SRL is the best SCAR community in the World, with the most talented programmers: adjust your volume."
-Wizzup?
Post whole function please.
I do visit every 2-6 months
SCAR Code:Function Solve: integer;
begin
For I:=0 To 3 Do
Begin
If FindBitmapToleranceIn(Maths[i],x,y,629, 104, 686, 147, 50) Then
Begin
Case I Of
0:Begin
Writeln('Add');
Result := (FindTopNumber + FindBottomNumber);
End;
1:Begin
Writeln('Subtract');
Result := (FindTopNumber - FindBottomNumber);
End;
2:Begin
Writeln('Multiply');
Result := (FindTopNumber * FindBottomNumber);
End;
3:Begin
Writeln('Divide');
Result := (FindTopNumber / FindBottomNumber);
End;
End;
End;
End;
Writeln('The Answer Is: ' + IntToStr(Result))
SendKeys(IntToStr(Result));
end;
edit: seen like 10+ people viewed who know scar well, and no reply![]()
Last edited by uncfan1119; 10-30-2009 at 07:03 PM.
"SRL is the best SCAR community in the World, with the most talented programmers: adjust your volume."
-Wizzup?
What are you trying to accomplish with this? Is there a link we can use to run the script on?
By looking at the code, it looks the you're trying to find a certain operator, and when you find it, preform the equation. I thing you might want a 'break;' after finding a certain operator. I have noidea (lol) on what could be causing scar do print '))))))'
Sorry I haven't been able to help you on msn man. I've just been really busy with school lately.
Originally Posted by irc
This is a bug with the current version of SCAR (SendKeys), but is apparently fixed in the next version.
Read post #5: http://www.villavu.com/forum/showthread.php?t=52460
But your result of ")))))))" would mean you're getting a result of "0" every time, meaning the function was unable to find the numbers/math symbol to calculate anything.
I'm just gonna guess your playing a math game or something... I'm pretty sure you can't just use any font. You might have to make bitmaps of 0-9 and make it, if one is found, give a value. It would take some crazy TPA's and sorting from left to right for that. Not bad. But you'll prolly have to read up on them alot...
P.S.
Sort by TPA[I].X, from least to greatest. Times the values by multiples of 10 based on how many digits you have.
I'll help you with this if you need me too.
He already made bitmaps of the numbers, which is used in the FindTopNumber and FindBottomNumber functions.
are you sure that FindTopNumber and FindBottomNumber work? Because that looks like the easiest answer to your problem. When SCAR prints out the number in the WriteLn() What # does it produce?
There are currently 1 users browsing this thread. (0 members and 1 guests)