Jump to content

#include files


Go to solution Solved by Andreik,

Recommended Posts

Posted

Good day,

Maybe a completely redundant query, but where can I obtain information on what #include data is required to run basic scripts. I am apparently unable to obtain a precise answer to this question.

Most of my scripts are for copying and deleting data and launching applications.

At present, I am including both #include <AutoItConstants.au3> and #include <FileConstants.au3> but can honestly say I do not know why...

Thank you for any assistance that one may provide.

 

Posted

If you are not sure where your functions or constants are defined you can use SciTE's search in file. Just select the think you are looking for and the includes directory of AutoIt and you are done.

  • 1 month later...
Posted

Good day,

Real neophyte here!!!

Let me ask in this manner...can I run a basic script without #include? For example:

; -----------------------------------------------
#include <AutoItConstants.au3>
; -----------------------------------------------
global $_a="C:\Windows\toggleTaskbarAutohide.exe"
global $_f1="C:\RML\SAC\SAC64.exe C:\RML\Audio\Session_Master\Session_Master.mxs"
global $_f2="C:\RML\SAW\SAWStudio64.exe C:\RML\Audio\Session_Master\Session_Master.edl"
; -----------------------------------------------
Run($_a)
; -----------------------------------------------
Run($_f1)
Sleep(500)
MouseClick($MOUSE_CLICK_RIGHT, 27, 56, 1, 0)
Send("{F12}")
Sleep(2000)
;----------------
Run($_f2)
Sleep(500)
Send("{Alt}")
; -----------------------------------------------
MouseClick($MOUSE_CLICK_LEFT, 1562, 126, 1, 0)
Send("{o}")
; -----------------------------------------------

Please advise? Thanks!

Posted
; -----------------------------------------------

;#include <AutoItConstants.au3> ; -> now not needed
Global Const $MOUSE_CLICK_LEFT = "left"
Global Const $MOUSE_CLICK_RIGHT = "right"

; -----------------------------------------------
global $_a="C:\Windows\toggleTaskbarAutohide.exe"
global $_f1="C:\RML\SAC\SAC64.exe C:\RML\Audio\Session_Master\Session_Master.mxs"
global $_f2="C:\RML\SAW\SAWStudio64.exe C:\RML\Audio\Session_Master\Session_Master.edl"
; -----------------------------------------------
Run($_a)
; -----------------------------------------------
Run($_f1)
Sleep(500)
MouseClick($MOUSE_CLICK_RIGHT, 27, 56, 1, 0)
Send("{F12}")
Sleep(2000)
;----------------
Run($_f2)
Sleep(500)
Send("{Alt}")
; -----------------------------------------------
MouseClick($MOUSE_CLICK_LEFT, 1562, 126, 1, 0)
Send("{o}")
; -----------------------------------------------

 

  • Solution
Posted

As long you declare all your constants and functions that you use in your script you don't need to include anything. Zedna gave you such an example.

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...