Sign in to follow this  
Followers 0
Glyph

Can you declare a function in a....

3 posts in this topic

Is it possible to declare a function inside of a variable?

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("GET", "http://www.bsed.somee.com/T2T/Download1.txt", @SW_HIDE)
$oHTTP.Send()
$Variable1 = _Getvar1()
$Variable2 = _Getvar2()


MsgBox(0,"test","read: "&$Variable1&" "&$Variable2)
;InetGet(""&$variable1, ""&$variable2, 1, 1)
;While @InetGetActive
 ; TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16)
 ; Sleep(250)
;Wend
Func _Getvar1()
$oHTTP.Responsetext
EndFunc

Func _Getvar2()
$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("GET", "http://www.bsed.somee.com/T2T/Download2.txt", @SW_HIDE)
$oHTTP.Send()
$oHTTP.Responsetext
EndFunc

...?


tolle indicium

Share this post


Link to post
Share on other sites



If I understand your script correctly, then you are just getting the return value from the function.

$return = function()

func function()
return 5
endfunc

$return = 5

:whistle:

Share this post


Link to post
Share on other sites

I need it to not download a file if it finds certain text in a text file will not download thus eliminated continuous downloads in a loop., any help??


tolle indicium

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0