| View previous topic :: View next topic |
| Author |
Message |
mike1212
Joined: 26 Feb 2005 Posts: 4 Location: Florida
|
Posted: Sat Feb 26, 2005 6:27 am Post subject: Help wih a fix please |
|
|
Hello
Seems to be a very informitive board.
Question
I need help, it may seem simple, but I am new to this programing.
; 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, 8 ;
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.
Thank You for Your time.
Mike  |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Sat Feb 26, 2005 9:49 am Post subject: |
|
|
For me (but I could be wrong) this isn't AutoHotkey (AHK) code ?!
It looks like AU3 code (---> AU3-Forum) !?
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
|
Posted: Sat Feb 26, 2005 11:55 am Post subject: |
|
|
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 |
|
 |
BoBo Guest
|
Posted: Sat Feb 26, 2005 12:29 pm Post subject: |
|
|
| 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"  |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Sat Feb 26, 2005 5:24 pm Post subject: |
|
|
| 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 |
|
 |
|