Diana (Cda) Posted September 2, 2008 Share Posted September 2, 2008 I think I have the syntax right. Pls correct me if I'm wrong, but if we want to call a script from within a loop, this is the type of thing I've seen so far to do this: While 1 Sleep(9000) _RepeatingMsg() WEnd Func _RepeatingMsg() SoundPlay(@WindowsDir & "\Media\chimes.wav") Sleep(1000) MsgBox(262192,"hello","hello",2) EndFuncBut what about if the script to be looped already has a "Func" command in there. I've run into problem in the past where you can't call another Func from within a Func. Is there another way to call a script without it? Thanks! Link to comment Share on other sites More sharing options...
Zedna Posted September 2, 2008 Share Posted September 2, 2008 But what about if the script to be looped already has a "Func" command in there. I've run into problem in the past where you can't call another Func from within a Func. Is there another way to call a script without it? You are wrong. You can't declare function inside another function. But you can call function inside another function. Wrong: While 1 Sleep(9000) _RepeatingMsg() WEnd Func _RepeatingMsg() Func _MyFunc2() MsgBox(0,"hello","func2") EndFunc SoundPlay(@WindowsDir & "\Media\chimes.wav") Sleep(1000) _MyFunc2() MsgBox(262192,"hello","hello",2) EndFunc Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
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