RAMMRODD Posted September 5, 2008 Posted September 5, 2008 (edited) A little bit of background info. This is on Facebook, basically your a wannabe rockstar and you start a band. You get 100 energy starting off and there's things you can do but each one costs energy so what you can do is limited by your energy. Your goal is to become a rockstar by playing gigs (shows) starting from parks and on the corner to casinos onto actual concerts. I discovered that to actually do one of the gigs you only had to put a specific URL into the browser and it does it for you. My computer stays on in my apartment all the time so instead of wasting time (I'm competing with friends) not getting rich and famous while I sleep I turn this program on and leave it on playing gigs and making me money. This is my first actual script that works, but I'm pretty sure it'll only work on my computer or computers with the same resolution for the simple fact it has a MOUSECLICK in it to click the browser. I'm looking for advice on how to make this more universal (how to identify the browser url box other than using MOUSECLICK) and work on any browser. Maybe even work minimized? This works fine for me but I know I can clean this up with a little help. So here it is............ To test the script you actually have to have a facebook account and have Battle of the Bands installed so I'm guessing most will just see my actual script and show how to clean it up without having to test it, which is great expandcollapse popupHotKeySet("{ESC}", "Terminate") HotKeySet("{INSERT}", "Start") $i=0 Sleep(2147483647) Func Start() $sound = MsgBox(4, "Play Sound?", "Play sound when script is started?") While $i <= 3 WinActivate("Facebook | Battle of the Bands - Windows Internet Explorer", "") MouseClick("left", 360, 30, 2) send("http://apps.new.facebook.com/bandbattle/user_items/do/13") send("{ENTER}") if $sound=6 then SoundPlay("C:\music.wav",1) else SoundPlay("C:\WINDOWS\Media\ringout.wav",1) endif TrayTip("Battle of the Bands Bot", "Next Show in 10 Minutes", 60, 1) Sleep(60000) TrayTip("Battle of the Bands Bot", "Next Show in 9 Minutes", 60, 1) Sleep(60000) TrayTip("Battle of the Bands Bot", "Next Show in 8 Minutes", 60, 1) Sleep(60000) TrayTip("Battle of the Bands Bot", "Next Show in 7 Minutes", 60, 1) Sleep(60000) TrayTip("Battle of the Bands Bot", "Next Show in 6 Minutes", 60, 1) Sleep(60000) TrayTip("Battle of the Bands Bot", "Next Show in 5 Minutes", 60, 1) Sleep(60000) TrayTip("Battle of the Bands Bot", "Next Show in 4 Minutes", 60, 1) Sleep(60000) TrayTip("Battle of the Bands Bot", "Next Show in 3 Minutes", 60, 1) Sleep(60000) TrayTip("Battle of the Bands Bot", "Next Show in 2 Minutes", 60, 1) Sleep(60000) TrayTip("Battle of the Bands Bot", "Next Show in 1 Minutes", 60, 1) Sleep(60000) $i = $i + 1 WEnd EndFunc Func Terminate() Exit 0 EndFunc Future Additions: Make it do battles for me aswell Make it buy Promotional items Edited September 5, 2008 by RAMMRODD
dbzfanatic Posted September 5, 2008 Posted September 5, 2008 Try looking at the _IE functions. If this is a flash game that might be a bit harder but as long as you know the URLs you need it's still pretty simple to automate. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
RAMMRODD Posted September 5, 2008 Author Posted September 5, 2008 is there a way to find a specific line of text on an IE page? The page will change a little every few seconds but the line stays about the same during that time.
RAMMRODD Posted September 9, 2008 Author Posted September 9, 2008 I've tried working with the help file but it uses the Autoit example and I cant figure out how to make it work with an actual web page
Szhlopp Posted September 9, 2008 Posted September 9, 2008 is there a way to find a specific line of text on an IE page? The page will change a little every few seconds but the line stays about the same during that time.I have no idea about your game and I've never personally used Facebook. However, I do have some experience with getting specific text off of a webpage.Use the String Regular Expression tester out of my sig. It has a tab that enables you to download internet content and test it for the information you need. Once you find the pattern all you need to do is use the '_IEbodyget' functions to re-download the content everytime you need to check the data.GL RegEx/RegExRep Tester!Nerd Olympics - Community App!Login UDFMemory UDF - "Game.exe+753EC" - CE pointer to AU3Password Manager W/ SourceDataFiler - Include files in your au3!--- Was I helpful? Click the little green '+'
RAMMRODD Posted September 15, 2008 Author Posted September 15, 2008 I tried your script but I couldnt figure out how it works. I copied the exact url, clicked the get website text/html pasted the url and clicked text. It loaded the website and timed out. Did I do it wrong?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now