Progress with Flash: A Dead-Simple Chart
This is the culmination of many hours of work:
Be amazed: the points change every time you load the page.
I’m hoping the pace picks up now that I’ve gotten the hang of it…
This is the culmination of many hours of work:
Be amazed: the points change every time you load the page.
I’m hoping the pace picks up now that I’ve gotten the hang of it…
I first got into programming in about 1998 when a friend of mine showed me an AOL prog, an add-on for the then-popular America Online software that enabled you to do cool, geeky things like kick people offline, steal passwords, etc. Most of the progs, I found out, were written using Microsoft Visual Basic, a program that lets you create new software. I downloaded a free copy of Visual Basic 5.0 CCE edition (free) and was on my way.
In order to make an add-on for the America Online software (or any other software for tha matter), you had to take advantage of the Windows API, which is basically a set of tools Microsoft provides developers so that they can interact with the Windows environment.
A BAS file is a collection of code grouped together for a specfic purpose. For AOL progs, a typical BAS file enabled you interact with the America Online software using the Windows API. Add-on programmers would write these BAS files and exchange them with each other to save time and so they could share their work with others.
As I learned more and more about interacting with AOL while writing Revolution and later Meridian, I started writing my own BAS file. Over several months it grew into a fairly robust collection of functions and procedures for building add-ons. Encouraged by the glory other developers were seeing after releasing their BAS files, I decided to release mine, which I called Alpha32.bas. In my ever-optimistic mind, it was going to blow away everything else that had been created up to that point.
I enthusiastically wrote up some documentation, released it, and… nothing happened (this has been a recurring trend for me). Actually, I got a few compliments from developers, but it never gained much traction. Another developer released a BAS file called dos32.bas at about the same time which, I admit, blew mine out of the water.
For the curious, you can download Alpha32.bas by clicking here. The code is pretty bad, but hey, it was a start.
Here’s a peak:

