|
-
Mar 8th, 2007, 02:56 PM
#1
Thread Starter
Lively Member
arrays, variables and sendkeys
Hello
i would like to try and make my own little autokey program with a little help, sure thiers plenty on the web..but i just want to make one realy, only difference is..instead of looping forever, i want to do it a specific amount of times, MAX
i need help with:
the interval timer and, (some macros i seen dont even select the process window to send the WORDS too but that would be nice)..but if i dont need it then i guess thats ok too any part ppl can help with will be great.
at the moment i just put a timer control, cmdbutton and texbox on a form.
Code:
dim max as integer
dim words as string
public sub command1_click()
for a = 0 to max
'how to send WORDS to a specific window and perhaps with a time delay.
next a
end sub
-
Mar 8th, 2007, 04:19 PM
#2
Hyperactive Member
Re: arrays, variables and sendkeys
I highly suggest checking out AutoIt if you just want an easy and powerful sulution.. Its a POWERFUL macro language that eliminates all the API overhead stuff needed with VB.. Actually, there is an activex dll that allows you to easy use autoit functions in VB lickity split.. Macros compile to itty bitty exe's too..
-
Mar 8th, 2007, 04:21 PM
#3
Thread Starter
Lively Member
Re: arrays, variables and sendkeys
ive almost finished it now, aint that great cud still need help, ill post in a while
-
Mar 8th, 2007, 04:38 PM
#4
Thread Starter
Lively Member
Re: arrays, variables and sendkeys
Code:
Private Sub SendKeystrokes_Click()
AppActivate txtprogram.Text
For a = 0 To maxusers
SendKeys phrase
Next a
End Sub
this sends the keys to maxusers using an array, however i need help to implement a interval so thiers a delay between sending the next user the phrase.
-
Mar 8th, 2007, 04:58 PM
#5
Hyperactive Member
Re: arrays, variables and sendkeys
There are a few ways.. Sleep(), or a While function like this:
nowtime = Timer
While Timer < nowtime + 1
DoEvents
Wend
-
Mar 8th, 2007, 06:00 PM
#6
Thread Starter
Lively Member
Re: arrays, variables and sendkeys
a gr8 ill come back to that now, i got a new problem
AppActivate txtprogram.Text
that line works great, pops my internet explorer window up..but some websites have FRAMES, and my program dont work because..the mouse hasnt selected the input box. setfocus if u know what i mean
Last edited by troubleshoot; Mar 8th, 2007 at 06:05 PM.
-
Mar 8th, 2007, 06:17 PM
#7
Hyperactive Member
Re: arrays, variables and sendkeys
You're going to need to deal with API's and HWnds etc.. Great learning experience no doubt, but if you just want something working in 5 minutes, check out that AutoIt..
-
Mar 8th, 2007, 06:52 PM
#8
Thread Starter
Lively Member
Re: arrays, variables and sendkeys
ill get autoit again now, i got the wrong version for my os, i think ill face the same proble tho
i also found this, but doesnt seem to help
http://www.pscode.com/vb/scripts/Sho...d=113&lngWId=1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|