from what I understand the goto command is not good to use. Is the resume command proper to use?
[CODE=vb]
Dim strText As String
strText = Clipboard.GetTe xt
Select Case strText
Case "this"
' Resume next
Case "that"
' Resume Line 23
Case Else
MsgBox "Dunno what that means."
End Select
[/CODE]...
User Profile
Collapse
-
Last edited by Killer42; Jan 2 '08, 07:37 AM. -
vb 6 The line 4 and 5 are just examples i thought it a had a general idea i could fill in the blanks.Leave a comment:
-
compare text from clipboard
I managed to get my text to the clipboard now I am trying to figure out how to compare it two different options. i know the goto is not good but I'm not sure a different way to do it.
If clipboard text = "this" then goto line 4
If clipboard text = "that then goto line 5
If clipboard text = "anything else" give error message box
Thanks for any input!
Happy New... -
insert username
the (NOW) command inserts the system time. Is there a way to insert the user name of the person logged on to a xp machine? -
"The Reflection object name (Application vs session)
In versions of Reflection prior to 7.0, all methods and properties acted on the
Application object. The newer Session object is now used in all help programming examples. However, if you are creating and/or maintaining Reflection Basic scripts,
you should continue to use Application for the Reflection object name."
not sure what that means but it came out of...Leave a comment:
-
what about if waitForEvent = true then. do i have to put a goto after then or will it just go to the next line?Leave a comment:
-
do i have to put something after the then to make it goto the next line? or does it just know to do that?
the only other way i can think of is to try is GOTO statement but from what a read it is not good to use them?
is there any other simple ways to make jumps in lines other than if, then. else?Leave a comment:
-
thanks but still having trouble I will start from the beginning to make it easier.
I made a macro to sort a form and it works fine as long as every thing that it searches for is there to find. If not it times out waiting for an event. I do not know VB, The only reason I put the [ ] around [rcEnterPos, "30", "0", 6, 53] was because every time it hit a , or " it gave me an error "expected then or goto"....Leave a comment:
-
i thinking about what you said about then else does this look like it would work? does "if" and "else" have to be on there own line? how important is spacing? on some examples i see the lines after "if" and "else" are indented? if this will work i think i am starting to understand if not i am lost :)
Code:.TransmitANSI "f r8002 prev" .TransmitTerminalkey rcIBMNewLineKey
Leave a comment:
-
"If .WaitForEvent rcEnterPos, "30", "0", 6, 53 = SomeReturnValue Then"
"30", "0", 6, 53 is a cursor position i think that is what it is waiting for so would
If .WaitForEvent rcEnterPos,= "30", "0", 6, 53 then
and if it did not = "30", "0", 6, 53 it would junp to the line after end if?
can i start a line...Leave a comment:
-
jumping to another line
I made a macro to sort a report that i can edited in VB. it works 98% of the time. r8002 is what i want it to find in this part of the macro. the only time this macro does not work is if there is not any r8002 to find and it stops. I want it to skip to the next part. is there any way i can make it say
"if you do not see this"( .WaitForEvent rcEnterPos, "30", "0", 6, 53)
than skip to the...Last edited by Killer42; Sep 4 '07, 02:54 AM. Reason: Added [CODE=vb] tag. (Note there's an unclosed string turning everything red) -
date and time
the main program is IBM reflections thats where i made the macro just by clicking record and then it records my actions key strokes mouse clicks etc. at the top of the page you click on macro and you get a drop down menu then you have options like run,delete,edit (the macro) when you click on edit it opens the macro in visual basic 6. it seemed pretty simple all i had to do was add a line of code where i wanted the date...Leave a comment:
-
insert date time
i am making a macro to sort a form at the end of my macro i want to put the form name that stays the same but i would like to insert the date and time, I can edit the macro with VB the line looks something like this "form name" "07/30/07 17:45"
could some tell me the correct code for inserting date and time? and how to make it code and not text?
thanks
No activity results to display
Show More
Leave a comment: