lee321987 Posted December 30, 2010 Posted December 30, 2010 When I try to run this: Dim $aArray[2] $aArray[0] = 'arrrg' _My_Func() Func _My_Func($arg = $aArray[0]) MsgBox(0, '', $arg) EndFunc It won't run and I get this error: Badly formatted "Func" statement.
Developers Jos Posted December 30, 2010 Developers Posted December 30, 2010 I guess you want to do this: ? Dim $aArray[2] $aArray[0] = 'arrrg' _My_Func($aArray[0]) Func _My_Func($arg = "default") MsgBox(0, '', $arg) EndFunc 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.
lee321987 Posted December 30, 2010 Author Posted December 30, 2010 I can't do that, because the Func is called from a hotkey. I should have mentioned that.
Developers Jos Posted December 30, 2010 Developers Posted December 30, 2010 I can't do that, because the Func is called from a hotkey.I should have mentioned that.Then simply use the Global variable directly in the Func. 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.
lee321987 Posted December 30, 2010 Author Posted December 30, 2010 Wow, I don't know what I was thinking. Thank you. If anyone wants to delete this thread, please feel free to do so.
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