Jump to content
Sign in to follow this  
OaK

Faster script execution

Recommended Posts

You might want to look into PixelChecksum.

Build a checksum for each possible letter...

"Scrape the screen" at the start of your script

and only send words with those letters.

Simple, ain't it?

Edit: typo - cannot blame the keyboard this time

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Just put all the words in a StringSplit() and For...Next loop.

$Words = StringSplit("1,2,3,4,5,6,7",","); replace the numbers with all of your words
For $I = 1 To $Words[0]
   Send($Words[$I])
   Send("{ENTER}")
Next

Edit: Didn't see there was a second page lol.

Edited by Burrup

qq

Share this post


Link to post
Share on other sites

Ok, guys I'm almost there... I just need to increase the speed of the script execution by 250-350%....

Here's the code

AutoItSetOption ( "SendKeyDelay", 0 )

AutoItSetOption ( "SendKeyDownDelay", 1)

SLEEP(5000)

SEND("aahing{ENTER}aaliis{ENTER}aarrgh{ENTER}abacas{ENTER}abacus{ENTER}abakas{ENTER}abamps{ENTER}abas

ed{ENTER}abaser{ENTER}abases{ENTER}abasia{ENTER}abated{ENTER}abater{ENTER}abates{ENTER}abatis{ENTER}

abator{ENTER}abbacy{ENTER}abbess{ENTER}abbeys{ENTER}abbots{ENTER}abduce{ENTER}abduct{ENTER}abeles")

SEND("abelia{ENTER}abhors{ENTER}abided{ENTER}abider{ENTER}abides{ENTER}abject{ENTER}abjure{ENTER}abla

te{ENTER}ablaut{ENTER}ablaze{ENTER}ablest{ENTER}ablins{ENTER}abloom{ENTER}ablush{ENTER}abmhos{ENTER}

aboard{ENTER}aboded{ENTER}abodes{ENTER}abohms{ENTER}abolla{ENTER}abomas{ENTER}aboral{ENTER}aborts")

SEND("abound{ENTER}aboves{ENTER}abrade{ENTER}abroad{ENTER}abrupt{ENTER}abseil{ENTER}absent{ENTER}abso

rb{ENTER}absurd{ENTER}abulia{ENTER}abulic{ENTER}abused{ENTER}abuser{ENTER}abuses{ENTER}abvolt{ENTER}

abwatt{ENTER}abying{ENTER}abysms{ENTER}acacia{ENTER}acajou{ENTER}acarid{ENTER}acarus{ENTER}accede")

SEND("accent{ENTER}accept{ENTER}access{ENTER}accord{ENTER}accost{ENTER}accrue{ENTER}accuse{ENTER}aced

ia{ENTER}acetal{ENTER}acetic{ENTER}acetin{ENTER}acetum{ENTER}acetyl{ENTER}achene{ENTER}achier{ENTER}

aching{ENTER}acidic{ENTER}acidly{ENTER}acinar{ENTER}acinic{ENTER}acinus{ENTER}ackees{ENTER}acnode")

SEND("acorns{ENTER}acquit{ENTER}across{ENTER}acting{ENTER}actins{ENTER}action{ENTER}active{ENTER}acto

rs{ENTER}actual{ENTER}acuate{ENTER}acuity{ENTER}

If ANYONE has any ways to make this faster please explain your coding suggestions completely as I just got the program a few days ago.

Share this post


Link to post
Share on other sites

Ok, guys I'm almost there... I just need to increase the speed of the script execution by 250-350%....

Here's the code

<{POST_SNAPBACK}>

Ok, what about using "ControlSend" instead? I find that executes faster than regular 'ole "Send"

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

can anyone verify that its faster rather than me just trying it?

<{POST_SNAPBACK}>

There's no way for us to verify that it runs faster on your code without actually having your code.

I know for a fact that ControlSend runs faster then Send in the applications that I use it for. By a minimum estimated 300 ms....in fact, I had to increase my wait times on some of my functions and build other waiting routines for specific screen locations before executing the next part of the program. ControlSend was executing "too fast" if there's such a thing. :):(::(

YMMV.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

ControlSend and ControlSetText will not work when there is no controlID shown in the "info tool". Correct?

I could find no controlID in either the online version of this game or in the downloaded version.

Like I said yesterday:

You might want to look into PixelChecksum.

Build a checksum for each possible letter...

"Scrape the screen" at the start of your script

and only send words with those letters.

Read the manual for PixelChecksum

Search the forum for PixelChecksum and scrape

later....


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

I'm very new to the program, If you could explain how pixelcheck works and maybe supply and example of it so that I would know where to start. Thanks.

Share this post


Link to post
Share on other sites

I'm very new to the program, If you could explain how pixelcheck works and maybe supply and example of it so that  I would know where to start.  Thanks.

<{POST_SNAPBACK}>

See this http://www.autoitscript.com/forum/index.ph...180entry77180 for some info on using PixelChecksum.

I've never used PixelChecksum in a script, so I can't just post some code. There are many challenges to overcome to write a script that will do what you want... but I'm sure that it can be done. If I were taking on this problem, I would tackle the part of it that I see as the hardest first:

"....only send words with those letters."

If you cannot do that, then I do not see how to reduce the time like you said:

"...I have already coded but it takes nearly an hour to execute and I was hoping to execute it in under 90 seconds"

As I understand PixelChecksum, you can define an area on the screen and PixelChecksum will generate a number for that area as a function of the pixels inside it. You can define an area just the size of each letter (larger than the letter and smaller than the circle around it) and thus generate a unique number (via PixelChecksum) for each possible letter and put that data in your script. Then during a game - perform a PixelChecksum for each rectangle where a new letter will appear. That way you will know which letters to make words from to be sent to the puzzle.

Since you are working with a webpage, I think that you will need to generate a PixelChecksum value for GameHouse logo and include that in your script. Then manually position the entire game square in view and start your script - it will need to find* the location of the logo and use that location to "tell" the script where the letters (rectangles to be searched) are.

*generate a number for a small rectangle, compare to the "logo number", if different, move rectangle and repeat loop until a match is found.

According to posts that I've seen, it takes time to scrape a screen - so I would have the script locate the logo and pause (maybe via msgbox) and then you can come back to the game and manually start it - then have your script continue... just do not move the screen during play.

I fear that I've not been all that clear. Let me know if you want any part of my ramblings clarified.

To the others on the forum - if you have a better way to do this, jump in. If any of what I've said is not possible via AutoIt3 or is just plain stupid, let me know.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...