| View previous topic :: View next topic |
| Author |
Message |
noob-attack Advanced Cheater
Reputation: 0
Joined: 08 May 2006 Posts: 71
|
Posted: Tue Aug 21, 2007 8:39 pm Post subject: VB - Hello guys! Mind to help? |
|
|
Ok guys
i started learning VB 2 days ago ,
So i want to make an auto macro , that will click the keys :
ctrl + S
in same time , like activate a key , but i cant seem to make it .
please help me any one of you , i will Rep you!
thank you!
What i am asking is :
A Button that when you click it actiavtes the timer to click Alt + S.
|
|
| Back to top |
|
 |
zart Master Cheater
Reputation: 0
Joined: 20 Aug 2007 Posts: 351 Location: russia
|
Posted: Tue Aug 21, 2007 8:47 pm Post subject: Re: VB - Hello guys! Mind to help? |
|
|
| noob-attack wrote: | Ok guys
i started learning VB 2 days ago ,
So i want to make an auto macro , that will click the keys :
ctrl + S
in same time , like activate a key , but i cant seem to make it .
please help me any one of you , i will Rep you!
thank you!
What i am asking is :
A Button that when you click it actiavtes the timer to click Alt + S. |
if i remember correctly from about ten years ago when i used vb3 a little, you could use sendkeys - which is a damn ugly way to get things done - but it would be easier than explain api calls to you...
example;;
Shell "notepad", vbNormalFocus
SendKeys "This is a test string%Fx"
That should type the string, hit alt + F then x to exit... though I'm not testing this just doing it from memory..
_________________
0x7A 0x61 0x72 0x74
TEAM RESURRECTiON |
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Tue Aug 21, 2007 8:51 pm Post subject: |
|
|
SendKeys "Key1+Key2" dont know vb but it should be like that...
like VK_F1+VK_F2
|
|
| Back to top |
|
 |
zart Master Cheater
Reputation: 0
Joined: 20 Aug 2007 Posts: 351 Location: russia
|
|
| Back to top |
|
 |
noob-attack Advanced Cheater
Reputation: 0
Joined: 08 May 2006 Posts: 71
|
Posted: Tue Aug 21, 2007 9:06 pm Post subject: |
|
|
Hey guys and thank you for the quick reply .
But , the first 2 answers are wrong , that doesnt even belong to VB
The ctrl key of VB is ^ and it should be like this :
SendKeys "^S"
But it doesnt seem to work , thats why im asking for help.
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Tue Aug 21, 2007 9:12 pm Post subject: |
|
|
^+S? just a guess...
u can use keydown ctrl and make a check if S is pressed and then release both
|
|
| Back to top |
|
 |
zart Master Cheater
Reputation: 0
Joined: 20 Aug 2007 Posts: 351 Location: russia
|
Posted: Tue Aug 21, 2007 9:13 pm Post subject: |
|
|
| noob-attack wrote: | Hey guys and thank you for the quick reply .
But , the first 2 answers are wrong , that doesnt even belong to VB
The ctrl key of VB is ^ and it should be like this :
SendKeys "^S"
But it doesnt seem to work , thats why im asking for help. |
Ahhh well % must be alt or something...
What code are you trying? What I quickly typed up won't work, because you havn't initialized sendkeys. What error are you getting.
Try the following from the link i posted;
| Code: |
Dim objKeys
Dim bSuccess
Set objKeys = CreateObject("SKey.SKeys")
bSuccess = objKeys.ActivateApp "Microsoft Word"
If bSuccess Then objKeys.SendKeystrokes("The quick brown fox")
Set objKeys = Nothing
The same example using Javascript:
var objKeys = new ActiveXControl("SKey.SKeys");
var bSuccess = objKeys.ActivateApp("Microsoft Word");
if (bSuccess) {
objKeys.SendKeystrokes("The quick brown fox");
}
|
Part of asking questions... Is reading the answer - we're not going to MAKE a program for you. We can help you with pseudo code, but don't take it on face value. I was merely pointing you in the right direction.
_________________
0x7A 0x61 0x72 0x74
TEAM RESURRECTiON |
|
| Back to top |
|
 |
TheIndianGuy Advanced Cheater
Reputation: 102
Joined: 14 Jan 2007 Posts: 85
|
|
| Back to top |
|
 |
noob-attack Advanced Cheater
Reputation: 0
Joined: 08 May 2006 Posts: 71
|
Posted: Thu Aug 23, 2007 3:13 pm Post subject: |
|
|
Hum .. you guys didnt get me
i dont need the program
just which key is Ctrl + S
i made teh button already and all .
i just need to know which one is Ctrl + S
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Thu Aug 23, 2007 3:25 pm Post subject: |
|
|
| Code: |
Timer1.Enabled = True
|
| noob-attack wrote: | | A Button that when you click it actiavtes the timer |
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
TheIndianGuy Advanced Cheater
Reputation: 102
Joined: 14 Jan 2007 Posts: 85
|
Posted: Thu Aug 23, 2007 3:55 pm Post subject: |
|
|
| noob-attack wrote: | Hey guys and thank you for the quick reply .
But , the first 2 answers are wrong , that doesnt even belong to VB
The ctrl key of VB is ^ and it should be like this :
SendKeys "^S"
But it doesnt seem to work , thats why im asking for help. |
sendkeys.send
| noob-attack wrote: | Hum .. you guys didnt get me
i dont need the program
just which key is Ctrl + S
i made teh button already and all .
i just need to know which one is Ctrl + S |
yes i did understand you and i did understand your question you need to use sendkeys.send or e.keycode
you can use sendkeys.send just look up a chart probably on the msdn forums that has the list of keys you can use and the code for each one well good luck on your program im sorry i cant be of more assistance. also you are asking for a hotkey remember google is your friend
_________________
"The flame that burns twice as bright burns half as long" |
|
| Back to top |
|
 |
|