![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4
![]() |
assign to arrays
****soft ****ing vb is ****ing giving me ****ed up ****ing errors!
aaaaaaaaaah that felt better! Whats wrong in the following code: Dim comboStringArray (1 to 256) as String comboStringArray = Split(comboString, "|", 256) is there any other way to acomplish this???splitting a string into arrays and storing them as an array Thanks
__________________
Spread your wings and fly! Chicken! |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
I think you may have to use indexes 0 to 255.
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Jun 2005
Posts: 1
Rep Power: 0
![]() |
you can try this:
Dim comboStringArray() As String comboStringArray = Split(comboString, "|") you defined the var comboStringArray like a constant array "dim array(0 to 100) as string" but the split method returns a dynamic array, you must define the array like a dynamic array. |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4
![]() |
Thanks...I kinda figured it out. BTW do u guys know why the GetKeyboardState give abnormal results if DirectInput is initialized?
__________________
Spread your wings and fly! Chicken! |
|
|
|
|
|
#5 |
|
Expert Programmer
|
I believe the purpose of DirectInput is to bypass the Hardware Abstraction Layer entirely, apart from some kernel mode hooks (multimedia keyboard buttons, Ctrl+Alt+Delete etc), for the sake of performance, as DirectX manipulates drivers directly as opposed to through the OS. Hence the odd results using GetKeyboardState which is probably part of the application layer (user32.dll or something).
|
|
|
|
|
|
#6 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4
![]() |
Damn...My project has ruened!!! Wait...the "multimedia keyboard buttons, Ctrl+Alt+Delete"...does that mean control and shift and enter will still work?
__________________
Spread your wings and fly! Chicken! |
|
|
|
|
|
#7 |
|
Expert Programmer
|
So what does your project do? Is there a reason why you can't use DirectInput as opposed to the windows API (AsyncKeyState etc)?
|
|
|
|
|
|
#8 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4
![]() |
Well...my project is writing an application that takes data about user using a program which uses DirectInput and undertake a set of instructions accordingly *ahem* infinite combos *ahem*
__________________
Spread your wings and fly! Chicken! |
|
|
|
|
|
#9 |
|
Expert Programmer
|
Oh OK cool. How are you intending to get your program to simulate the key presses though: keyb_event does work, but not with programs that use DirectX for input for the same reason. Do you have a KVM, as some allow you to record and play (repeatedly!) the exact keypresses/mouse movements?
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|