Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Class files and WaitForString method

Status
Not open for further replies.

NakedZero

Technical User
Oct 27, 2004
21
US
I don't claim to be any sort of expert or guru, and this is my first time posting, so thank you all in advance, I have found this forum to be a helpful :)

My question is this: how do I use the WaitForString function in a class file? I have to assume it is close to the waitfor cursor which I have like this:

Public Function WaitForCursor(ByVal lRow As Long, _
ByVal lCol As Long) As Boolean

sTemp = moExtra.Screen.WaitForCursor(lRow, lCol)
End Function

So what I have tried is this :

Public Function WaitForText(ByVal sText As String, _
ByVal lRow As Long, _
ByVal lCol As Long) As Boolean

sTemp = moExtra.Screen.WaitForString(sText, lRow, lCol)


End Function


but when i use it in the form like this:

.WaitForText ("the", 1,2)

vb gives me an error "expected:="

any help on this would be much appreciated!
 
Ok, so I answered My own question:

in a class file put this:

Public Function WaitForText(ByVal sText As String) As Boolean

sTemp = moExtra.Screen.WaitForString(sText)

End Function

then in your form put this:

.WaitForText "text I am waiting to appear on screen
 
Looks like your rewriting the same function.

Just use it like this:

.WaitForString "text I am waiting to appear on screen" (optional X,Y)

calculus
 
Yes I re-wrote the function so that I could put it in a class file, and use it with several different sessions, we have at times needed up to 16 different session windows open, and using that function in a class file just seems to make more sense to me, I just wasn't sure how to do it...
 
NakedZero,

Quick question after reading your thread .... where did you get the function calls WaitForString, WaitForCursor, and WaitForText ??

I have ProcommPlus 4.8 installed and the only command or function calls that are in the code are WaitFor ?????

Do you have some additional code or macros from somewhere
besides the Symantec build ??
 
I think I found them in the Attachmate help files. I have not used ProcommPlus, so am not familiar on how you would use the functions with that software, hopefully someone else can shed some light.... Sorry :( But if you need additional code on what I have just let me know, and I can post.
 
NakedZero,

Now you really got me thinking ...
I came to know the Aspect language by only using ProcommPlus 4.8, and likewise registered for this forum after doing searches for Aspect & Procomm forums.
I am using the help files in ProcommPlus to learn the code, but I am confused as to where "Attachmate" comes in to and what code base you are using ??
- Can you explain and/or post a link to your code or developemnt system if other than ProcommPlus ??
 
NakedZero,

Now you really got me thinking ...
I came to know the Aspect language by only using ProcommPlus 4.8, and likewise registered for this forum after doing searches for Aspect & Procomm forums.
I am using the help files in ProcommPlus to learn the code, but I am confused as to where "Attachmate" comes in to and what code base you are using ??
- Can you explain and/or post a link to your code or developemnt system if other than ProcommPlus ??
 
here is a link to the attachate site:
The code, is Basic so it might be similar to what you are using. For example we used to use a program called Reflections, and the programs look visually identical, but the programming is slightly different. Let me know if you need any more info,

Erik
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top