Jump to content


make a game interface the same between two web platforms


  • Please log in to reply
5 replies to this topic

#1 EJennez

EJennez
  • Guests

Posted 10 October 2012 - 12:04 AM

Im trying to make a game interface the same between two web platforms to integrate an account into my scripts. The width property on the facebook platform is 100% and the kongregate platform is 760. I want the facebook interface to be 760. by repeatedly entering fb.game.com i come to the interface striped of the facebook shell that is stretched to 1000 pixels. I have edited the value and inserted into fb.game.com however the interface adopts the new properties for a second and then the page refreshes back to 1000 pixels in width.

WidthSearch = "100
bodytext := Pwb.Document.body.innerhtml
StringGetPos, swfWidthLocation, bodytext, %WidthSearch% 
widthAttribute := SubStr(bodytext, swfWidthLocation +2, 4)
stringreplace, fixedbodytext, bodytext, widthAttribute, 760
pwb.document.body.innerhtml := fixedbodytext


#2 GodlyCheese

GodlyCheese
  • Members
  • 593 posts

Posted 10 October 2012 - 12:28 AM

So what do you need help with? Is the issue refreshing the page? If so then a simple Click command would be a decent solution, or COM if you're using IE.

#3 Guests

  • Guests

Posted 10 October 2012 - 11:35 AM

So what do you need help with? Is the issue refreshing the page? If so then a simple Click command would be a decent solution, or COM if you're using IE.


Yes its the page refresh that is the issue because it doesn't kept my edits after the refresh. A click command could prevent the issue? And I am using IE.

#4 GodlyCheese

GodlyCheese
  • Members
  • 593 posts

Posted 10 October 2012 - 03:23 PM

No a click command would not prevent this issue, I was simply saying that you could use a click command or COM to automate the refreshing process. Refreshing is neither the problem or the solution here, your problem is trying to distort the game's window. I highly recommend that you use a mathematical equation to change the locations of the Clicks (or whatever you use to play this game) based on the WinTitle (since you said Kong and Facebook each had different window sizes.) That should be a decent solution, yes?

Another possible solution would simply be porting the game out of IE and putting it in your own GUI, that way it prevents you from trying to play it on a 3rd website with a 3rd window size that wouldn't work. I don't think there's a practical way to force IE to break its window reliably.

#5 EJennez

EJennez
  • Guests

Posted 10 October 2012 - 07:41 PM

Using Chrome's debugging tool I was able to re-size the swfobject.embed properties to match without a refresh. The problem there is my scripts refresh the game if they cant figure out where they are in the environment. It doesn't happen often but when it does Im back to a wide interface which isnt stretched it just has a bigger window into the game. The Math solution would be simple addition and I have thought about it. As for a GUI id eventually get to that but I thought the above mentioned code would be a quick fix so I could get that Alt and my fb guild mates going soon. Is there anyway the above code will work or should I abandon it outright? Is more Information needed to make that assessment?

#6 GodlyCheese

GodlyCheese
  • Members
  • 593 posts

Posted 10 October 2012 - 09:39 PM

I cannot make that assessment, you'd have to ask someone more experienced (possibly try the IRC.) However putting the game into a GUI is probably simpler than you think. As I recall all you need to do is add ActiveX and a link to the game, I spent quite some time looking for an example. The only one I could recall was on a silly thread asking about stopping the end of the world, which seems to have disappeared.

Ironic. I do so wish moderators wouldn't delete threads with scripts posted on them, regardless of how silly the threads are. Some people like me still reference them >_>

In any case I wish you luck.