Jump to content
staulik

Call one function from other script - Please

Recommended Posts

Hi Friends,

I'd like to call just one of thwo functions from other sript.

My script a.au3 have:


chamarNotePad()

Func chamarNotePad()
   run("notepad.exe")
EndFunc

MessageFun('This is some message')

Func MessageFun($Msg)
  MsgBox(4096, "Result", $Msg)
EndFunc

 

my script b.au3 have

#include <a.au3>

chamarNotePad() -  This does not work because all scripts are executed.

tks.

Share this post


Link to post
Share on other sites
Posted (edited)

In the script you don't need to call chamarNotePad() at the top, just use it in b.au3

Example:

a.au3

Func chamarNotePad()
    run("notepad.exe")
EndFunc

Func MessageFun($Msg)
  MsgBox(4096, "Result", $Msg)
EndFunc

b.au3

#include <a.au3>

chamarNotePad()
MessageFun('This is some message')

 

Edited by Subz

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

×
×
  • Create New...