|
-
Nov 8th, 2004, 11:46 AM
#1
Thread Starter
Hyperactive Member
'If' Question
What I'm trying to do is hard to explain but I'll give it my best shot.
Quick example:
VB Code:
Public Localcheat As String
If FindWindow("blahblah", vbNullString) Then Localcheat = "BanReason"
End If
Now here's the printing of the ban above:
VB Code:
Dim blah As String
blah = BanReason
Dim Fnum As Integer
Fnum = FreeFile
Open "C:\blahblah.txt" For Output As Fnum
Print #Fnum, "" & blah & ""
Close Fnum
I don't think that's how to do it but that's why I'm here, again . Hopefully you get my point when reading those.
Last edited by Tantrum3k; Nov 8th, 2004 at 11:54 AM.
-
Nov 8th, 2004, 01:14 PM
#2
Sorry, I don't really understand what your're trying to do.
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Nov 8th, 2004, 01:30 PM
#3
You haven't explained anything at all. What is the problem?
-
Nov 8th, 2004, 02:31 PM
#4
Adding "" will not actually do anything. If you are trying to enclose the string 'blah' in quotes, use write instead of print, or add Chr(34). If you are trying to add a space, you might add Chr(32).
My usual boring signature: Nothing
 
-
Nov 8th, 2004, 05:30 PM
#5
Frenzied Member
You can also use 4 quotes to inclue a quote.
""""
-
Nov 8th, 2004, 09:01 PM
#6
Should that be
blah = "BanReason"
or
blah = Localcheat
?
And no, you make no sense.
-
Nov 9th, 2004, 03:25 AM
#7
Print #Fnum, "" & blah & ""
could just as easily be
write #Fnum, blah
-
Nov 9th, 2004, 03:32 AM
#8
Also use a naming convention...it's much easier to read:
VB Code:
Public mstrLocalcheat As String
Dim lngFNum As Long
lng = Long
str = String
and the 'm' in the mstr bit means that it's decalred at the top of a module, and not in a function.
Woka
-
Nov 9th, 2004, 10:48 AM
#9
I'm kind of opposed to warting, but slowly coming around to it because it is pretty convenient as long as you have consistent system. MS has a prefered style (Hungarian Notation), and apparently the badger has a style too....gee, I am SO surprised at that. However, which system is best probably depends on your personality and work environment.
There's no rule to it, it's just an idea that might make it easier to maintain your code.
My usual boring signature: Nothing
 
-
Nov 9th, 2004, 11:24 AM
#10
New Member
Are you trying to have your program look for a window handle and if its open display the message? not sure if thats what you are after if so its simple if you know the windows handle. Hwnd
-
Nov 10th, 2004, 01:57 AM
#11
Add the Checkmark and the word [RESOLVED] to the subject of the first post in your thread
if your question has been answered satisfactorily.
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
|