czwartek, 12 sierpnia 2010

Building own FarmeRobot programs - Wheat

Building own FarmeRobot programs is  easy.
  1. Find already existing program in your FarmeRobot folder, f.e. LettuceFast.FarmeRobot
  2. Unzip it to any folder. You should see some files:
  3. Edit Program.xml adding commands to harvest Wheat and to seed WheatSeed instead of LettuceSeed. You can even combine commands to seed what was harvested - not in this example, but Farmerobot would be able to seed Lettuce on some fields and Wheat on others.
  4. Get a screenshot of your farmerama fields, and crop two elements
    • Wheat seed - save as WheatSeed.png - FarmeRobot will use it as a pattern to find while seedign. 
    • Wheat field - save as Wheat.png - FarmeRobot will use it as a pattern to find while harvesting 
  5. Zip all the files into WheatExample.FarmeRobot and put the file in the FarmeRobot's folder.
  6. After restarting FarmeRobot you should see the new program in the list.
  7. If you want to share it with others, upload it to google docs account, as I described before. I've just done it - WheatExample should be avaiable now as a remote program to everyone.
  8. In addition WheatExample exits after 80 successful harvesting or 3 minutes of working - it can be started from sheduler - for example every 10 minutes. Command line to start FarmeRobot with local program - 5 arguments: 
FarmeRobot.exe user pass win_pos_x win_pos_y program_name
example: 
FarmeRobot.exe farmerobot mypass 0 0 WheatExample

    wtorek, 10 sierpnia 2010

    New Version

    Farmerobot v. 1.10 is avaiable there:
    http://rapidshare.com/files/412214887/FarmeRobot.zip

    Some improvements: timers, couter and timers are avaiable to preview, new log window.

    Nowa wersja

    Farmerobot 1.10 jest dostępny tutaj:
    http://rapidshare.com/files/412214887/FarmeRobot.zip.html

    Kilka udoskonaleń: timery, liczniki i timery można podglądać w czasie pracy, nowe okno logu.

    piątek, 6 sierpnia 2010

    Sharing FarmeRobot programmes

    One can share his own programmes witch other FarmeRobot users.
    These programmes will be listed as a remote programmes in FarmeRobot. In order to achieve that, a few simple steps should be followed:
    1. Create your own or reedit sample Program.xml.
    2. Zip it with pictures used in Program.xml
    3. Give it an extension ".FarmeRobot"
    4. Upload to gmail account in any doc's folder
    5. Share it to "publicfarmerobot@gmail.com"
    6. Than it will automagically be accessible to other users

    FarmeRobot - programming

    You can create your own instrucions of what FarmeRobot shoul do. It can be achieved by editing XML file (Program.xml) and by providing custom pictures as a patterns for searching farmerama objects.

    Program.xml - can include instructions:
    • loop - <loop>...</loop> - main program loop
    • find(field) - <find field="name"><success/><failure/></find> - conditional find of pattern from file "name.png"
    • click(field)- <click field="name"/> - just click that field
    • increm(counter)- <increm counter="name"/> - increment counter
    • reset(counter)- <reset counter="name"/> - reset counter
    • check(counter,isgreaterthen)- <check counter="name" isgreaterthan="y"><success/><failure/></check> - check if counter is greater than y
    • wait(seconds) - <wait seconds="x"/> - wait for x seconds
    • restart - <restart/> - restarts FarmeRobot - a memory leak in IE control results in slowdown of FarmeRobot - it's worth restarting it every few hours.
    • exit - <exit/> - switches FarmeRobot off - one can define a task in sheduler f.e. to start FarmeRobot every 30 minutes
    • finish <finish/> - finishes current job

    Programowanie FarmeRobota

    FarmeRobota programuje się przez edycję pliku XML i przygotowanie odpowiednich obrazków - wzorców, które potem w czasie pracy są wyszukiwane.

    Program.xml - może zawierać komendy:
    • loop - <loop>...</loop> - główna pętla programu
    • find(field) - <find field="name"><success/><failure/></find> - wyszukiwanie wzorca zapisanego w pliku "name.png"
    • click(field)- <click field="name"/> - kliknięcie w odszukane pole
    • increm(counter)- <increm counter="name"/> - zwiększenie licznika o 1 (counter++)
    • reset(counter)- <reset counter="name"/> - wyzerowanie licznika
    • check(counter,isgreaterthen)- <check counter="name" isgreaterthan="y"><success/><failure/></check> - sprawdzenie, czy licznik osiągnął wartość y
    • wait(seconds) - <wait seconds="x"/> - przerwa, oczekiwanie x - sekund
    • restart - <restart/> - restartuje FarmeRobota - wyciek pamięci w kontrolce IE powoduje, że po kilkudziesięciu minutach FarmeRobot działa coraz wolniej - wtedy warto go zrestartować.
    • exit - <exit/> - wyłącza FarmeRobota -w harmonogramie zadań można zdefiniować sobie uruchamianie FarmeRobota np. co 30 minut - a po wykonaniu swoich zadań może się on sam wyłączyć.
    • finish <finish/> - powoduje zakończenie danego programu

    czwartek, 5 sierpnia 2010

    FarmeRobot - Resources

    I've made a screenshot and small video to show how to use FarmeRobot. The resources to show or download are:

    FarmeRobot - start

    I didn't want my son to sit the whole summer holidays behind the computer, so I decided to write, a small robot to do his duties in farmerama.
    After a short calculation it showed, that the most valuable activity (in terms of experience points, as well as money) is sowing and harvesting ... a lettuce.
    That is why - FarmeRobot v1.0 do this fast and flawlessly