|
-
Aug 3rd, 2005, 03:44 AM
#1
Thread Starter
Fanatic Member
anyone can examine with my code..
hi this is the code that i want to fix:
VB Code:
Private Sub Form_Load()
cmdGenerate.Enabled = False
txtSerialNumber.Text = ""
txtDummy.Visible = False
txtExit.Visible = False
CShell = Environ("COMSPEC")
O = Shell("CShell -u >> C:\data.txt", vbNormalFocus)
End Sub
is this correct? i want to capture the dummy.exe output into data.txt
-
Aug 3rd, 2005, 03:52 AM
#2
Re: anyone can examine with my code..
I'm not really sure what you're trying to do here, but this may be closer than what you've got.
VB Code:
O = Shell(CShell & " -u >> C:\data.txt", vbNormalFocus)
This world is not my home. I'm just passing through.
-
Aug 3rd, 2005, 04:01 AM
#3
Thread Starter
Fanatic Member
Re: anyone can examine with my code..
@trisuglow
sir, i didnt see any data.txt in the C:\
Thanks
br,
-
Aug 3rd, 2005, 04:14 AM
#4
Re: anyone can examine with my code..
What do you want to be outputted to data.txt?
The ff. works...
VB Code:
Shell "cmd /c net time >C:\ratedeeu.txt ", vbHide
-
Aug 3rd, 2005, 04:17 AM
#5
Thread Starter
Fanatic Member
Re: anyone can examine with my code..
@dee-u
i have hera a program called dummy.exe and it on runs under ms-dos prompt
i want the result to be save into data.txt
this my the code:
VB Code:
Option Explicit
Dim O As Long
Dim CShell As String
Dim CSK As New clsSendKeys
'Form Load
Private Sub Form_Load()
cmdGenerate.Enabled = False
txtSerialNumber.Text = ""
txtDummy.Visible = False
txtExit.Visible = False
CShell = Environ("COMSPEC")
O = Shell(CShell & " > C:\data.txt", vbNormalFocus)
End Sub
'Serial Number
Private Sub txtSerialNumber_Change()
If txtSerialNumber.Enabled = True Then
cmdGenerate.Enabled = True
End If
If txtSerialNumber.Text = "" Then
cmdGenerate.Enabled = False
End If
End Sub
'Generate
Private Sub cmdGenerate_Click()
CSK.Destination = O
CSK.SendKeys txtDummy.Text + vbCrLf
CSK.SendKeys txtSerialNumber.Text + vbCrLf
End Sub
'About
Private Sub cmdAbout_Click()
Call MsgBox("Saras Boxes (Activation String)" & vbCrLf & "" & vbCrLf & "Program by: monxxx - > NOKMASTERgsm (+639155618198)" & vbCrLf & "" & vbCrLf & "Thanks to: Spreader ;-)" & vbCrLf & "" & vbCrLf & "Greetings to: ed2k_5,HiTek_Promdi,rbtabanao,Kontact and for those i forgot to mention... ;-)" & vbCrLf & "" & vbCrLf & "This Windows Based program can be found on:" & vbCrLf & "" & vbCrLf & " << [url]www.tapgsm.com.ph[/url] >> ", vbOKOnly + vbInformation + vbApplicationModal, "About")
End Sub
'Exit
Private Sub cmdExit_Click()
CSK.Destination = O
CSK.SendKeys txtExit.Text + vbCrLf
End
End Sub
-
Aug 3rd, 2005, 04:21 AM
#6
Re: anyone can examine with my code..
I cant seem to see something in your code that uses dummy.exe.
-
Aug 3rd, 2005, 04:22 AM
#7
Thread Starter
Fanatic Member
Re: anyone can examine with my code..
@dee-u
off topic:
kabayan, what is ur mobile number?
-
Aug 3rd, 2005, 04:24 AM
#8
Re: anyone can examine with my code..
I cannot reveal it, I dont want catching txtmates, don't want to get into trouble.
You're from PinoyGSM?
-
Aug 3rd, 2005, 04:33 AM
#9
Thread Starter
Fanatic Member
Re: anyone can examine with my code..
@dee-u
yes.. you can't see the dummy bcoz im using sendkeys....
the dummy.exe is in the txtSerialNumber.Text
the dummy.exe(this a program) i rename it only to (dummy)
i want the dummy.exe it is from C:\dummy.exe
Now Program is Running...
ENTER DEC: 2222222
RESULT: TEST
Press any key to exit...
i want this to be captured into TextFile...
i don't wan't to use the command like this...
VB Code:
Shell("cmd.exe /c C:\dummy.exe -n > C:\data.txt"), vbNormalFocus
but this code is works perfectly... 
br,
-
Aug 3rd, 2005, 04:36 AM
#10
Re: anyone can examine with my code..
Use some
Open statement together with Print and Close and Input Line statements which ever you prefer... if you don't want to use that command that is.
-
Aug 3rd, 2005, 04:48 AM
#11
Thread Starter
Fanatic Member
Re: anyone can examine with my code..
@oceanebelle
do u have an example for that?
Thanks...
-
Aug 3rd, 2005, 05:08 AM
#12
Re: anyone can examine with my code..
Is this thread related with this thread?
-
Aug 3rd, 2005, 08:06 PM
#13
Re: anyone can examine with my code..
 Originally Posted by nokmaster
@oceanebelle
do u have an example for that?
Thanks...

Sorry missed your messages on yahoo. I'm only online for like 7-8 hours a day.. and that is IF I'm not busy so.
but here's a sample code. Now you've got to work out the details if you want to use this though. 
VB Code:
Sub LogMessage(ByVal psMsg As String)
Dim lngFileNum As Long
lngFileNum = FreeFile()
If LogFile = "" Then
Open App.Path & "\" & App.EXEName & ".log" For Append As #lngFileNum
Else
Open LogFile For Append As #lngFileNum
End If
Print #lngFileNum, Format$(Date$, "YYYY/MM/DD"), Format$(Time$, "HH:MM:SS"), psMsg & vbNullChar
Close #lngFileNum
End Sub
LogFile is either created on the current directory or in the directory specified by the user....
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
|