Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 22nd, 2005, 1:28 AM   #1
rsnd
Hobbyist Programmer
 
rsnd's Avatar
 
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4 rsnd is on a distinguished road
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!
rsnd is offline   Reply With Quote
Old Jun 22nd, 2005, 12:54 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
I think you may have to use indexes 0 to 255.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Jun 22nd, 2005, 1:21 PM   #3
fabricioz
Newbie
 
Join Date: Jun 2005
Posts: 1
Rep Power: 0 fabricioz is on a distinguished road
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.
fabricioz is offline   Reply With Quote
Old Jun 23rd, 2005, 7:54 AM   #4
rsnd
Hobbyist Programmer
 
rsnd's Avatar
 
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4 rsnd is on a distinguished road
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!
rsnd is offline   Reply With Quote
Old Jun 23rd, 2005, 8:02 AM   #5
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
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).
Rory is offline   Reply With Quote
Old Jun 23rd, 2005, 8:36 AM   #6
rsnd
Hobbyist Programmer
 
rsnd's Avatar
 
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4 rsnd is on a distinguished road
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!
rsnd is offline   Reply With Quote
Old Jun 23rd, 2005, 8:59 AM   #7
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
So what does your project do? Is there a reason why you can't use DirectInput as opposed to the windows API (AsyncKeyState etc)?
Rory is offline   Reply With Quote
Old Jun 23rd, 2005, 12:50 PM   #8
rsnd
Hobbyist Programmer
 
rsnd's Avatar
 
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4 rsnd is on a distinguished road
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!
rsnd is offline   Reply With Quote
Old Jun 25th, 2005, 7:17 PM   #9
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
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?
Rory is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:14 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC