What is this macro for? It obviously is not a .NET program, which is the
topic of this group. Your questions may better be answered in a group that
deals with these types of macros. They may better be able to tell you why
the results of your pixelgetcolor() call is not getting the value that you
are expecting.
What I see here, as a professional developer, is a VERY poorly written
program excerpt. This is not something that I would ever put into
production. There are just too many things that can go wrong to cause it
not to work. It is performing an event-driven task in a procedural manner.
Any slip in the timing and it will fail.
I would suggest starting with some basic macros in the context of what you
are working with. Learn the language and the constructs that are available
to you in the macro. Then work your way to something more complex.
Even though this is a macro, the same programming principles apply as they
do for full applications. Learn what logical conditions actually do before
trying to write expressions that utilize multiple conditions. The use of
"and" and "or" may be different from the way than you would speak it.
...Glenn
On Fri, Nov 7, 2008 at 2:19 PM, Gotrek65 <[EMAIL PROTECTED]> wrote:
>
> This is the only version of the macro that works, its simple and crude
> and littered with sleep times. I wanted to improve it so it had some
> intelligence and could figure out when to do actions(hence the
> implementation of the pixelgetcolor command)
>
> While 1
> Sleep(370000)
> ;wait for cycle(edit me)
> MouseClick("right",800,50,1,1) ;Right
> click for menu
> sleep(1000)
> mousemove(900,140,1)
> ;Highlight Station
> sleep(500)
> mousemove(1200,140,1)
> ;Highlight first station on list
> sleep(500)
> mousemove(1360,145,1)
> ;Highlight warp to within 0m
> sleep(500)
> mouseclick("left",1360,195,1,1) ;click dock
> Sleep(75000)
> ;Trip to Dock - 83 seconds wait
> MouseClickDrag("left",1460,960,1160,970,10) ;Drag from Cargo to
> Hangar
> Sleep(5000)
> ;Wait for Undock
> MouseClick("left",18,1021,1,1) ;Click
> Undock
> Sleep(30000)
> ;Wait to Finish Undock(depends on lag/busy
> station)
> MouseClick("right",800,50,1,1) ;Right
> click for menu
> sleep(1000)
> mousemove(900,176,1)
> ;highlight first bookmark
> sleep(500)
> mouseclick("left",1100,176,1,1) ;click warp
> to bookmark at 0m
> Sleep(55000)
> ;Trip to bookmark - 50 seconds wait
> mouseclick("left",1450,172,1,1) ;sort
> overview by farthest
> away(overview bug)
> sleep(1000)
> mouseclick("left",1450,172,1,1) ;sort
> overview by closest(overview
> bug)
> sleep(1000)
> mouseclick("left",1500,190,1,1) ;select
> nearest ice rock
> sleep(1000)
> mouseclick("left",1540,85,1,1) ;lock
> target
> sleep(1000)
> mouseclick("left",1409,84,1,1) ;approach
> rock(incase for bumping
> sleep(1000)
> send("{F1}")
> ;activate #1 mining laser
> sleep(500)
> send("{F2}")
> ;activate #2 mining laser
> sleep(500)
> send("{ALTDOWN}")
> sleep(1000)
> send("{F1}")
> ;activate shield booster
> sleep(1000)
> send("{ALTUP}")
> wend
>