Need help with game scripting issue

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
ppsp
Posts: 3
Joined: Thu Oct 06, 2011 1:54 am

Need help with game scripting issue

Post by ppsp » Thu Oct 06, 2011 2:12 am

I have been having problems with scripting resetting characters in http://apps.facebook.com/tpc-supremacy facebook game. When the script enters the new character name, the game checks if the name is valid or not and changes a cross to a tick, which you then need to click to generate the new character. I havent been able to get imacros to activate the name check. It seems to require a mouse click to activate the search. I managed to run a mouse recorder along with imacros to activate it, but that is a bit messy and means I cant use computer for other things. My current script for the part i'm havingrouble with below. Any suggestions/fixes?

VERSION BUILD=7300701 RECORDER=FX
TAB T=1
URL GOTO=http://apps.facebook.com/tpc-supremacy
FRAME F=1
TAG POS=1 TYPE=A ATTR=TXT:Account
TAG POS=1 TYPE=INPUT:IMAGE ATTR=ID:reset_button
TAG POS=1 TYPE=A ATTR=TXT:Reset
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:char_name CONTENT=xyz
TAG POS=1 TYPE=INPUT:IMAGE ATTR=ID:check_image
siniy
Posts: 118
Joined: Sat Nov 07, 2009 7:44 pm

Re: Need help with game scripting issue

Post by siniy » Thu Oct 06, 2011 6:30 am

run it as usual imacros script- content of the file fb.js:

Code: Select all

//enable check image
content.window.frames[0].document.getElementById('check_image').src = 'http://www.rosenrotproductions.com/supremacy/images/check.png'
content.window.frames[0].document.getElementById('clearance').value = 1
var macro;
//fill username and click check image
macro =  "CODE:";
macro +=  "FRAME F=1" + "\n"; 
macro +=  "TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:char_name CONTENT=myUsername" + "\n"; 
macro +=  "TAG POS=1 TYPE=INPUT:IMAGE ATTR=ID:check_image" + "\n"; 
iimPlay(macro)
ppsp
Posts: 3
Joined: Thu Oct 06, 2011 1:54 am

Re: Need help with game scripting issue

Post by ppsp » Thu Oct 06, 2011 11:31 am

thanks :)
Post Reply