No matter what the from or to numbers that i collect from my dialog box are the if then statements run.
They are only supposed to run when timesran is in between the from and two values.
The if then statements i am refering to look like this
Code: Select all
If>%timesran%>%oilfrom% and %timesran%<oilto>Selling Oil on base %timesran%

Code: Select all
MouseMove>90,1000
LClick
wait>1
Dialog>Dialog1
Caption=Prompt
Width=370
Height=248
Top=530
Left=330
Edit=bases,192,16,145,
Label=How many bases do you have?,20,17,true
Button=Start Script,192,176,145,25,1
Edit=econfrom,192,103,57,0
Edit=oilto,280,64,57,0
Edit=barracksfrom,192,146,57,0
Edit=econto,280,103,57,0
Edit=oilfrom,192,64,57,0
Edit=barracksto,280,146,57,0
Label=Sell oil from:,66,60,true
Label=Upgrade barracks from:,39,146,true
Label=Upgrade economy from:,38,103,true
Label=to,260,72,true
Label=to,260,108,true
Label=to,260,148,true
EndDialog>Dialog1
Show>Dialog1
Label>ActionLoop
GetDialogAction>Dialog1,r
If>r=1
Goto>Prompt
Else
Goto>ActionLoop
Endif
Label>Prompt
CloseDialog>Dialog1
Let>numberofbases=Dialog1.bases
Let>oilfrom=Dialog1.oilfrom
Let>oilto=Dialog1.oilto
Add>oilto,1
Let>econfrom=Dialog1.econfrom
Let>econto=Dialog1.econto
Add>econto,1
Let>barracksfrom=Dialog1.barracksfrom
Let>barracksto=Dialog1.barracksto
Add>barracksto,1
Let>timesran=0
Let>tabpresses=13
Let>tabcontrol=-1
Label>MainLoop
If>timesran<numberofbases>timesran,1
If>tabcontrol=0
Sub>tabpresses,1
Endif
//******************************************************
//Base Button
MouseMove>445,180
LClick
Wait>1
WaitPixelColor>6195658,20,118,0
//Base Selection
Wait>1
Press Tab * tabpresses
Wait>1
Press Enter
Wait>1
WaitPixelColor>6195658,20,118,0
//Oil
If>%timesran%>%oilfrom% and %timesran%<oilto>Selling Oil on base %timesran%
Endif
//Economy
If>%timesran%>%econfrom% and %timesran%<econto>upgrading economy on base %timesran%
Endif
//Barracks
If>%timesran%>%barracksfrom% and %timesran%<barracksto>upgrading barracks on base %timesran%
Endif
Add>tabcontrol,1
Add>tabpresses,1
Goto>MainLoop
Else
MessageModal>Script exited
Code: Select all