And here’s the documentation. It seems the I never finished it — not sure what happened there…
~IsWindowThere
This is used mostly for errors. For example if you have just made a code to click an icon in the chat room, and your testing it and it doesnt work? Whats wrong? Well the first thing most people would do is to check if you found the right icon. You Would Put Your Code. Then Put Call IsWindowThere(AoIcon&). If It Finds The icon the n there is a problem with your ClickIcon sub, If it doesnt find the icon, there is a problem with your coding and now you know that you have to fix it.~AOLWindow&
Returns The hwnd of The America Online Client Window. The AOLWindow Contains all other windows in AOL except an _AOL_Modal and an _AOL_Splash. If You hide the AOLWindow You Hide All Other Childs In AOL.~AolMdi
The AOL Mdi’s class name is “MDIClient”. The MDI Client Is The Parent Of All The AOL Childs. If you hide the MDIClient then all childs will we gone and all you will see on the AOL screen is a white rectangular area.~AOLChild
The AOLChild Is Every window in AOL that has a caption and looks like a VB form. Every AOL Child has a caption which you can change with the change title sub. One example Of An AOL Child is the Welcome Screen; it has a title of “Welcome, …” and has childs that you can click.~AOLModal
A Separeate Window From AOL that was probably made disable the user from using AOL until they have read or seen the AOL Modal. In short the AOL Modal Is a Bannar that says “You must acknowledge the information withing this window before you continue running AOL”. Some examples of AOL Modals are any set prefrences windows (Which you can acces via My AOL | Prefrences), the box that pops up saying “Your mail has been sent”, after you send mail, and the Invalid Password Box.~FindChildByClass
Finds a given child by its class name and its parent window. Every window has a class name, a String that inedtifies it. Every window also returns a Long Variable that identifies it. This Function Is that same as FindWindowEx(Parent&, 0, “ClassName”, vbNullString) but most programmers profer FindChildByClass because most people are more familiar wih it then FindWindowEx.~ClassTimes
Every Window Has a certain amout of childs. This Function returns The Totla Number Of childs within a parent window.~ChangeTitle
Changes The Handle’s Title/Caption/Text. You can change any windows title. For example if you want to change the ChatRoom’s Title You Would Put: Call ChangeTitle(FindChatRoom&, “This is the new title of the chat room!”~Find Windows: Return The handle of a certain AOL Child containing certain items
FindChatRoom: Returns The handle of an AOL Child which is the chatroom
FindIMWindow: Returns The handle of a sent or received IM window. This is the IM Window That Actually Has The Things You Typed In it. This des not return the handle of the IM Window When you first opn the window to send an Instant Message
FindWebPage: Returns The Handle To A Web page opened through AOL
FindMailWindow: Returns The handle to the mail window that has your New Mails Listed
FindListWindow: Returns The handle of an AOL Child With an _AOL_Listbox child in it
FindViewWindow: Returns the handle of an AOL Child With an _AOL_View In It~UserSN
Returns The Current User’s Screen Name~KillWait
If your AOL Mouse pointer is an hour glass this will convert it back into a regular pointer~IsUserOnline
Returns A TRUE if the user is online and a FALSE if the user isnt online~GetCaption
This will find the hwnd that you specify and get its caption. For example if you want to know the AOL Window’s caption you would put: MsgBox “AOL’s caption is: ” &
GetCaption(AOLWindow&)~Timeout
Pauses the vb application for a given amount of SECONDS~StayOnTop
Positions a vb form ontop of all other windows~DontStayOnTop
Positions a vb form so that it is NOT on top of all other windows~FortyFiveMinuteKill
If the AOL Window pops up saying “You have been idle for 45 minutes. Please click OK within 10 minutes or you will be logged off” appears this will automatically click OK for the user. Use in a timer~AntiIdle
If the windows comes up saying “You have been idle for a while. Do you want to stay online?” This will click YES for the user. Use in a timer.~ClickIcon
Cliks The hwnd. You can click an icon or you can click another hwnd. Mainly used for Icons though~MailSend
Sends Mail to the recipiant(s) with a given subject and message. Self explanitory.~GetWindowName
Returns The hwnd Class name of the hwnd #. For example you could get the current window with the GetForegroudWindow function and put. MsgBox “The ClassName Of “& GetCaption(GetForeGroundWindow) & ” is ” & GetWindowName(GetForegroundWindow)~Keyword
Goes to a given keyword. If you want to goto the web you do not need the http://~GetText
Returns The text from a givin hWnd~SendChat
Sends Text to the chat room. If you are typing something when it sends the text you will not lost what you are typing.~ChatText
Returns The Text from the RICHCNTL within the chat room.~ChatLastSNWithMsg
Returns The Last Line In The chat room. It includes the Screen Name and what the said.~ChatLastSN
Returns The Screen Name from the last chat line~ChatLastLine
Returns The Message that the last person said in a chat roomIMLastSNWithMsg
IMLastSN
IMSend
IMLastLine
ChatRunner
AddRoomToListbox
AddBuddiesOnlineToListBox
ChatIgnore
AddMailToListBox
ChatLastNameToEnter
AddRoomToCombobox
ChangeLabelFont
ChangeCommandFont
TextFontElite
TextLettersElite
KillLogo
IMOtherSNFrom
PlayWave
ChatBust
TextWavy
TextLagged
ChatKillHTML
EnableAOL
MailCount
BuddyChatInvitation
MailSendWithFile
RunMenuViaToolIcon
FileExists
RunMenuByString
CloseWindow
GetMailSender
MailDelete
TextFirstLine
TextSwitchHTMLColor
CDSet
SetKeyState
SetCapslock
ActivateScreenSaver
ChatRollDice
RestartComputer
CAD
SystemTrayAddIcon
TextScrambled
ChatClearForEveryone
ChatClearForUserOnly
PuntCode
Punt
AddAOLTree
AddAOLList
MailRead
AddMembersWithNameToList
MailList
SaveText
LoadText
SaveLabel
LoadLabel
SaveListBox
LoadListBox
SearchFileExtention
StripNull
SearchExactFile
ShellAOL
AOLDirectory
DirectoryOfFile
ChatChangeListStaticCaption
ChatNumPeopleStaticCaption
CaptureScreen
TextCharTimes
TextWordCount
TextPerfect
AddMultipleRoomsToList
There
Times
ChrAscii
TextToBinary
BinaryToText
While looking for a birthday gift for my wife, I came across Kaboodle.com, a social shopping site that lets you shop with your friends online. Cool idea.
There’s a section on their homepage titled Popular Stores that lists Etsy as its first item. I recognized Etsy, so I clicked through to see what Kaboodle has to say about them.
Here’s the page. I added red outlines around the four visible ads:
A fair chunk of my screen is used by ads and for their nontechnical, small-monitor-owning target audience, it would make up even more.
There’s a tricky balance between making the content easy to find and placing ads in prominent positions to increase clickthrough rates and profits. You want ads but you don’t want so many that people have no reason to come to your site or can’t find the information once they’re there. If you cover you three quarters of your site with ads, you’d likely lose a significant portion of the new visitors who can’t quickly find what they’re looking for.
And just because you can place more ads doesn’t necessarily mean you should. Its possible that a few well placed ads on Kaboodle would result in more people sharing the site, which would lead to more visitors to the site in the long run and higher profits.
But who knows. Maybe the majority of their nontechnical target audience thinks the ads are the content. Or maybe they know they’re ads, but don’t care because hey, it’s an online shopping site. Maybe Kaboodle has A/B tested their pages dozens of times and have determined that this is the optimal ad to content ratio. Maybe they don’t care about the people who care about ad placement because those people, like me, never click the ads (that’s probably true). And maybe the people that can’t find the content because they can’t scroll past the ads are also the people who believe their identity will be stolen if they use their credit card online, so won’t buy anything anyway.
Admittedly, they seem to be doing alright for themselves:
There’s an important lesson here for picky web developers like me: most people are not picky web developers.
The inaugural Philly Build Guild meetup was this evening. The event, organized by nonother than Chad Pytel of ThoughtBot, attracted about a dozen people from the Philly tech community.
By my count only about half the guys (they were all guys) were Rails aficionados, which was nice because not all the conversations gravitated towards the latest shiny Ruby on Rails developments, which is what usually happens at the Philly.rb meetups. The discussions ranged from Wolfram Alpha to Monkey Knife Fights (the local brew) to the diverse projects we’re all working on.
Good people, good environment, great times.
I’ve been spending most of my free time reading about and experimenting with Flash CS4.
For my first project, I decided to create an animated header for this blog.
I started by drafting a layout in Photoshop, but quickly realized that the direction I was heading was going to result in something way too obnoxious to actually use:
I started over, this time merely animating the existing header:
(It’s set to not to loop — to see it in action, right click and hit Play)
Alas, even after reducing it to something mind-blowing simple, it just didn’t look right. Not here anyway.
Lesson learned: There’s a time and a place for Flash apps… blog headers are not one of them.
Setting limits helps you achieve. Many times, when we are spread too thin, we only make incremental progress on important projects and goals. But if we focus on just a few important things, we can actually complete them. You’ll achieve much more by focusing on the essential.
Leo Babauta, The Power of Less
A few days ago I picked up a copy of The Power of Less after reading about it on Derek Siver’s blog.
The key theme of the book is to simplify your life, which can be boiled down to two steps:
1. Identify the essential
2. Eliminate the rest
I’ve recently found myself bogged down in clutter so I figured I’d give it a try. I started by making a list:
Identify the Essential:
- Wife: Having a healthy, prosperous relationship is my number one priority. I’d sooner let everything else fail than have them affect my marriage.
- Startup: Eventually (3 to 5 years) I’m going to found a startup and I want to be as technically skilled as possible for when that time comes. This bullet serves as a reminder that the majority of my free time should be spent working towards that end. In the next few months that means learning Flash, Photoshop, Django, jQuery, and launching a new site.
- Health and Nutrition: It’s easy to push this to the side when you’ve got a lot to do but long term it affects every single other thing you do.
- Education: I have a bad tendency of reading a few dozen pages from a book, and then quitting when I find a new book that piques my interest. Then I repeat that cycle over and over until I have 20-30 books that I haven’t finished. Eventually I’ll come back to them and read 20-30 pages then rotate to another one. That, or I never get back to it. Probably not the best way to go. Accordingly, I’m narrowing it down to two that I’m going to finish before I move on to anything else:
– The Power of Less
– Four Steps to Epiphany
Minimize the Rest: (note: not eliminate, for now)
- HackerNews: Definitely my number one time eater. I considered categorizing it under Education, but right now I think that time is better spent hacking. New homepage: Progamming Adobe ActionScript 3.0 for Adobe Flash. Man I’m cool.
- Google Analytics: Looking at the numbers for this blog is a purly ego scratching, unproductive waste of time. In fact I’m removing it from my favorites, right now.
- GMail: I check email to procrastinate. I get about 8 emails a day and yet check it about 20 times a day. Let’s try once.
- Blogging: My plan is to write fewer, higher quality posts than many short mediocre ones.
- Domain Names: When I get bored I hit up AjaxWhois and search for domain names that might make good company names. Hows about building something people want and worrying about the company name later, eh?
Don’t Forget:
- Housework, Call Family: The first one is mostly to appease my wife and the second one is for me.
- Keep Desk Clean: I tend to let stuff–paperwork, dishes–pile up on my desk. At some point it gets to be too much and I take 20 minutes to clean it all off and put things where they belong. As soon as my desk it spotless, I find that I can concentrate better and that I get I can get more done.
After you’ve identified the essentials and reduced/eliminated the rest, the trick is to do it.
Now, every time I find myself pulling up HackerNews or checking GMail I take a look at the list and remember: focus.
Not surprisingly, I’ve gotten more done in the last few days than I have in the last few weeks.
Cloninger has trained rats and mice in mazes to have persistence by carefully not rewarding them when they get to the finish. “The key is intermittent reinforcement,” says Cloninger. The brain has to learn that frustrating spells can be worked through. “A person who grows up getting too frequent rewards will not have persistence, because they’ll quit when the rewards disappear.”
There’s a lot of conjecture and speculation about what the online poker sites look at to detect bots. As bot developers, all we can really do is make educated guesses and hope that we fly under the radar long enough to make a profit.
If I had to guess on what they look at, mouse click location is near the top of the list.
We know that PokerStars records where you click because there is a log file (aptly named PokerStars.log) in the PokerStars directory which includes that information:

It’s not clear though whether they use this information to identify bots or as supplemental data in the event you need technical assistance from the PokerStars. Presumably if they were looking at mouse click location to detect bots they wouldn’t keep it in a log file which the user can edit.
Regardless, it’d be relatively easy for Jeff and team at PokerStars to do some statistical analysis on this data to flag suspicious activity, so if you’re going to develop a bot, you should try to make it act as human-like as possible.
But how do you know what’s normal activity?
For one, when the bot performs an action such as raising, don’t have it click the same exact location every time.
Here’s what I did:
That PokerStars log file contains the locations where you click, right? So why not take advantage of it.
I deleted the log file to reset the data and then joined a couple tables and played for a few hours. When I finished, I extracted the coordinates from the log file and plotted them on a screenshot of one of the table I had just finished playing at.
The end results show exactly where I clicked:
Most of the locations should be clear: Fold, Call, Raise, marking the Check box, viewing the hand history, and clicking the “Chat” and “Stats” tabs. The clicks around the center surprised me at first, but then I realized when I’m multitabling I click the center of the tables to bring the focus to it.
I based my bot’s click locations on this visualization. For example, the location of the clicks on the third button can be approximated by two overlapping normal distributions, one vertical and one horizontal with their intersection at the center of the button.
Here’s the code I used to implement it:
Is that the key to avoiding detection? Who knows.
I ran the bot for nearly two years, and while it may not have helped, it certainly did not hurt.
Best of luck –