0x90h Posted December 23, 2007 Posted December 23, 2007 Func PeopleOnline($control) Dim $aPeople[2] $aData = StringSplit(ControlGetText($hWnd,'',$control),@CRLF) ; $aData[5]="Online N of N", N < 10 $aPeople[0] = StringMid($aData[5],8,1) ; now $aPeople[1] = StringMid($aData[5],13,1) ; total Return $aPeople EndFunc $Online = PeopleOnline("Label9") this is how my function looks like, and how i would like to use it. the problem is my func does not return array of data to my variable. would you be so nice to give me a hand on this? regards 0x90 nop
James Posted December 23, 2007 Posted December 23, 2007 I think this would work: Func PeopleOnline($control) Dim $aPeople[2] $aData = StringSplit(ControlGetText($hWnd,'',$control),@CRLF) ; $aData[5]="Online N of N", N < 10 $aPeople[1] = StringMid($aData[5],8,1) ; now $aPeople[2] = StringMid($aData[5],13,1) ; total Return $aPeople[0] EndFunc $Online = PeopleOnline("Label9") I'm not positive. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Developers Jos Posted December 23, 2007 Developers Posted December 23, 2007 Works for me : #include<array.au3> $Online = PeopleOnline("Label9") _ArrayDisplay($Online) ; ; Func PeopleOnline($control) Local $aPeople[2] $aPeople[0] = 1 $aPeople[1] = 2 Return $aPeople EndFunc ;==>PeopleOnline SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
0x90h Posted December 23, 2007 Author Posted December 23, 2007 (edited) yes, it works oOfunny part is i did nothing, just started new autoit script, pasted same script code and it works oOthanks Edited December 23, 2007 by 0x90h
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now