Jump to content

Need Help On Starting Programming With Autoit.


Recommended Posts

Starting to use this great app, but my first script I wanna make is (you guessed it) a FFXI fishing script.

I wanted to start out on this (simple, I guess) script, then see if I can make more advanced scripts.

Here is a part where I open the menu and sort my inventory (menu opens with - )

fyeo (edit)

When I ran it, it ALMOST worked ; ; but it DIDNT go "UP" one when I did Send ("{UP}"); Confirming to AutoSort.

Do I need to have NumLock on/off? Or is it my error on programming? o.o

Did I do something wrong?

Edited by agr3kko
Link to comment
Share on other sites

You may try tweaking sleep or SendKeyDelay up to higher values:

Func AutoSort()
  AutoItSetOption("SendKeyDelay", 800)
  Send ("{NUMPADSUB}{ENTER}{NUMPADADD}{ENTER}{UP}{ENTER}{ESC 2}")
EndFunc

...Just keep in mind that I've never seen the game, nor do I really understand your question -- so this is just a guess.

Link to comment
Share on other sites

Here's the whole thing:

fyeo. (edit)

Everything works fine up to the UP part... it should go up, then ENTER, then go back two menus...

but it doesnt. When it doesnt, it still leaves one menu left, thus a messed up script.

Edited by agr3kko
Link to comment
Share on other sites

You might take a look at SendKeyDownDelay too in the helfile (under the AutoItSetOption command.) Sometimes it is required to adjust that in games due to how the game will read keyboard input.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

  • Developers

I'm kinda confused ; ; where would I find that? (still a noob, *sigh*)

<{POST_SNAPBACK}>

In the HelpFile, as in Autoit.chm ......

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

GREAT! It fixed the problem flawlessly!

Set it to 4 miliseconds per. Ran it once, worked for one loop, then realized I was a dummy and didn't add that line to my loop (added it before everything else)

Thanks for the help, guys! :ph34r:

Link to comment
Share on other sites

...and didn't add that line to my loop (added it before everything else)

<{POST_SNAPBACK}>

If you're talking about SendKeyDelay or SendKeyDownDelay, you don't need it (and probably shoulnd't have it) every iteration of your loop. It's a command to set an AutoItOption, and it only needs to be called once to take effect. It will remain in effect until you change the value, or the script ends.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...