free2code wrote:
Erictheturtle, here's what I've discovered. What you advised only works with a Sub and not a Function, for some reason. So it works for:
Code:
WS_Exec("CSUpdate " . VBStr(Val) )
but not
Code:
WS_Eval(Success, "CSUpdate " . VBStr(Val) )
Any ideas as to why this is the case?
I still am yet to try passing several variables...
Oh sorry free2code, I missed this followup post. The problem here seems to be that you're using incorrect VBScript syntax. In VBS, to call a function with a return value, you use this syntax.
Code:
result = CSUpdate(Val)
So the AHK code should pass a similar formatted string to be evaluated.
Code:
WS_Eval(Success, "CSUpdate(" . VBStr(Val) . ")")
I wasn't paying close enough attention to your previous post to notice it had the same problem. I'm pretty sure if you had checked
ErrorLevel it would have mentioned something about this.
In the next version release of ws4ahk, I think by default I may have it display a message when there is an error.