473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Need help with a few lines of code (VB6)

I'm making an Automessager for a game, so I made the form with its nessesary buttons and textboxes. So now I want the program to attach to the game itself, I thought using CurrentProcess = " " but it doesnt seem to work, or the other code in the timer is wrong.

In the program a user can write a message from a textbox to a listbox, all works fine. But once in the game, I want a timer to press T, wait 50 milliseconds, read the first message from the listbox and write it to the game, wait another 50 milliseconds and then press Enter. After the interval of about 5 minutes, I want it to read the next message and do the same thing, and when all the messages are written, to start at the top of the listbox again.

Could anyone explain me how this is done ? I think I got the pressing of the buttons right:

strKey = "{vbKeyT}"
SendKeys strKey

strKey = "{vbKeyReturn}"
SendKeys strKey

But I just don't seem to figure out how the rest goes.

For the interval a user can set the amount of minutes the timer has to wait.

Timer1.Interval = Text1.Text * 60000

Is this right, or if not, could anyone help me getting this timer right?
Thanks in advance,
Evolution445
Jul 16 '07 #1
3 1137
hariharanmca
1,977 1GB
For the interval a user can set the amount of minutes the timer has to wait.

Timer1.Interval = Text1.Text * 60000

Is this right, or if not, could anyone help me getting this timer right?
Thanks in advance,
Evolution445

better you can try this

Expand|Select|Wrap|Line Numbers
  1. Timer1.Interval = val(Text1.Text) * 60000
Jul 16 '07 #2
That solved 1 problem. :)
Now I need to know how it can attach to the game, write messages from the listbox to the game when it has pressed T, and after that press Enter.
Jul 16 '07 #3
hariharanmca
1,977 1GB
write messages from the listbox to the game when it has pressed T, and after that press Enter.

can you explain little bit more?
Jul 17 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Allcomp | last post by:
Hello, I have seen something strange on a customer's computer. It is a P4 3 GHz with 512 MB Ram running on a Win2K SP3 When he uses a part of my application, it is really slow (more than 10 sec...
0
by: Jeffrey Bradshaw | last post by:
I'm trying to write a relatively simple VB.NET application to process a Word document (go through the document, count the number of lines (not sentences - lines), pages, ... ) In VBA in VB6, it...
55
by: Alex | last post by:
Hello people, The following is not a troll but a serious request. I found myself in a position where I have to present a Pro/Con list to management and architects in our company with regard to...
4
by: Daniel | last post by:
Hello, i have an assembly which is developped in C#.NET. The assembly provides two classes, one class has a method which accepts an instance of the other class as a parameter, like this: ---...
3
by: BradC | last post by:
I have a big VS 2002/2003 annoyance, and wondering if there is a way to turn it off: Put your cursor at the start of an indented line of code inside a function. (right before the first...
3
by: Steve | last post by:
Hi all, Could someone provide a link to working code examples for implementing these Sendmessage API calls in VB.NET ?? EM_GETLINECOUNT EM_GETLINE EM_LINELENGTH EM_LINEINDEX
1
by: lucky | last post by:
hi, currently i'm developing an editor where i need to add section saperation feature. if u have seen in vs.net IDE when u declares any function it add lines above and below the function to...
10
by: brooksr | last post by:
I know VB5/VBA very well but have not used VB to create web pages but need to do so. Can someone explain the purposes and differences between VBScript and VB.NET to create web pages? Also...
8
by: manmit.walia | last post by:
Hello Everyone, Long time ago, I posted a small problem I had about converting a VB6 program to C#. Well with the help with everyone I got it converted. But I overlooked something and don't...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.