Jump to content
Sign in to follow this  
mike1212

Need advise

Recommended Posts

Hi

Can someone tell me how to get this to statement to work? :">

elseif $action = 4 then
; 1/2
ControlClick($name, "", $Button);

elseif $action = 4 then
; 1/2
ControlClick($name, "", $Button);

This is in a While Wnd loop.

I belive a loop reads from top to bottom of the whole loop, so I guess whats happening is when the first elseif is read it must stop, and not continue to the next elseif.

I need a way to make it read the second elseif as well as the first.

Thank You mike :lmao:

Edited by mike1212

Share this post


Link to post
Share on other sites

Why do you not put the 2 ControlClicks with the 1st ElseIf, as when $action = 4 is true, you want them both processed?

The 1st true If statement is processed.

Share this post


Link to post
Share on other sites

Why do you not put the 2 ControlClicks with the 1st ElseIf, as when $action = 4 is true, you want them both processed?

The 1st true If statement is processed.

<{POST_SNAPBACK}>

Hi MHZ

I tried that using the {} braces and cant seem to get it to work.

It looks like it bypasses it and only reads the second elseif then.

Unless, I am not formating the statement correctly. An example of the format would be of great help.

Thank You Mike

Share this post


Link to post
Share on other sites

Hi

elseif $action = 4 then

; 1/2

ControlClick($name, "", $Button);

elseif $action = 4 then

; 1/2

ControlClick($name, "", $Button);

I need a way to make it read the second elseif as well as the first.

<{POST_SNAPBACK}>

When a true condition is detected, the IF statement performs only that section of the statement and skips the rest of IF statement.

I think you want consecutive IF statements as follows (although I am no sure since both of your elseif's are the same):

If $action = 4 then
   ControlClick($name, "", $Button4);
EndIf

If $action = 5 then
   ControlClick($name, "", $Button5);
Endif

Or do you want to do more than one thing when a condition is true:

If $action = 4 then
   ControlClick($name, "", $Button4);
   ControlClick($name, "", $Button?);
EndIf

Phillip

Share this post


Link to post
Share on other sites

When a true condition is detected, the IF statement performs only that section of the statement and skips the rest of IF statement.

I think you want consecutive IF statements as follows (although I am no sure since both of your elseif's are the same):

If $action = 4 then
   ControlClick($name, "", $Button4);
EndIf

If $action = 5 then
   ControlClick($name, "", $Button5);
Endif

Or do you want to do more than one thing when a condition is true:

If $action = 4 then
   ControlClick($name, "", $Button4);
   ControlClick($name, "", $Button?);
EndIf

<{POST_SNAPBACK}>

Hi phillip

Yes I want to do more than one thing when a condition is true.

You stated

Or do you want to do more than one thing when a condition is true:

CODE

If $action = 4 then

ControlClick($name, "", $Button4);

ControlClick($name, "", $Button?);

EndIf

So I added this

elseif $action = 4 then
ControlClick($Tablename, "", $RaiseButton);
ControlClick($Tablename, "", $CallButton?);

An error come up stating

ControlClick($Tablename, "",CallButton?);
ControlClick($Tablename, "",CallButton^Error

Error unable to parse line :x

What I what, is to add this, to it some how?

ControlClick($tablename, "", $CallButton);

So the command will then click the bet or raise button followed by a call control click.

What is happing is it works fine, except if someone else should cap the bet then the two options that come back to me are 1. call 2. fold

and the above commad does not no what to do in this case.

Thank You Mike

Edited by mike1212

Share this post


Link to post
Share on other sites

Yes I want  to do more than one thing when a condition is true.

ControlClick($Tablename, "", $RaiseButton);

ControlClick($Tablename, "", $CallButton?);

ControlClick($Tablename, "",CallButton^Error

Error unable to parse line

<{POST_SNAPBACK}>

You have the right idea. If you remove the Question Mark, does it work (assuming the ControlID is $CallButton)?

Phillip

Share this post


Link to post
Share on other sites

Hi Phillip

Good catch with the ? mark.

I dont know how that got in there, but I removed it, and the script loaded fine.

I will try it later and get back to you.

Thank You for now Mike

Share this post


Link to post
Share on other sites

Thank You Phillip & MHz

The program works fine now.

Again thank you both for your support.

I am limited on my skills in this program o:) , however as I progress,

I too will give advice.

Til then, I need to learn as You folks have :lmao: .

Thank You mike :)

Edited by mike1212

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...