Sign in to follow this  
Followers 0
wnight77

hotkey quicky

15 posts in this topic

PS forgive grammar/spelling

Ok heres the problem i have been searching these forums for awhile now looking for my specific problem to no avail...

this is so uterly simple that i figured instead of reading for 5-6 hrs trying to find a obscure reference to the issue i figured to simply ask =)

i have an "aplications" lets call it Dark age of camalot ^.^ now what im trying to do is say i hit the key "v" to start a function in my autoit script HOWEVER! i can do this! but.... it only works when my desktop is active and does not work when DAOC is active?? do i need to utilize windows API? or is there something much easyer and faster? thnx any help would be apreicated.

HotKeySet ( "1" , "charmspam" )

;=============================

Func charmspam()

$i=1

While $i==1

Send("!5")

WEnd

EndFunc

;=============================

not the entire thing but u get the idea

Share this post


Link to post
Share on other sites



this is occuring because of the keyboard hook ur game is installing.

to prevent such matters as this :P

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

PS forgive grammar/spelling

Ok heres the problem i have been searching these forums for awhile now looking for my specific problem to no avail...

this is so uterly simple that i figured instead of reading for 5-6 hrs trying to find a obscure reference to the issue i figured to simply ask =)

i have an "aplications" lets call it Dark age of camalot ^.^ now what im trying to do is say i hit the key "v" to start a function in my autoit script HOWEVER! i can do this! but.... it only works when my desktop is active and does not work when DAOC is active?? do i need to utilize windows API? or is there something much easyer and faster? thnx any help would be apreicated.

HotKeySet ( "1" , "charmspam" )

;=============================

Func charmspam()

$i=1

While $i==1

Send("!5")

WEnd

EndFunc

;=============================

not the entire thing but u get the idea

Maybe the _IsPressed() function works when the game is running

example code

while 1
      if _IsPressed("31") then charmspam()
    sleep(350);to not suck up all cpu
wend

Func charmspam()
    $i=1    
    While $i==1
        Send("!5")
    WEnd
EndFunc

this is occuring because of the keyboard hook ur game is installing.

to prevent such matters as this

Partly the game does hook but this is to speed up the input reading

it must use directx or something.

Its not possible to really avoid programs like this by games.

Only the hook they used blocks hotkey thing.

other windows keys just work like alt tab alt ctrl+del

Edited by MrSpacely

Share this post


Link to post
Share on other sites

it is possible to hook their hooks thou and mess it up to allow it to work :P

or just grab good ole olly and stop the hook alltogether and see if the program still runs correctly.

nowadays keyhooks like such are to stop macros like autoit

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

it is possible to hook their hooks thou and mess it up to allow it to work :P

or just grab good ole olly and stop the hook alltogether and see if the program still runs correctly.

nowadays keyhooks like such are to stop macros like autoit

they could use bait like fishing use bread it works

Edited by MrSpacely

Share this post


Link to post
Share on other sites

hmm _is pressed is not in the autoit help and i get an error when i try and use it any ideas?

Share this post


Link to post
Share on other sites

hmm _is pressed is not in the autoit help and i get an error when i try and use it any ideas?

Try beta

beta is more stable has more function then crappy 3.1.1.0 version

Althought if you really like the crappy 3.1.1 then

;In this little example pressing n will pop up a message
;pressing Esc will leave.
;While 1
;  If _IsPressed('1b') = 1 Then Exit;1b is ESC
;  If _IsPressed('4e') = 1 Then MsgBox(0, '', 'Wow');4e is the N
;  Sleep(10)
;Wend

;Exit
Func _IsPressed($hexKey)
; $hexKey must be the value of one of the keys.
; _IsPressed will return 0 if the key is not pressed, 1 if it is.
; $hexKey should entered as a string, don't forget the quotes!
; (yeah, layer. This is for you)
  
  Local $aR, $bO
  
  $hexKey = '0x' & $hexKey
  $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey)
  If Not @error And BitAND($aR[0], 0x8000) = 0x8000 Then
     $bO = 1
  Else
     $bO = 0
  EndIf
  
  Return $bO
EndFunc ;==>_IsPressed

#cs
  01 Left mouse button
  02 Right mouse button;does not works in my system...
  04 Middle mouse button (three-button mouse)
  05 Windows 2000/XP: X1 mouse button
  06 Windows 2000/XP: X2 mouse button
  08 BACKSPACE key
  09 TAB key
  0C CLEAR key
  0D ENTER key
  10 SHIFT key
  11 CTRL key
  12 ALT key
  13 PAUSE key
  14 CAPS LOCK key
  1B ESC key
  20 SPACEBAR
  21 PAGE UP key
  22 PAGE DOWN key
  23 END key
  24 HOME key
  25 LEFT ARROW key
  26 UP ARROW key
  27 RIGHT ARROW key
  28 DOWN ARROW key
  29 SELECT key
  2A PRINT key
  2B EXECUTE key
  2C PRINT SCREEN key
  2D INS key
  2E DEL key
  30 0 key
  31 1 key
  32 2 key
  33 3 key
  34 4 key
  35 5 key
  36 6 key
  37 7 key
  38 8 key
  39 9 key
  41 A key
  42 B key
  43 C key
  44 D key
  45 E key
  46 F key
  47 G key
  48 H key
  49 I key
  4A J key
  4B K key
  4C L key
  4D M key
  4E N key
  4F O key
  50 P key
  51 Q key
  52 R key
  53 S key
  54 T key
  55 U key
  56 V key
  57 W key
  58 X key
  59 Y key
  5A Z key
  5B Left Windows key
  5C Right Windows key
  60 Numeric keypad 0 key
  61 Numeric keypad 1 key
  62 Numeric keypad 2 key
  63 Numeric keypad 3 key
  64 Numeric keypad 4 key
  65 Numeric keypad 5 key
  66 Numeric keypad 6 key
  67 Numeric keypad 7 key
  68 Numeric keypad 8 key
  69 Numeric keypad 9 key
  6A Multiply key
  6B Add key
  6C Separator key
  6D Subtract key
  6E Decimal key
  6F Divide key
  70 F1 key
  71 F2 key
  72 F3 key
  73 F4 key
  74 F5 key
  75 F6 key
  76 F7 key
  77 F8 key
  78 F9 key
  79 F10 key
  7A F11 key
  7B F12 key
  7C-7F F13 key - F16 key
  80H-87H F17 key - F24 key
  90 NUM LOCK key
  91 SCROLL LOCK key
  A0 Left SHIFT key
  A1 Right SHIFT key
  A2 Left CONTROL key
  A3 Right CONTROL key
  A4 Left MENU key
  A5 Right MENU key
#ce

it was tested wiht 3.1.1 i think

but I noticed 3.1.1 crashing on me often and beta much less

Share this post


Link to post
Share on other sites

hmm _is pressed is not in the autoit help and i get an error when i try and use it any ideas?

You will need to install Beta / _isPressed is documented in beta help


Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad

Share this post


Link to post
Share on other sites

thank you installing and reading now also thnx for the example

Share this post


Link to post
Share on other sites

You will need to install Beta / _isPressed is documented in beta help

Actually its just a udf wich was not added when 3.1.1 was released

so you can use the udf in 3.1.1 wich i tested some time ago

but yes install beta is better :P

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

getting some odd error unknown functions name <i included misc.au3

Line64 (file c:\programs\au3\include\mis <right path im abreiating>

local $p = DllStructCreate($struct)

local $p=^ERROR

unknown functions name

thats the errow window in a nut shell

maybe user 32 needs to be included?

Edited by wnight77

Share this post


Link to post
Share on other sites

getting some odd error unknown functions name <i included misc.au3

Line64 (file c:\programs\au3\include\mis <right path im abreiating>

local $p = DllStructCreate($struct)

local $p=^ERROR

unknown functions name

thats the errow window in a nut shell

maybe user 32 needs to be included?

Ok you have installed Beta Autoit but have you reconfigured SciTE to use Beta definitions?


Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

lol dun know prob not thats what i get for rushing it

and not reading the install stuff hehe <looks around for the stuff>

ok i figured it out lol i toggled it on

huray now to make this super long and complicated now that i know the basicas thnx guys

Edited by wnight77

Share this post


Link to post
Share on other sites

lol dun know prob not thats what i get for rushing it

and not reading the install stuff hehe <looks around for the stuff>

ok i figured it out lol i toggled it on

huray now to make this super long and complicated now that i know the basicas thnx guys

yes Its the beta thing but the ispressed I posted was the old version wich doens't use DLL struct

so if you donot use beta you could that version

Share this post


Link to post
Share on other sites

yup i got this all working perectly thnx for the tips guys

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