Sign in to follow this  
Followers 0
Lillis

Simple simulation of a keystroke followed by RMB-click?

3 posts in this topic

Hello!

I've been looking around for a solution to this but haven't come up with anything that works the way I want it to.

First off, I'm trying to create a hotkey-system for a game called Sacred. For some odd reason, the developers decided not to include remapping within the game, and it gets kind of clonky. Well, absurdedly clonky to be honest. I've used AutoIt before for other games (although merely left-mouseclicks), so I have some experience with it. I figured out a way of making this game work pretty well, using AutoIt in conjunction with KeyTweak.

Anyway, at first I tried this:

HotKeySet ("6", "UseSkillslot1")

Func UseSkillslot1()
    Send("{6}")
    MouseClick ("right")
EndFunc

What I want it to do is when I press "6", the game should switch to skill-slot 1 (same as manually pressing "6") and then perform a right-click at the cursors current position, all within the same tap.

The above code didn't work, well except for the MouseClick part, so I also tried replacing the send-part with:

Send("{ASC 054}")

...which worked. However, the game's way of displaying items on the ground as well as nearby targets is holding ALT, so while it worked, I also got a flicker of everything available each time I executed the function.

Is it possible to simulate pressing 6 (or any number for that matter) without using the ASC resulting in the annoying effect descibed?

Thanks in advance.

Share this post


Link to post
Share on other sites



Lillis,

I'm trying to create a hotkey-system for a game called Sacred

You obviously missed this on your way in. :>

We do take this prohibition seriously, so you will NOT get any help here.

See you soon with a legitimate question, I hope. :unsure:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Oh, darn it! :embarrassed: I'm terribly sorry, I did miss that. I read the full terms of use when I registered, and I guess I automatically thought that would be it.

While I can get behind the prohibition in general myself, it does strike me as a tad ridiculous to enforce a 'law' against bots/automation on an attempt to combat initial developer fudge with an alternative hotkey-system. Then again, I'll respect the prohibition since if it's allowed to be discussed, there'll most likely be a lot of moot points everywhere.

Sorry to let you down, but I wouldn't be all too sure I'll be posting a "legitimate question", unfortunately. I only registered to get help with this particular issue of correctly labelling/syntax'ing "Send [number]" without getting the ALT-effect in this situation. I mean, I could rephrase the whole post and exclude any mentioning of it being for the purpose of a game, and repost it, but since it'll still be me pretty much asking the very same core question, it'll be quite obvious that my purpose is still the same, which'll still result in illegitimacy.

Thanks for the heads up, and cheers! :unsure:

Oh, and obviously, feel free to delete the thread. :>

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