Page 1 of 1

How to get return value?

PostPosted: Thu 16. Jul 2015 8:36:19
by hongshiong
How to get return value? for example Pm.logon? is there any example? and what is the return value of Pm.Logoff?

Re: How to get return value?

PostPosted: Tue 21. Jul 2015 11:32:13
by admin
Hi

Pm.Logon returns values:

nRes = Pm.Logon(sName, sPassword)

Return Values:
0 - Login succesfull.
1 - User not registered, log in failed.
2 - Password incorrect, log in failed.
-1 - Missing parameters, log in failed.

http://www.promotic.eu/en/pmdoc/Objects ... /Logon.htm

Pm.Logoff does not have return values

Re: How to get return value?

PostPosted: Tue 21. Jul 2015 14:14:07
by hongshiong
Hi, thanks for your reply, however i need to do a function like if i successfully logout ONLY then it will automatically goes to login page, it is not a suitable to used onMousePress as it goes to login page directly even i havent logout. That is why i need logout return value, so that i can set for that features.

Thanks :)

Re: How to get return value?

PostPosted: Tue 21. Jul 2015 14:18:15
by admin
No problem, you can use the onUserLogoff event:

malajec_logoff.png
malajec_logoff.png (23.34 KiB) Viewed 11011 times