AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help wih a fix please

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
mike1212



Joined: 26 Feb 2005
Posts: 4
Location: Florida

PostPosted: Sat Feb 26, 2005 6:27 am    Post subject: Help wih a fix please Reply with quote

Hello Very Happy

Seems to be a very informitive board.

Question

I need help, it may seem simple, but I am new to this programing. Rolling Eyes

; Actions
Func GetAction()
WinActivate ("Connected to """ & $name);
; red - fold
$color = PixelGetColor (338, 55);
if $color = 255 then
WinActivate($name);
return 1;
endif

;yellow
$color = PixelGetColor (338, 67);
if $color = 65535 then
WinActivate($name);
return 2;
endif

; blue
$color = PixelGetColor (338, 79);
if $color = 16776960 then
; sometimes bet or just call 50% of the time
WinActivate($name);
return 3;
endif

; green
$color = PixelGetColor (338, 8Cool;
if $color = 65280 then
; If we've got the nuts or close to then sometimes just check 20% of the time
; otherwise raise or reraise
WinActivate($tablename);
return 4;
endif

WinActivate($tablename);
return 1;
EndFunc

The problem is the Red light in this part of promgram is fixed at one color.
and canot be fixed.

So I am looking to replace

WinActivate ("Connected to """ & $name);
; red - fold
$color = PixelGetColor (338, 55);
if $color = 255 then
WinActivate($name);
return 1;

With a not statment. Maybe

If Not yellow blue green then return to 1.

I am lost writing this statement.

Any help is greatly taken. Very Happy

Thank You for Your time.

Mike Very Happy
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Sat Feb 26, 2005 9:49 am    Post subject: Reply with quote

For me (but I could be wrong) this isn't AutoHotkey (AHK) code ?! Shocked

It looks like AU3 code (---> AU3-Forum) !? Wink

With AHK it could look like this

Code:
WinActivate, Connected to %$name%
PixelGetColor, $color, 338, 55
if $color not in red,blue,green ; here you've to enter/replace the color codes
 {
      WinActivate, Connected to %$name%
      RetVal = 1
  }
Back to top
mike1212



Joined: 26 Feb 2005
Posts: 4
Location: Florida

PostPosted: Sat Feb 26, 2005 11:55 am    Post subject: Reply with quote

Hello BoBo

Thank You.

Your correct the program is in Autoit.

I will check over there.

Again Thank You for Your time.

Mike
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Sat Feb 26, 2005 12:29 pm    Post subject: Reply with quote

Quote:
but I am new to this programing
Feel free to stay with AutoHotkey, as its syntax is/coding rules are quite intuitive and therefore should fit perfectly for a "nob" Wink
Back to top
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Sat Feb 26, 2005 5:24 pm    Post subject: Reply with quote

In truth, the "intuitiveness" of each is really a matter of opinion; AutoIt has a slightly larger learning curve and that's just about the only difference. I know some programmers who would vehemently argue that this language is "intuitive," but yes, it is easy.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group