Tuesday, January 6, 2009

Programming a macro

So a few weeks ago a light bulb went off in my head. For work, I process background checks for pre-employment and such. I get paid for each request I process. Now the way I get more requests is via mouse click when I am signed into the remote system. If I want work (money), I have to periodically click, and often there is no new work to be obtained. So I had gotten into the habit of reducing my work window very small, and clicking on it while I read some other web page. As long as I sat here click, click, clicking, I would eventually get some more work. But it was quite frustrating because when I would want to get up and go do something productive around the house, or go shopping, I knew I was missing out on the possibility of pulling more orders. I felt tied to my chair. And when it could be hours before new work was loaded, it became very tedious.

But then it came to me - duh - I know I can program something to click for me! So I went looking around for the easiest way to do this, and I found Macro Express, a neat little package highly rated by tucows. It was only $40, and after looking around on their forums and finding out what it could do, I figured it would be worth the investment (by the way, it has a 30-day free trial period before you have to license it, but I went ahead and bought it as I could see it would pay for itself quickly). And within 2 days, I had my macro written and was able to set it to run while I went off shopping or doing dishes or laundry or cooking dinner. It pulled 32 orders when I was out Christmas shopping, where it has been a struggle to get 15 per day, my personal goal/minimum. This is a great tool.

The one problem I have had to solve is that the screen position of the clickable link shifts a bit, depending on the result - if there are no orders, it shifts once and then stays the same, if there are orders, it shifts a different way - and so I had to work out the Mouse Move function. I played with it before the holidays but set it aside after not being able to get the If/Else/End If and pointer recognition to work the way I wanted in conjunction with the Mouse Move. But of course it came to me in my sleep that I didn't need to use the pointer recognition and I was making it more complex than necessary. Using the Mouse Move function alone was more efficient.

So today I got that fixed and it's working well thus far, that is, it is moving the mouse position up and down so that it will catch one movement. I haven't yet been able to see results for when the request is successful, though. I am thinking I may need a couple more movements to compensate, but without some successful pulls to see where the link shifts in relation to the mouse position, and the subsequent mouse movement around it, I have no way of knowing.

Anyway, today's dinner will be Cajun-style Pork Roast. I use the recipe from Chef Paul Prudhomme's Louisiana Kitchen cookbook. My mom let me borrow it a few years ago when she found out how often I was cooking things like Red Beans and Rice, and Gumbo. I went to give it back once and she told me to hold on to it. So I have definitely used it; I have learned quite a bit from it, borrowing spice combinations from his recipes and adapting them into my own old standards. I find that most of the recipes are way too heavy on the butter and I can acceptably cut it back by 1/3 or even 1/2 on some, or I can substitute canola oil for some of the butter. Like for the Pork Roast - this is one the whole family loves although it's too hot as is (unless you really love the cajun heat, don't get me wrong, I do love it, but none of us like to cough and turn red at the table). I reduce the cayenne pepper and the salt by half, I use less butter, and to make it an easier dish to prepare, instead of cooking a vegetable mixture to stuff the roast, I just melt butter and stir in the spice mix and use that to stuff and rub the roast. And it is always a huge hit here.

Today I want to make some rolls or bread to go with it, though. Let's see... Oh, I know; that honey wheat bread from the Fleischmann's book would be very good with it. Or maybe the dark rye ... Will have to decide in the next couple of hours.

And now I feel compelled to randomly break out into song "... pleasantly caving in, I come undone... Heaven smiles above me, what a gift, here below, but no one knows; gift that you give to me, no one knows ... " from No One Knows by Queens of the Stone Age

No comments: