AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Video Game Commands are not working
Goto page 1, 2  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Trenthian
Guest





PostPosted: Sat Oct 03, 2009 2:34 pm    Post subject: Video Game Commands are not working Reply with quote

Okay, I need some help.

I have written a script which should allow me to cheat (single player only.)

The game is medieval 2 Total War. I just want the hotkey to send the cheat commands in the console window. Text input works, but when I hit the hotkey combo, the hotkey doesnt send my script into the console.

I have tried many combinations of keys to get the script to fire, but i have not been successful. Nothing gets typed into the console box.

here is a look at the script.

^+M::
Send give_trait this GoodCommander 5 {Enter}
Send give_trait this AcademyTrained 2 {Enter}
Send give_trait this AssassinMaster 3 {Enter}
Send give_trait this AssasinCatcher 3 {Enter}
Return

^+U::
Send give_trait this GoodConspirator 3 {Enter}
Send give_trait this GoodSpy 5 {Enter}
Send give_trait this NaturalSpySkill 3 {Enter}
Return
Back to top
TchnclFl



Joined: 29 Jul 2009
Posts: 48

PostPosted: Sat Oct 03, 2009 6:11 pm    Post subject: Reply with quote

I think it's that plus that's throwing you off. Here's how I'd do it:

Code:
^M::
Send, give_trait this GoodCommander 5{Enter}
Send, give_trait this AcademyTrained 2{Enter}
Send, give_trait this AssassinMaster 3{Enter}
Send, give_trait this AssasinCatcher 3{Enter}
Return

^U::
Send, give_trait this GoodConspirator 3{Enter}
Send, give_trait this GoodSpy 5{Enter}
Send, give_trait this NaturalSpySkill 3{Enter}
return

_________________
Click here to get free games and computer supplies! It's easy and fun! CLICK ME!

EasyAHK
Back to top
View user's profile Send private message
Guest






PostPosted: Sat Oct 03, 2009 7:13 pm    Post subject: Reply with quote

Does not work.
still I've tried all of this.
Ive tried very basic combinations like Just m or j and while it lets me type in the console, autohotkey doesn't activate in the console window.
Back to top
Zeromod



Joined: 01 Oct 2009
Posts: 55
Location: PA

PostPosted: Sat Oct 03, 2009 7:47 pm    Post subject: Reply with quote

apparently I'm not experienced enough to post here.

Last edited by Zeromod on Sat Oct 10, 2009 10:20 am; edited 1 time in total
Back to top
View user's profile Send private message
Trenthian
Guest





PostPosted: Sat Oct 03, 2009 11:17 pm    Post subject: Reply with quote

I want to try to use the Tilde key

Like from the mapscreen, I want the flow of infor to go

Send Tilde
Send code
Return

is there a way to make a tilde? I havn't been able to locate it.
all is seems to do is put a space of some sort in there.

I tried your suggestions....

Still no go. Sad

I really appreciate the help you are giving me you guys.
Back to top
trenthian
Guest





PostPosted: Sat Oct 03, 2009 11:59 pm    Post subject: Reply with quote

Here is some additional Information

Alright in the game, you start on a map.
There are characters on the map which you select with the mouse
Once selected you push the Tilde key to open the game's console window.
from there you type give_trait Good commander 5 and it activates the code on the selected character.

The problem is, I cannot get autohotkey to even work in the game. Ill push my Shift+1 hot key in the console in the hopes that it will just automatically enter the code for me. Instead the game just inputs an !.

Ideally I would like to have it setup to enter several codes in one go, which was the original appeal of the program.
Back to top
vla



Joined: 12 May 2007
Posts: 48

PostPosted: Sun Oct 04, 2009 5:36 am    Post subject: Reply with quote

I know when i tired to make a AHK work in Everquest i could not because EQ was run in admin (vista) and the AHK program wasn't, unless i compiled it, which was a pain to do when i had to keep making alterations. Try throwing this in the start of the program.


Code:
if not A_IsAdmin
{
DllCall("shell32\ShellExecuteA", uint, 0, str, "RunAs", str, A_AhkPath
, str, """" . A_ScriptFullPath . """", str, A_WorkingDir, int, 1)
ExitApp
}
Back to top
View user's profile Send private message AIM Address
Trenthian
Guest





PostPosted: Sun Oct 04, 2009 1:57 pm    Post subject: Reply with quote

So far, everything is a no go. I know the script works in notepad.

The game just isnt recieving any of the simulated keystrokes.

Ive tried send, send event, send play...

There must be something I can do. My friend used to use autohotkey to do exactly what Im trying to do... only he doesnt have the script, and he doesnt remember how to create it. (his hard drive died)
Back to top
Zeromod



Joined: 01 Oct 2009
Posts: 55
Location: PA

PostPosted: Sun Oct 04, 2009 5:05 pm    Post subject: Reply with quote

Apparently I'm not experienced enough to post here.

Last edited by Zeromod on Sat Oct 10, 2009 10:19 am; edited 1 time in total
Back to top
View user's profile Send private message
[VxE]



Joined: 07 Oct 2006
Posts: 3254
Location: Simi Valley, CA

PostPosted: Sun Oct 04, 2009 6:39 pm    Post subject: Reply with quote

Don't forget that the backtic "`" needs to be escaped, like "``" in order to show up.
_________________
Ternary (a ? b : c) guide     TSV Table Manipulation Library
Post code inside [code][/code] tags!
Back to top
View user's profile Send private message
trenthian.
Guest





PostPosted: Sun Oct 04, 2009 11:37 pm    Post subject: Reply with quote

Still a no go.
The game just doesnt recognize anby input whatsoever from Autohotkey.

Ill push a command and none of the keystrokes occur in the game. If I alt tab out the keystrokes are being simulated still, but the game just isnt recieving them
^M::
Send, {Bind} +`
Sleep, 50
Send, give_trait this GoodCommander 5
Send, {Enter}
return

didnt work.
Back to top
tidbit



Joined: 09 Mar 2008
Posts: 1807
Location: Minnesota, USA

PostPosted: Mon Oct 05, 2009 2:47 am    Post subject: Reply with quote

Did you try any other send modes?
sendinput,
sendplay,
sendraw,
sendevent,

read: Frequently Asked Questions (FAQ)
_________________
rawr. be very afraid
*poke*
Note: My name is all lowercase for a reason.
Even monkeys fall from trees. - Japanese proverb
Back to top
View user's profile Send private message
Trenthian
Guest





PostPosted: Mon Oct 05, 2009 3:32 am    Post subject: Reply with quote

None of those seem to work either.
Back to top
tidbit



Joined: 09 Mar 2008
Posts: 1807
Location: Minnesota, USA

PostPosted: Mon Oct 05, 2009 2:48 pm    Post subject: Reply with quote

If you read the FAQ, you should then know why.
_________________
rawr. be very afraid
*poke*
Note: My name is all lowercase for a reason.
Even monkeys fall from trees. - Japanese proverb
Back to top
View user's profile Send private message
Zeromod



Joined: 01 Oct 2009
Posts: 55
Location: PA

PostPosted: Mon Oct 05, 2009 3:06 pm    Post subject: Reply with quote

apparently I'm not experienced enough to post here.

Last edited by Zeromod on Sat Oct 10, 2009 10:21 am; edited 1 time in total
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group