Code: Select all
dhGetValue("%T", @Result, ".Screen.Area(%d, %d, %d, %d, %m, %b)", 8, 8, 8, 22, 1)
Code: Select all
dhGetValue("%T", @Result, ".Screen.Area(%d, %d, %d, %d, %m, %b)", 8, 8, 8, 22, 1)
Code: Select all
dhGetValue("%T", @Result, Session,".Screen.Area(%d, %d, %d, %d, %m, %b)", 8, 8, 8, 22, 1)
Code: Select all
Do
Loop Until Session.Screen.OIA.Xstatus = 0
Code: Select all
Define.l Result = 1
While Result
dhGetValue("%d", @Result, Session,".Screen.OIA.Xstatus")
Wend
Code: Select all
dhGetValue("%v", @Result.variant, ...)
debug Result\vt
Code: Select all
Define.l Result = 1
While Result
dhGetValue("%d", @Result, Session,".Screen.OIA.Xstatus")
Wend
Code: Select all
Procedure TestOIA()
Define Resultat.l
Resultat = 1
Repeat
dhGetValue("%d", @Resultat, Session,".Screen.OIA.Xstatus")
Until Resultat = 0
Delay(500)
EndProcedure
Kwaï chang caïne wrote:A last question please, and i disappear.
I promises you
Kwaï chang caïne wrote:Hello i'm back
do you define the variable 'Session' global?Kwaï chang caïne wrote:What is wrong ????
Code: Select all
Procedure TestOIA(Session.l) ...
Code: Select all
Procedure TestOIA()
Define Resultat.l
Resultat = 1
Repeat
dhGetValue("%d", @Resultat, Session,".Screen.OIA.Xstatus")
Until Resultat = 0
Delay(500)
EndProcedure
RunProgram ("C:\Program Files\atra.exe")
Delay(5000)
Global System.l
Global Session.l
Global Result.l
dhToggleExceptions(#True)
System = dhCreateObject("atra.System")
If System
dhGetValue("%o", @Session, System, ".ActiveSession")
If Session
dhCallMethod(Session, ".Screen.SendKeys(%T)", @"Coucou")
TestOIA()
dhGetValue("%T", @Result, Session,".Screen.Area(%d, %d, %d, %d, %m, %d)", 15, 37, 15, 71, 1)
TestOIA()
dhFreeString(Result)
dhFreeString(Resultat)
dhReleaseObject(Session)
Else
MessageRequester("", "Couldn't create Session-Object")
EndIf
dhReleaseObject(System)
Else
MessageRequester("", "Couldn't create System-Object")
EndIf
Code: Select all
Procedure TestOIA(Session.l)
then this could work too :Global allows the variables to be used as global, ie: they can be accessed inside a Procedure. In this case the command Global for the according variables must be called before the declaration of the procedure. Each variable can have a default value directly assigned to it.
Code: Select all
Global System.l
Global Session.l
Global Result.l
Procedure TestOIA()
Define Resultat.l
Resultat = 1
Repeat
dhGetValue("%d", @Resultat, Session,".Screen.OIA.Xstatus")
Until Resultat = 0
Delay(500)
EndProcedure
RunProgram ("C:\Program Files\atra.exe")
Delay(5000)
dhToggleExceptions(#True)
System = dhCreateObject("atra.System")
If System
dhGetValue("%o", @Session, System, ".ActiveSession")
If Session
dhCallMethod(Session, ".Screen.SendKeys(%T)", @"Coucou")
TestOIA()
dhGetValue("%T", @Result, Session,".Screen.Area(%d, %d, %d, %d, %m, %d)", 15, 37, 15, 71, 1)
TestOIA()
dhFreeString(Result)
dhFreeString(Resultat)
dhReleaseObject(Session)
Else
MessageRequester("", "Couldn't create Session-Object")
EndIf
dhReleaseObject(System)
Else
MessageRequester("", "Couldn't create System-Object")
EndIf
For all results (strings, long, object ...) always a pointer (byref) requiredDare wrote:You appear to be using @session (address of) in the one case and just session (value of contents) in others.
Edit: Not saying this is the reason, just wondering.