Jump to content

newb ?: Can I use command keys to start/stop macro


Guest nomp
 Share

Recommended Posts

making my own script for ffxi, but want to be able to start/stop from within the game...

wondering if it is possible, cant find it in the help file

edit: just searched and found the post about hotkeyset, cant find delete in the edit menu

Edited by nomp
Link to comment
Share on other sites

One of my um game clickers

But I think I will steal a bit of larry's code for anouther of my projects :whistle:

$x=2
hotkeyset("{Pause}","Start"); Initially this will start the macro
hotkeyset("!^e","exit1"); this exits the macro from memory

While 1
    If $x=1 Then
  If WinActive("MyGame") Then
                      ;Insert your code here, I have mine pressing 0 over and over.
 ;mouseclick("left")
     Send("0")
     Sleep("3000")
  Else
     Exit(1)
  EndIf
    EndIf
    Sleep(1)
Wend

Func Stop()
$x=2
hotkeyset("{Pause}","Start"); changes to make Pause start macro
EndFunc

Func Start()
$x=1
hotkeyset("{Pause}","Stop"); changes to make Pause stop macro
EndFunc

Func exit1()
Exit(1)
EndFunc
Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

Guest swiftuser

I played with the hotkeyset and it really seemed to work great for notepad. However in FFXI it seems all hotkey ability is turned off--meaning no matter what hotkey I set it would not activate from in-game. As you can imagine numerous code paths could be run through nicely based on hotkeys if the AutoIT could get them.

Basically, in the same way they have disabled the windows key from pulling up windows function--likely no hotkey is allowed to trigger the background application or script. Any ideas for using a toggle or other switches in game? Of course there is the possibility of using one of the windows mode hacks to alt-tab in and out of the game, but that is not too helpful in having different buttons to automate several tasks.... Any ideas appreciated.

Edited by swiftuser
Link to comment
Share on other sites

If you're running Win NT/2k/XP, AutoHotkey has a keyboard hook that might be able to circumvent the game's suppression of hotkeys (then again, it might not depending on how low a level the game is operating at).

Use the $ prefix when defining a hotkey to force the hook to be used, e.g.:

$#c::MsgBox, This is the Win-C hotkey, implemented via keyboard hook.

Edit: If the first attempt to use AutoHotkey as above fails, it's possibly because the game is using a keyboard hook also. In that case, a sneaky workaround may help: Load AutoHotkey after loading the game (perhaps by alt-tabbing out of the game). By doing this, AutoHotkey's hook should be "on top of" the game's hook and thus take precedence (i.e. it will have the "first shot" at deciding what to do with a key, before the game even sees it).

Edited by cmallett
Link to comment
Share on other sites

Guest Austinwichita

Try setting the hotkey to CTRL-ALT-UP

This should work from within FFXI... At least I have had other programs that I can access using that particular hotkey. Although that WAS before the previous updates..

Also, I have been problems with FFXI myself.

I want to set up a script that will call up the item menu from within the game.

I am using

SEND ("^i")

and that command does absolutely nothing, whereas if I manually press CTRL-i then the item menu pops up. Alternatively, I can use ALT-I, and the script command for it --

SEND ("!i")

isn't working either..

Any suggestion?

and I am VERY new at this so please explain.. even then I will probably have to take 20 minutes and figure it out once you do explain it so please.. lol.. be nice.

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...