wuschelbeutel Posted June 14, 2012 Share Posted June 14, 2012 (edited) #include <Array.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> ;~ #Include "../ScreenCapture/FindBMP.au3" ;~ #Include "../ScreenCapture/ScreenCaptureFixed.au3" #Include "ScreenCapture/FindBMP.au3" #Include "ScreenCapture/ScreenCaptureFixed.au3" Global $aResult = _FindBMP("SCREEN","TOP_LEFT.bmp") MsgBox(0, $aResult[2], $aResult[3]] ERROR: can't open include file "ScreenCapture/FindBMP.au3". I have that stuff in an Au3 that I saved on the desktop. On the desktop i have FindBMP.au3 and ScreenCaptureFixed.au3 saved and an image file TOP_LEFT.bmp. I also have a folder on the desktop called ScreenCapture and in it are FindBMP.au3 and ScreenCaptureFixed.au3. I also tried #Include "FindBMP.au3" Edited June 14, 2012 by wuschelbeutel Link to comment Share on other sites More sharing options...
BrewManNH Posted June 14, 2012 Share Posted June 14, 2012 Are you running the script from the desktop folder? If not, you're pointing to the wrong folder when you try to use the include statement. Also, Windows uses backslashes "" in the path statement, you're using forward slashes, not sure if it affects things, but you should stick with Windows conventions when working in Windows. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
wuschelbeutel Posted June 14, 2012 Author Share Posted June 14, 2012 (edited) Yes, I'm running the file from the Desktop and unfortunately backslash didn't work either.I also realized that those scripts have "include once" directives in them, so I tried including only the FindBMP.au3 (since it's dependent on ScreenCapture). Unfortunately, that didn't work either.These are the Scripts I'm using:I verified for potential Typos and didn't find any.I will now try #include <filename> while putting the files in C:Program FilesAutoIt3IncludeEdit: Works! Edited June 14, 2012 by wuschelbeutel Link to comment Share on other sites More sharing options...
Zedna Posted June 14, 2012 Share Posted June 14, 2012 http://www.autoitscript.com/wiki/Adding_UDFs_to_AutoIt_and_SciTE Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
wuschelbeutel Posted June 14, 2012 Author Share Posted June 14, 2012 Thanks for the links, Are the registry edits really needed for includes that are in the same folder as the script you're running? I'd rather just dump it in the installation directory's Include folder then (and make a backup). Link to comment Share on other sites More sharing options...
Zedna Posted June 14, 2012 Share Posted June 14, 2012 (edited) Prefered way: In Scite pres Ctrl+1 --> SciteConfig --> define User Include Dir, for example: C:Program FilesAutoIt3Include_User then click Save+Apply and copy your UDF to this directory. In this way you don't need to do any registry hacks. Edited June 14, 2012 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
BrewManNH Posted June 14, 2012 Share Posted June 14, 2012 (edited) This line #Include "..ScreenCaptureFindBMP.au3" is telling the script to look for the file one directory level up from the script directory, then in that folder look for the screencapture folder and in the screencapture folder look for FindBMP.au3. So, if running Windows XP it's looking in the folder "C:Documents and SettingsScreenCapture", on Vista/7 it's looking in "C:UsersScreenCapture". That's where your problem probably lies. Either user ".ScreenCapture" or just "ScreenCapture" if the include file is in the same folder as the script file.EDIT: Fixed formatting because this forum software sucks Edited June 14, 2012 by BrewManNH If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
microera Posted June 24, 2012 Share Posted June 24, 2012 Prefered way:In Scite pres Ctrl+1 --> SciteConfig --> define User Include Dir, for example: C:Program FilesAutoIt3Include_Userthen click Save+Apply and copy your UDF to this directory. In this way you don't need to do any registry hacks.I press Ctrl + 1 ... but nothing hapen in SciTE-Lite editor!?p.s.i want to "include directory" ...How to include one or more directories in AutoIt? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 24, 2012 Moderators Share Posted June 24, 2012 microera,You need the full SciTE4AutoIt3 package from here - then you get the SciTEConfig tool as well. Or you can do it manually as explained in the Adding UDFs to AutoIt and SciTE tutorial in the Wiki. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
microera Posted June 24, 2012 Share Posted June 24, 2012 WOW! Thanks Melba23! Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted June 24, 2012 Share Posted June 24, 2012 (edited) You don't need to do that, see BrewManNH's post. You are looking in the wrong folder.Edit: You are not even the right guy. Shut up. Edited June 24, 2012 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
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