Jump to content

Recommended Posts

Posted

if i try to call upon a func within a func... is it possible?

example: faster func inside run func

Run()

func RUN()

faster()

endfunc

func FASTER()

sleep(110)

endfunc

Posted (edited)

if i try to call upon a func within a func... is it possible?

example: faster func inside run func

Run()

func RUN()

faster()

endfunc

func FASTER()

sleep(110)

endfunc

Yuppers, you can do that, you just can't nest functions:

WILL WORK

Test()

Func TEST()

NOW()

endFUNC

Func NOW()
EndFunc

WILL NOT WORK

Func TEST()
$var = "this is a test"

    func NEW()
       TEST()
    EndFunc

EndFUNC
Edited by zackrspv

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë ë§§ëñ§ë øƒ !ïƒë.

Posted

Yup, you can even call the function itself from inside its own function!

Func Me()
     MsgBox(0, "", "")
     Me()
EndFunc

A basic example there.

Which causes a loop btw
Posted

Which causes a loop btw

JamesB only did that to show you how you could see what would happen when the recursion level has been exceeded.
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...