help with script :D

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Marcdk
Junior Coder
Posts: 36
Joined: Sat Sep 22, 2007 10:16 pm

help with script :D

Post by Marcdk » Wed Oct 03, 2007 6:13 pm

Okay i dont understand this :/

I got this script
Label>Leave game
Wait>2
Press alt
wait>0.2
press shift
wait>0.5
press enter
wait>0.1
Release alt
wait>0.1
release shift
wait>2
Send Character/Text>Hi, gl hf
press enter
wait>5
press alt
wait>0.1
press shift
wait>0.1
press enter
wait>0.1
release alt
wait>0.1
release shift
wait>0.1
Send Character/Text>Visit Clan uGs :)
press enter
wait>5
press alt
wait>0.1
press shift
wait>0.1
press enter
wait>0.1
release alt
wait>0.1
release shift
wait>0.1
Send Character/Text>Ok cya
press enter
wait>0.1
Release alt
wait>0.1
release shift
wait>0.1
Press F10
wait>0.1
Send>key1
wait>0.1
Send>key2
wait>0.1
WaitPixelColor>5372671,501,289,5
IF>{%WPC_RESULT%=True}
Goto>Win
endif
GetPixelColor>336,684,color
If>color=5800357
Goto>winlose
endif
Label>end
The last part of code is bugged i think.. It doesn't go to the "win" label when the pixelcolor comes, weird, and i know from my friend that this pixelcolor is the right one..

I think that the combination of the 2 waitpixelcolors is wrong, but i really dont know this...

And as u can see the bot sends "key1" and "key2" in the script which is variabel names,

u can see that in my other post, but i will post the code here, so u can see it... I got this:
Label>Language
If>dialog1.english
let>key1=e
let>key2=q
endif
If>dialog1.german
let>key1=e
let>key2=b
endif
label>end
Should't all this work? i dont understand this :/

help please! :)

Thanks!

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Oct 03, 2007 6:35 pm

That If line should be:

If>WPC_RESULT=TRUE
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Oct 03, 2007 7:26 pm

Label>Language
If>dialog1.english
let>key1=e
let>key2=q
endif
If>dialog1.german
let>key1=e
let>key2=b
endif
label>end

Should't all this work? i dont understand this :/
From Help for If>:
Carefully read the portion highlighted in red, then examine your Lines above.

If>expression[,true_label_name[,false_label_name]]
statements
[ [Else
else statements]
Endif ]

Evaluates expression. If the expression is true the first statements are executed. If the expression is false the statements after Else are executed. Else is optional. IF blocks can be nested. When label names are provided execution of the script jumps to the specified labels or subroutine names. If label names are specified Else and Endif are ignored and are unnecessary.

The expression can be simple (legacy), or complex.

Complex Expressions

The expression must be contained within curly braces "{" and "}". String literals must be delimited with double quotes ("), e.g.:

"string". Variables must be delimited with % symbols, e.g.: %VarA%.

Several types of operators and functions can be used with complex expressions. For more details see Complex Expressions.


Simple Expressions

Simple expressions can contain only two parts separated by one of the following operators:
= Equals
> Greater than
Not Equal

Values in the expression can be numeric or string values, or variables containing such values.
Spaces must not be used as simple expressions do not require string delimiters.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts