Jump to content

{NIMPAD2 DOWN} problem


Recommended Posts

I am famillure with programing (C, C#, C++, and VB.net), but new to this language.

I seem to be having a problem with a specific command.

When runing the problem area I get

NN

and nothing else.

My objective is to hold down the numpads down arrow

Am I simpilly scripting this wrong?

Sleep(2000) ;time to activate program

;Problem area

Send("{NUMPAD2 DOWN}")

Sleep(5000)

Send ("{NUMPAD2 UP}")

;exicutes a command from a menu, this part works

Sleep(400)

Send ("{F8}")

Sleep(400)

Send ("{TAB}")

Sleep(400)

Send ("{ENTER}")

Sleep(400)

Send ("{UP}")

Sleep(400)

Send ("{ENTER}")

Sleep(400)

Send ("{ENTER}")

Link to comment
Share on other sites

OK, I have tried the peramiter in a number of different formats (Using Excell as the test bench, with the numlock off)

Send ("{SHIFTDOWN}{NUMPAD2DOWN}{SHIFTUP}")

Sleep(5000)

Send ("{SHIFTDOWN}{NUMPAD2UP}{SHIFTUP}")

returned: NN

Send ("{SHIFTDOWN}NUMPAD2DOWN{SHIFTUP}")

Sleep(5000)

Send ("{SHIFTDOWN}NUMPAD2UP{SHIFTUP}")

Returned NUMPAD@DOWNNUMPAD@UP (as I exepeted, but i had to try it)

Send ("{SHIFTDOWN}{NUMPAD2DOWN}")

Sleep(5000)

Send ("{SHIFTUP}")

Returnrd N

Send ("{SHIFT DOWN}{NUMPAD2 DOWN}")

Sleep(5000)

Send ("{SHIFT UP}")

Returnrd s2

Send ("{SHIFTDOWN}")

Send ("{NUMPAD2DOWN}")

Send ("{SHIFTUP}")

Sleep(5000)

Send ("{SHIFTDOWN}")

Send ("{NUMPAD2UP}")

Send ("{SHIFTUP}")

Returned NN

If I havent used the command how you seggested, please show me an exampil line of code.

Link to comment
Share on other sites

I seem to recall that even though a key is pressed the system inturprets it as a key pullsing quickly. (I may be wrong )

SO... if i wer to use a FOR loop

For $i = 1 to 5000 Step 1

Send ("{NUMPAD2}")

Next

could I acheve the result I want without having to use the {numpad2down} command?

Or would the system inturpret it at the button having been presses 5000 times?

Edited by JustCodeIT
Link to comment
Share on other sites

Does it have to be the numberpad down arrow? If not, Just use {DOWN} instead.

<{POST_SNAPBACK}>

yes the game is specific about which key is used

the directional buttons are used to change your point of view over the map and the numpad used to move you.

Link to comment
Share on other sites

OK I found another post having a simmular problem trying to hold down a key perhaps the syntax could be edited to have the hold down command different.

Send("{key}[DOWN]")

Send("{key}[uP]")

or

Send("{key} , [DOWN]")

Send("{key} ,[up]")

I also tryed to use the current beta version (which was the solution in his instance) and it had no effective differance.

Edited by JustCodeIT
Link to comment
Share on other sites

The key thing you said is "game".  There is no guarantee on anything working as expected with a game because the game may be doing things differently than Windows and most normal applications.

<{POST_SNAPBACK}>

Bein a C programer I had considered that option, except that all of the returned values for my secod post were typed using the coresponding code. I'm betting its a problem with my useage because it returnes the same values when tested in excel, notepad, and a VB.net standard Rich text box.I might think that I am at least activating the correct button if it was returning 2, no charictor, or if changing the numlock status changed the charictor returned (NO, NO, AND NO). But what is causing it to return the N charictor?

Currently I can get numbers and letters to be held down but I can't hold anything on the number pad down. Odly all of the {NUMPAD#DOWN} combonations return the charictor N? As if AutiIT knowes what to do with the 1st part of the command ({N}) but doesn't understand the rest of the command thus discarding it as bad code. However if this is what AutiIT is doing why no error window?

If you have a line of code that can hold down any numlock button I would like to see it.

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