Sign in to follow this  
Followers 0
baconspud

Simple script help

10 posts in this topic

I have used AutoIT before to write simple fishing scripts and such for online games. I was trying to write a very very simple script to actually help me get through the incredibly annoying mini-games on an old PC version of FF7.

Script plan:

Simply press numpadenter for X amount of time then release ... wait Y amount of time ... rinse and repeat

The problem:

No commands are going through to the FF7 client (window is labeled DEFAULT). I have created scripts for WoW and FFXI and in both cases I could simply put a delay at the begining of my script allowing myself time to Alt-tab over to the correct window, or I would have AutoIT find and switch to the correct window. Neither of these approaches are allowing me to send any commands to this simple client side program.

Please help an idiot out.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

hmmm.....anyone got a crystal ball? Mine isn't quite working...

http://www.autoitscript.com/fileman/users/gafrost/cbemoticon.gif

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

Posted Image

Does mine work?

Share this post


Link to post
Share on other sites

Try ControlSend?


- Dan [Website]

Share this post


Link to post
Share on other sites

As I said, very simple code:

$win_title = "DEFAULT"

WinActivate($win_title, "")

WinSetOnTop($win_title, "", 0)

$repeats = 0

Sleep(5000)

while $repeats > 10

Send("{NUMPADENTER DOWN}")

Sleep(1000)

Send("{NUMPADENTER UP}")

Sleep(1000)

$repeats = $repeats + 1

wend

Share this post


Link to post
Share on other sites

Like this?

$x = 5 ;seconds to wait
$y = 5 ;seconds to wait

Local $i_Timestamp
While 1
$i_Timestamp = TimerInit()
While (TimerDiff($i_Timestamp)/1000) <= $x ;multiply by 1000 to convert it into milliseconds, because computers use milliseconds, not seconds
    Send("{NUMPADENTER}") 
Wend
ConsoleWrite("Just finished press." & @LF)
sleep($y * 1000);multiply by 1000 to convert it into milliseconds, because computers use milliseconds, not seconds
ConsoleWrite("Just finished sleep."&@LF)
Wend

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

As I said, very simple code:

$win_title = "DEFAULT"

WinActivate($win_title, "")

WinSetOnTop($win_title, "", 0)

$repeats = 0

Sleep(5000)

while $repeats > 10

Send("{NUMPADENTER DOWN}")

Sleep(1000)

Send("{NUMPADENTER UP}")

Sleep(1000)

$repeats = $repeats + 1

wend

Figured out my problem.

It appears that

Send("{NUMPADENTER DOWN}")

is not being recognized at all. All I had to do was change my in-game bindings from numpadenter to another key (s) and my script worked flawlessly. Thanks for your help guys and for pointing out my <> mistake. Is it normal that keys like numpadenter should not be able to be held down by the script, or was this unique to my machine?

Share this post


Link to post
Share on other sites

Oh yes, and if anyone happens to feel nostalgic and want to go back and play FF7 ... here is a script for easy unlimited gold in the golden saucer basketball minigame:

$win_title = "DEFAULT"

WinActivate($win_title, "")

WinSetOnTop($win_title, "", 0)

$repeats = 0

Sleep(5000)

while $repeats < 1000

Send("{S DOWN}")

Sleep(450)

Send("{S UP}")

Sleep(3000)

$repeats = $repeats + 1

wend

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  
Followers 0