Jump to content

Search the Community

Showing results for tags 'include'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 16 results

  1. Func z009() If FileExists("search\009\009.au3") Then #include <search\009\009.au3> EndIf EndFunc This wont work... Is there any workarround for this or I should do it in a different way?
  2. How do i add a path to a file in Include. I want my script to get the udf in the same folder as the script/exe: Include "@ScriptDir/udf.au3" can this be done?
  3. I have recorded a gui installation and modified the au3 file as per my requirement. But the problem is, whenever I try to compile the au3 file, I am getting a special character on top of the file. Can you suggest how to resolve this as it is appearing everytime during compilation. And also I am trying to include a au3 file which is separate folder so I am adding the <..\Library.au3> line. It is able to pick that but in that file "Library.au3" there is a file install line. FileInstall(".\SendMail.ps1", @ScriptDir & "\SendMail.ps1") Library.au3 is being used by many other codes in the previous folder.. But the current file is looking for the ps1 file in current folder. So is there any option to tell the compiler to pick the dependent files relative to Library.au3 instead of the current code.
  4. Hi all. I have created an external au3 (a library of functions and vars) that is #included in a main script that i must compile. I wish that the content of the library is not merged with the main script when compiling. My goal is to keep the ability to modify the library even after the main exe is compiled and that these changes are effective when executing the exe. I guess this is not possible using the standard #include method. Is there a way to do that ? thx a lot :-)
  5. Hey AutoIT Community, Just wanted to know if there is a way I can #include all *.au3 files in my script without having to #include each individual .au3 file. For instance, currently I have a laundry list of #includes like this: #include <IE.au3> #include <Inet.au3> #include <AutoItConstants.au3> #include <GUIConstantsEx.au3> #include <GDIPlus.au3> #include <GuiMenu.au3> [ECT...ECT...] Would there be a way I could include all of the files above or all .au3 file in a one liner? That way I do not have to burn up a bunch of lines of code for just my includes.... Your help is greatly appreciated...
  6. Is there possibility to do it like this? Cause as I see compiler doesn't see If statement in case of #include functions. It includes these two files all time. If $var == True Then #include 'func/funcsByTabs/main_Moda.au3' Else #include 'func/funcsByTabs/main_Others.au3' EndIf
  7. Good afternoon AutoIt community!, I was on Stackoverflow the other day and came across this question: How To Include Files From A Directory. This got me thinking... There has to be a way to do it... After a bunch of research, I wasn't able to find anything. So, I created this UDF to dynamically include every file from the directory. Of course, there are some bugs that I'd like to fix eventually, but for the most part, it works. Simply call the main function (Shown below) right after the rest of the includes before any of your actual code, and the UDF will include all of the au3 files in the specified directory. Without further ado, here is the _includeDir UDF and how to use it! _includeDir.au3 Download this code (_includeDir.au3 attached as well) and place it into the directory with your current script. Next, include it in your main file. For now, I'm going to be using one called Example.au3. #Include "_includeDir.au3" Now, include whatever else you're going to be including in this script, then call the _includeDir function. NOTE: THIS MUST BE CALLED AT THE TOP OF THE SCRIPT, BEFORE ANY CODE IS WRITTEN! THE FUNCTION FORCES THE SCRIPT TO RESTART SO PUTTING IT LATER IN THE SCRIPT WILL RE-RUN THE CODE! Example.au3 #Include "_includeDir.au3" #Include <File.au3> ; Not needed. Just here as an example of a normal script. #Include <Array.au3> ; Not needed. Just here as example of normal script. _includeDir("Directory to Include") MsgBox(0,"Example","This is just an example!") See how the function is called near the top? This is the proper use of the UDF. If you had a folder called "Directory to Include" and had a bunch of .au3 files inside of it, the function would include them all into the Example.au3 script. If you run the Example.au3 file now, it will most likely tell you "The directory Things to Include does not exist!". Make sure you enter the name of the directory you're trying to include. Just as a side note, when including files, you should put all of the code in the INCLUDED files inside of functions so they aren't automatically run when included. Variables can be outside of the functions so they are automatically set. Remember, if you have a variable in one included file with the same name of variable in another included file, it will be overwritten with whichever include file was included last. Anyways, if you have pointed the directory to include parameter to a folder that exists and run the Example.au3, it will generate a folder called IncludeDirUDF. It will also write a new line inside of Example.au3. It will write the line on line one. Of course, you don't always want it to be written to line one, right? Maybe you want this bit of code to be written on line 3 in order to keep your code organize. Is there a way to do this? Absolutely! Simply add the line number as a second parameter to the function. For example, we want to have this bit of code written on line 3, we would set up our Example.au3 file to look like this. #Include "_includeDir.au3" #Include <File.au3> ; Not needed. Just here as an example of a normal script. #Include <Array.au3> ; Not needed. Just here as example of normal script. _includeDir("Directory to Include", 3) MsgBox(0,"Example","This is just an example!") See how we added the 3 to the end of _includeDir? This will tell the function to write the #Include "IncludeDirUDF\loadIncludes.au3" on line 3 of Example.au3. Note, the line HAS TO EXIST in order to be written to it. For example, if your Example.au3 code only has 6 lines, and you specify to be written on line 7, it WILL NOT WORK. The code is designed to include and restart in order to process the included files. For some reason, if you want to JUST generate the included file and NOT restart, you can add one more parameter to the code. If you don't want the code to restart, simply set your code up to look like this: #Include "_includeDir.au3" #Include <File.au3> ; Not needed. Just here as an example of a normal script. #Include <Array.au3> ; Not needed. Just here as example of normal script. _includeDir("Directory to Include", 3, False) MsgBox(0,"Example","This is just an example!") Note, if you set this last parameter to false, it will simply generate the included file and write to line 3 of Example.au3 (As specified before) and exit before the code reaches the MsgBox() and it will not be displayed. The last important thing to note: In order to re-include a different set of files, you must delete the #Include "IncludeDirUDF\loadIncludes.au3" from your main script (In this case, Example.au3) and delete the generated file, IncludeDirUDF. Now you can simply rerun Example.au3 and it will include any the dir with any changes you made to it. Only .au3 files should be in the directory you're trying to include as it will not process the other files and will generate an error. I hope this UDF helps somebody out! Comment any questions/concerns you may have and I will try to address them as soon as possible! Thanks, Timothy CEO - Amarok Studios _includeDir.au3
  8. Hey guys I have a script in which I have included some self-made files in the script directory. In these files I have various variables defined. This is how the file is included and then called in the main script: #include "Data\test.au3" MsgBox(0,"",$variable1) test.au3 could contain something like: $variable1 = "Hello1" $variable2 = "Hello2" $variable3 = "Hello3" Now, if I want to change the value of $variable1 and then run the script, no problem. The script uses the new edited variable. But If I compile the script, the includes are compiled within the EXE file as intended. Now, if I change the value of $variable1 and run the EXE file, it doesn't look for my change, since it uses whatever variable that was defined when the script was compiled. Is there any way that I can have files with variables that changes, and then have a compiled version using these changes, without having to compile again? Thanks in advance. David
  9. Is there any way to skip the execution of a particular block of code like any condition or expression, if the au3 file is included as library.? Like, in my code I wrote all the functionality as functions and called them in 4 lines. Now I have another requirement where I need to use the same code but different.So I am importing this code so that I can use these functions. But the code block which is outside the functions (main code) is being executed when I import the au3 file.Is there any condition to check whether the file is running directly or included in another au3 file as library, so that I can keep the same here. Please suggest if any ideas.
  10. Hello , X:\Root Folder\Sub Folder Root Folder contains the script to include in the script located in Sub Folder... Is it possible without specifying the exact path? #include "X:\Root Folder\Sub Folder" Thanks in Advance! TD
  11. in the file button/ BLoginvip72.au3 I want to get data of file input/ Passwordvip72.au3 and input/Usernamevip72.au3 in file button . #include <AutoItConstants.au3> #include <MsgBoxConstants.au3> #include "..input/Passwordvip72.au3" #include "..input/Usernamevip72.au3" :(, Erros ,Please, help me.
  12. Hello, I was browsing the help file (as recommend by many members) & I found out a new way to include a file I am using this: #include "...\Includes\StringSize.au3"But I get this error: Error opening the file I have already re-checked the filenames Thanks in advance, TD
  13. www.autoitscript.com/forum/topic/155442-arraymulticolsort-initial-release-16-oct-13 When I try to include Melba's ArrayMultiColSort.au3 in my large program and the current beta, I get this... So I thought it must be an incompatibility with the beta. But if I put just the before mentioned code in a new file, it *does* seem to accept the include in the beta! Therefore my question...
  14. I don't know why there are many external files that are not existed on the pre-written functions of AutoIt software.. The examples in this page are telling to include "MsgBoxConstants.au3" but I doesn't have one: http://www.autoitscript.com/autoit3/docs/functions/GUIGetMsg.htm Where can I download the TRUSTED and the official "MsgBoxConstants.au3" file?
  15. I'm writing a tray based program, and for every different option the user selects, the icon changes... I add the #include"icon.ico" where icon.ico would be the icon name obviously... But when I compile the program with the offical autoit compiler it doesn't seem to include the icons... Any clue what I'm doing wrong?
  16. I have a GUI script and setup Case with Variables and then functions for each case. The script runs fine with no errors until I add something into this one function (for a button on the GUI that when pushed, should simply launch a website). Not sure if I need the entire code here or if someone can identify whether I'm just unable to accomplish this within a Func / EndFunc. Syntax Check shows no errors in the script when this portion of the script is simply: Func _OpenDIDButton() EndFunc But when I take that portion of the script, and add something inside of it, such as: Func _OpenDIDButton() #include <IE.au3> _IECreate ( [$s_Url = "about:blank" [, $f_tryAttach = 0 [, $f_visible = 1 [, $f_wait = 1 [, $f_takeFocus = 1]]]]] ) EndFunc Then I run Syntax Check and it reports: C:\Program Files\AutoIt3\Include\WinAPIError.au3(29,1) : ERROR: syntax error Func ^ Is that referencing line 29, character 1? Line 29 is in this portion: While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GenChecklistButton _GenCheckListButton() Case $EmailMgrsButton _EmailMgrsButton() Case $DisableADButton _DisableADButton() Case $OpenDIDButton _OpenDIDButton() EndSwitch WEnd
×
×
  • Create New...