SRL Archive - OSR Help

how to use 'or'


HT BaaFly

2011-12-24 18:55:03

I've been trying to get 'or' to work in this little function for half an hour but in keeps throwing type mistmatch errors at me. I don't know hat the hell is wrong with it, can anyone spot the mistake?


 If GetTextAtEx(124, 393, 10, UpCharsEx, False, False, 0, 10, 0, 810, False, tr_AllChars) = ('Enter the price you wish to sell for: |') or ('Enter the price you wish to buy for: |') then
begin
SendKeys(FloatToStr(round(decimal)) + chr(13), 200);
Wait(500 + Random(500));

Am I using or correctly?

RISK

2011-12-24 18:56:04

If GetTextAtEx(124, 393, 10, UpCharsEx, False, False, 0, 10, 0, 810, False, tr_AllChars) = ('Enter the price you wish to sell for: |') or GetTextAtEx(124, 393, 10, UpCharsEx, False, False, 0, 10, 0, 810, False, tr_AllChars) = ('Enter the price you wish to buy for: |') then

bolshak25

2011-12-24 19:00:07

im guessing you need extra brackets around the second half or another =
never scripted before, but try

If GetTextAtEx(124, 393, 10, UpCharsEx, False, False, 0, 10, 0, 810, False, tr_AllChars) = (('Enter the price you wish to sell for: |') or ('Enter the price you wish to buy for: |')) then
begin
SendKeys(FloatToStr(round(decimal)) + chr(13), 200);
Wait(500 + Random(500));

or

If GetTextAtEx(124, 393, 10, UpCharsEx, False, False, 0, 10, 0, 810, False, tr_AllChars) = ('Enter the price you wish to sell for: |') or GetTextAtEx(124, 393, 10, UpCharsEx, False, False, 0, 10, 0, 810, False, tr_AllChars) = ('Enter the price you wish to buy for: |') then
begin
SendKeys(FloatToStr(round(decimal)) + chr(13), 200);
Wait(500 + Random(500));

E::ninja:

HT BaaFly

2011-12-24 19:00:46

thanks man your's didn't work but I got it to work by adding brackets around each condition:

     If (GetTextAtEx(124, 393, 10, UpCharsEx, False, False, 0, 10, 0, 810, False, tr_AllChars) = ('Enter the price you wish to sell for: |')) or (GetTextAtEx(124, 393, 10, UpCharsEx, False, False, 0, 10, 0, 810, False, tr_AllChars) = ('Enter the price you wish to buy for: |')) then


thanks a lot bolshak25 that was alon the lines of what i did