Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/27/2015 in all areas

  1. This forum (Au3 Technical) is inhabited by luminaries whose posts frequently demonstrate understanding far beyond my capabilities. For that reason, and at Jon's suggestion, I am reaching out to tap into your wisdom for a project that I have been working on a for a while. I was looking for a way to give back to AutoIt. As a self-taught programmer I have learned an incredible amount from this forum and the help file. It has been very rewarding. Over the course of my personal experiences I have wished, at times, that even though the materials and support are truly incredible - that someone could explain some of the more basic concepts. At the same time, I saw the creation of code.org and I started to think that AutoIt would be a perfect learning tool for people starting out (because of the simplicity, the incredible help file, and the best forum I have ever seen). All of that led to the creation of this text: https://www.autoitscript.com/forum/files/file/351-learn-to-program-using-free-tools-with-autoit/. It is the first draft of a basic introduction to programming using AutoIt. Nobody has reviewed it. Accordingly, I seek the collective constructive feedback of anyone willing to offer opinion as to content, spot any errors, and make any suggestions to improve it. My goal was always to donate it to the AutoIt forum when it was done. I think it could be a good addition to fill the gap for neophytes who may crave to see how everything fits together. The last thought I will leave you with - similar to the first - is that I am not the world's greatest coder (this may be a case of those who can do and those who can't teach). That said, I am hoping that the issues you will undoubtedly spot are not huge or threatening to the overall effort and that you appreciate the fact that this took some time to pull together. I look forward to hearing your thoughts.
    1 point
  2. You can find a lot of libraries (DLLs) to create OpenGL windows and contexts, to load images and data into textures, to load 3D models, and to call functions that are not in opengl32.dll. Are all these external libraries necessary? The zip files below contains UDFs to create contexts, load images and models, and call functions without any external libraries. They also contains a number of examples. Well, it's not quite true that I do not use any DLLs at all. In some examples I'm using The Embedded Flat Assembler (FASM) UDF by Ward (includes fasm.dll) to optimize loops. This is the ExLauncher, that can be used to run the examples: Press Play to run the first example, and Next to run the following examples. In the Samples menu you can select OpenGL 1.1, 2.1, and 3.3 examples. With Samples | Models you can open the 3D model Viewers, and run 3D model examples. With Samples | Templates you can see a number of templates, as you can use as a start for your own examples. The documentation is divided into five chapters: Chapter 1 is mostly about OpenGL 1.x. Topics like calling functions, creating a rendering context, and loading images into textures are also covered.Chapter 2 deals with OpenGL 2.x and the new concepts that appeared in these versions. Most important is the concept of shaders.Chapter 3 is mostly about OpenGL 3.x. There is also a section on OpenGL/GLSL versions and a section on error handling.Chapter 4 is about implementing a model loader for Wavefront (OBJ) 3D models.Chapter 5 is a summary.In bottom of the post you can download zip files. Use ExLauncher.au3 in top folder to run examples. To view Wavefront (OBJ) 3D models see section 4.0. Chapter 1 is mostly about OpenGL 1.x. Topics like calling functions, creating a rendering context, and loading images into textures are also covered. 1.1 Calling functions Functions defined in OpenGL 1.2 and higher and functions defined in extensions are part of the software that belongs to the video card. To access these functions you normally use a function loading library e.g. GLEW. You can also access the functions manually: 1.2 Rendering contexts (Update 2013-09-21) With OpenGL 3.0 and higher there are more ways to create a rendering context. In the OpenGL wiki the terms simple and proper are used to describe two different types of contexts. Update: New MSAA context. 1.3 Textures and images (Update 2013-09-21) A texture is an OpenGL object that contains an image. Without an image loading library or at least an image loading function it can be tricky to load an image into a texture. These functions loads BMP, GIF, ICO, JPG, PNG, RGB, RGBA, TGA, TGA(RLE), TIF and WMF files. Update: Anisotropic filter (bottom of spoiler). 1.4 OpenGL 1.1 examples (Update 2013-08-03) SamplesOpenGL 1.1 contains the OpenGL 1.1 examples. Here is a list: 1.5 Run examples (Update 2013-08-03) You can run examples in the Samples folder by double clicking, or you can run them from Scite. The easiest is to use ExLauncher.au3 in the top folder: 1.6 Threads example Imagine that when you move the mouse across the screen, it'll create a track on the screen that follows your mouse. Then imagine that there isn't just one track, but many tracks that are slightly offset relative to each other. This is threads: Chapter 2 deals with OpenGL 2.x and the new concepts that appeared in these versions. Most important is the concept of shaders. 2.1 New concepts In the last versions of OpenGL 1.x and especially in version 2.0 and 2.1 a new set of concepts showed up. It was concepts such as shaders, attributes, uniforms and vertex buffer objects (VBOs): 2.2 Shaders Shaders were introduced in OpenGL 2.0. A shader is a program running on the GPU. You write a shader in the OpenGL Shading Language (GLSL). It's a C-like language: 2.3 Math functions When you use shaders in OpenGL 2.0 and higher you don't use old functions like glMultMatrix, glRotate, glTranslate, gluLookAt or gluPerspective. You have to use a new set of functions that works with the functionality of the shaders: 2.4 OpenGL 2.1 examples (Update 2013-06-16) SamplesOpenGL 2.1 contains the OpenGL 2.1 examples. All these examples are based on shaders and the new concepts in OpenGL 2.1. Here is a list: Chapter 3 is mostly about OpenGL 3.x. There is also a section on OpenGL/GLSL versions and a section on error handling. 3.1 OpenGL versions OpenGL versions and corresponding GLSL version: 3.2 Error handling OpenGL error handling is done with glGetError and glGet-functions. Initialize error handling before a group of commands and check errors after the last command. Here error handling is illustrated with LoadGLSLshader in oglIncludesoglLoadShaders.au3: 3.3 OpenGL 3.3 examples (Update 2013-06-16) SamplesOpenGL 3.3 contains the OpenGL 3.3 examples. Most of these examples are added in an update on 2013-06-16. Chapter 4 is about implementing a model loader for Wavefront (OBJ) 3D models 4.0 View 3D models (New 2014-05-04) Added a few pictures that shows how the model Viewers works. 4.1 3D models (New 2013-08-03) When you need a 3D model in your OpenGL project you probably just want to find the model on the internet and load it into your project with some kind of model loading function. 4.2 Wavefront (OBJ) loader (Update 2013-09-21) A Wavefront 3D model (Wavefront .obj file) consists usually of two files: An OBJ-file (Object files) which contains vertices, texture coordinates, normal vectors and face triangles to describe the geometry of the model. And a MTL-file (Material files) with material definitions to describe the look of the model. Material definitions are parameters for the OpenGL glMaterial command to describe the light reflectivities of the surface of the model, and definitions of texture maps to put on the surface of the model. 4.3 Wavefront (OBJ) viewer (Update 2013-09-21) SamplesModelsModel Viewer contains two viewers for Wavefront (OBJ) 3D models. Model Viewer (OBJ) 1.1.au3 is an OpenGL 1.1 version (2.0 or lower) and Model Viewer (OBJ) 2.1.au3 is a 2.1 version (2.1 or higher). Model Viewer (OBJ).au3 calls the proper script depending on your OpenGL version. The latter can be opened through the Tools menu in ExLauncher.au3. 4.4 Example models (Update 2013-09-21) The Models folder at the top level contains the example models. The SamplesModels folder at the top level contains the viewers and the au3-scripts to run the examples. Example models are split into two groups: Samples and models. Models are further divided into three groups: Small, medium and large models: 4.5 Large models (Update 2013-09-21) The optimizations provided in this update and the 2013-08-24 update has largely eliminated the problems of large models. 4.6 Using the models (Update 2013-09-21) SamplesModelsOpenGL 1.1 and SamplesModelsOpenGL 2.1 contains some small examples which shows how to use the models. 4.7 Software (Update 2013-08-24) Blender is a program to edit 3D models. AssimpView is a model viewer. Both of these programs are able to export a model as a Wavefront (OBJ) triangle mesh. 4.8 Next version (Update 2013-09-21) Some issues should be handled in the next version: 4.9 Summary (Update 2013-09-21) This is a summary of the main features and limitations for the Wavefront (OBJ) 3D model loader: Chapter 5 is a summary 5.1 Sources for the UDFs (New 2013-06-16) The zipfile contains a number of OpenGL UDFs in the oglIncludes folder. This is a description of the sources for these UDFs: 5.2 Updates (New 2014-05-04) The example was released 2013-05-19. This is a summary of the updates. Zip files and downloads Included UDFs FASM.au3 and MemoryDll.au3 by Ward to optimize loops. The UDFs are included in the code zip. Contents of the code zip The zipfiles contains a number of files and folders: ExLauncher.au3 - to start the examples, run this fileImages - images used in the examples (not since 2014-05-04)Models - Wavefront (OBJ) 3D example modelsIncludes - utility functions and UDFsoglIncludes - OpenGL related constants and functionsSamples - a collection of examples and templatesTools - a few OpenGL toolszLinks - links to dokuUpdate 2014-05-04 for AutoIt 3.3.10 (code): OpenGL2-3.3.10.7z Downloads at Dropbox The images and 3D models can be downloaded from OpenGL Images and Models at Dropbox. The folder contains three 7z-files: Images.7z, 3.5 MB - the images from the first release 2013-05-19. You need these images, but if you have already installed the images, you do not need to download this package.ModelSamples.7z, 1.66 MB - sample 3D models. If you want to test the Wavefront (OBJ) 3D models and the model loading functions, you need this package.Models.7z, 39.15 MB (250 MB uncompressed) - larger models. The pictures in post 13, 14 and 16 are created from models in this package.If you don't want to test any 3D models there is no need to download and install the last two packages.Click the Download button in upper right corner to download all three packages in one big zip. Testet on XP 32 bit with a NVIDIA video card supporting OpenGL 3.3 and Win 7 64 bit with an Intel card supporting OpenGL 3.1. Use ExLauncher.au3 in top folder to run examples. To view Wavefront (OBJ) 3D models see section 4.0. AutoIt 3.3.8 You can get the 2013-09-21 version for 3.3.8 here. You need the images and possibly the 3D models. x64 issues (no x64 issues in 3.3.10)
    1 point
  3. SciTE Hopper : Jump to Any line by one click and many other helpfull functions ! As Ashalshaikh suggested me after leaving me the task to continue >SciTE Hopper, i open a new Topic about it. It will be more easy for futures updates. Many helpfull functions in contextual menu. SciTE Hopper is now multipurpose. • Color Catcher added • BinaryToAu3Kompressor added • TinyAu3Search replaced by StringFinder • RegJumper added • Edit With SciTE added (available in Options) • SpecialCharactersViewer added (available in Tray menu) New Contextual Menu : For a right Click on a function : • Copy function name • Insert a function header • Cut function • Copy function • Delete function • Create a variables List • Remove usseless Blank lines • Remove Debug lines ( all lines starting with ConsoleWrite or _ArrayDisplay ) • Set AutoIt Code Layout • Remove Comments For entire script : • Create a functions List • Create a variables List • Remove usseless Blank lines • Remove Debug lines ( all lines starting with ConsoleWrite or _ArrayDisplay ) • Set AutoIt Code Layout • Remove Comments • ( Open in SciTE a ) Duplicate of current Script in Temp Dir • ( Open in SciTE a ) Duplicate of current Script in Same Dir • Explore Parent Script Folder • Copy Script name • Copy Script path • Find Unused Functions • Find Unused Variables • Set all functions in alphabetic order.( func headers and regions ( in fact, all lines between functions ) are not supported.) SciTE Editor New Contextual Menu if SciTE Hopper is added ( in Options ) to SciTE Editor : when you made a selection in SciTE Editor you can : • Open a Reg Key in Regedit using RegJumper • Open a Url in your default Browser • Search on google in your default Browser • Search on AutoIt Website in your default Browser Now Can be added to windows start (minimized) Options are available by Tray Menu. A double click on tray icon will open clipboard content to SciTE Editor ( Handy when you have copied some code from your browser ) How to proceed for add SciTE Hopper to SciTE Editor : Run Scite Editor, run Scite Hopper ( compiled! ) go to Options and select Add/Remove to SciTE Tab. then click on Add button and it's done ! Right click on SciTE Editor and choose SciTE Hopper in Contextual Menu for run it when you need it ! Update of 07 Dec 2017 TinyAu3Search is replaced by StringFinder Previous downloads : 1287 Script and compiled version are available in the download section Thanks to Ashalshaikh, Melba23, Th3 MMA, Alzri2, taitel, Manadar, taz742, Yashield, Authenticity, Xenobiologist for their help and asdf8 for his >Includes Helper and azjio for his >FileSearch. Hope it help you and happy Scripting !
    1 point
  4. 28-7-2015: All downloads are currently unavailable due to Google blocking the access due to false positive virus warnings. 25-7-2015: Uploaded a new SciTE4AutoIt3.exe with mainly fixes, see details below. Enjoy, Jos Addition/Changes/Fixes in the current installer: -------------------------------------------------------------------------------------------------- 25-7-2015 *** SciTE v 3.5.4. (Jos)     Fixed regression for highlight.current.word.stoponspace not working after last merge.     Fixed regression in AutoItAutoComplete.lua.     Implemented a separate lexerstyle (style.au3.16) for the UserUDF's table, an lexer feature available since 2009. *** Updated AutoIt3Wrapper v15.725.1310.0 (Jos)     - 15.503.1200.1: Removed obsolete Debug console messages.     - 15.503.1200.2: Updated dropdownlist with scrollbar. (argumentum)     - 15.503.1200.3: Added logic to ensure we have the proper SciTE Director handle in case of multiple instances.     - 15.503.1200.4: updated the GUI with the proper available options for au3stripper. *** Updated Au3Stripper v15.725.1310.0 (Jos)     - 15.503.1200.1: Added check for File encoding for include files and strip the BOM which was leading to an invalid merged script.     - 15.503.1200.2: Updated some logic for /SV /SF /RM and removed /SOI as that was broken beyond repair     - 15.503.1200.3: Fixed regression with Commentbloxks leaving the #CE causing an au3check warning. *** Updated SciTEConfig v15.725.1310.0 (Jos)     - 15.503.1200.1: Implemented the User UDF separate Lexing style already available since 2009 . *** Updated abbrev.properties. (mLipok)     - Cleaned up and added some abbreviations and updated the documentation in the helpfile. -------------------------------------------------------------------------------------------------- [/code]==> ScitillaHistory page containing all SciTE-Scintilla updates. ==> Visit the SciTE4AutoIt3 Download page for the latest versions ==> Check the newly formatted online documentation for an overview of all extra's you get with this installer.
    1 point
  5. Danyfirex

    Run GadGet

    well. Reading in msdn I found an interface to run a Gadget. So I wrote it. #include <Array.au3> #include <File.au3> Global Const $sCLSID_DesktopGadget = "{924CCC1B-6562-4C85-8657-D177925222B6}" Global Const $sIID_IDesktopGadget = "{C1646BC4-F298-4F91-A204-EB2DD1709D1A}" Global Const $sTagIDesktopGadget = "RunGadget hresult(wstr);" Global Enum $eNoShared = 1, $eShared, $eAll Local $aGadGets = _GetGadget($eAll) If IsArray($aGadGets) Then For $i = 1 To $aGadGets[0] If StringInStr($aGadGets[$i], "CPU") Then ;Run CPU GadGet RunGadget($aGadGets[$i]) EndIf Next EndIf Func RunGadget($sGadGetPath) Local $oDesktopGadget = ObjCreateInterface($sCLSID_DesktopGadget, $sIID_IDesktopGadget, $sTagIDesktopGadget) if not IsObj($oDesktopGadget) then Return False return SUCCEEDED($oDesktopGadget.RunGadget($sGadGetPath)) EndFunc ;==>RunGadget Func _GetGadget($GadgetType = $eNoShared) Local $aNoSharedGadGets = 0 Local $aSharedGadGets = 0 Local $aGadGets = 0 Local $Size = 0 Local Const $sSharedGadget = @ProgramFilesDir & "\Windows Sidebar\Shared Gadgets" Local Const $sNoShared = @ProgramFilesDir & "\Windows Sidebar\Gadgets" If $GadgetType < $eNoShared Or $GadgetType > $eAll Then Return 0 If BitAND($GadgetType, $eNoShared) Then $aNoSharedGadGets = _FileListToArray($sNoShared, Default, Default, True) If BitAND($GadgetType, $eShared) Then $aSharedGadGets = _FileListToArray($sSharedGadget, Default, Default, True) If IsArray($aSharedGadGets) And IsArray($aNoSharedGadGets) Then $Size = UBound($aNoSharedGadGets) - 1 + (UBound($aSharedGadGets) - 1) _ArrayConcatenate($aNoSharedGadGets, $aSharedGadGets, 1) $aGadGets = $aNoSharedGadGets $aGadGets[0] = $Size Else If IsArray($aSharedGadGets) Then $aGadGets = $aSharedGadGets If IsArray($aNoSharedGadGets) Then $aGadGets = $aNoSharedGadGets EndIf $aSharedGadGets = 0;Free $aNoSharedGadGets = 0 ;Free Return $aGadGets EndFunc ;==>_GetGadget Func SUCCEEDED($hr) Return ($hr >= 0) EndFunc ;==>SUCCEEDED Saludos
    1 point
  6. What about: au3.keywords.user.abbreviations.properties ?
    1 point
  7. Those files are located at : %LOCALAPPDATA%\AutoIt v3\SciTE au3abbrev.properties - standard supplied AutoIt3 stuff au3UserAbbrev.properties - your own user stuff Jos
    1 point
  8. When getting your feet wet with the Word Developer Reference you find a lot of useful information. Sometimes it gets too much so you do not know where to start and where to end. Happy reading
    1 point
  9. I'm not sure if it works for Adobe Air specifically (depends on how it loads into the Uninstall hive in the registry), but when I am uninstalling and need to be version-agnostic I usually turn to WMI: $oWMI = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") $aProducts = $oWMI.ExecQuery("Select * from Win32_Product") For $app in $aProducts If StringInStr($app.Name, "7-Zip") Then ;ConsoleWrite("Uninstalling " & $app.Name & @CRLF) $app.Uninstall() EndIf Next
    1 point
  10. Yes, but the window title is a bit different. It is $WordObject.ActiveDocument.Name & " - Microsoft Word"
    1 point
  11. guinness

    KindEbook Wishlist

    Help file on regular expressions has been updated tenfold by @jchd in the last couple of releases. You might want to download it. As for non-capturing group, there are plenty of tutorials and youtube videos which explain its purpose.
    1 point
  12. Chapter Four: Page Thirteen: 1) "Once their site you will see a section for downloads." Once on 2) You use their and they to refer to Jon's site. I wonder if you should mention Jon specifically or reword it so that it refers to a single site owner? 3) "If they re-design their site it could move but as of the printing of this book you can find it here:" colon rather than a full stop Page Sixteen: 1) "NOTE: the versions numbers change with each release." versions --> version 2) "Next you will be in the installer that will walk you through the options to install the AutoIt applications." application Page Seventeen 1) "The next screen is asking ..." Seems like it should be, "The next screen asks...". Page Twenty-Two: 1) "Scite (we will use this to edit scripts)" SciTE 2) Images are too big for the table. Page Twenty-Three: 1) "Scite is the tool we will use to create, edit, and run our programs." SciTE ... Might want to do a general whole file search & replace for this. 2) "It has a built in syntax for AutoIt that will help make our code more readable." syntax highlighter 3) "also known as script" as a Page Twenty-Six: 1) "We could optionally supply a timeout parameter so that the message box closes automatically after so many seconds or we could leave it our entirely and it will use the default behavior that requires a user to click “OK” to close it." leave it our --> leave it out 2) "The hwnd optional parameter is a bit advanced for purposes of this discussion but is handles are basically ways to refer to resources that we want to interact with." "for the purpose of this" and "but is handles" to "but handles". Also, this might really be a run-on sentence. Seems like it should be broken into two at the end of "discussion". Also, the introductory explanation of handles assumes that the reader knows that hwnd is a handle. Page Twenty-Seven: 1) "Now go back to Scite and select Tools from the top menu, then “Go” (this is how we run the script):" quoted "Go" but not "Tools". 2) "Next, save the file with the name hello world.au3" hello world.au3 not within quotes. Page Twenty-Nine: 1) "This is different than when we passed a blank argument to the optional parameter of flag." flag is not an optional parameter.
    1 point
  13. $chrome = ShellExecute("C:\Users\Mystogan\Desktop\Jordan - Chrome.lnk") ProcessWaitClose($chrome, 10)or an alternative to close all major browsers author was guinness i think _BrowserClose() Func _BrowserClose() Local $aList = 0 Local $aProcesses = StringSplit('iexplore.exe|chrome.exe|firefox.exe|safari.exe|opera.exe', '|', $STR_NOCOUNT) ; Multiple processes For $i = 0 To UBound($aProcesses) - 1 $aList = ProcessList($aProcesses[$i]) If $aList[0][0] > 0 Then ; An array is returned and @error is NEVER set, so lets check the count. ;~ _ArrayDisplay($aList) Local $bIsProcessClosed = False ; Declare a variable to hold a boolean. For $j = 1 To $aList[0][0] $bIsProcessClosed = ProcessClose($aList[$j][1]) ; In AutoIt 0 or 1 can be considered boolean too. It's like a bit in SQL or in C, where 1 and 0 means true or false. If Not $bIsProcessClosed Then ConsoleWrite('CLOSE ERROR PID: ' & $aList[$j][1] & @CRLF) Next EndIf Next EndFunc ;==>_BrowserClose
    1 point
  14. I didn't take trancexx's comment as being that either. As mentioned before I am not a VB.NET dev, but in C# we would register the assembly using regasm.exe. See >> https://www.autoitscript.com/forum/topic/166704-net-compiled-dll-assembly-in-autoit-the-simple-approach/
    1 point
  15. New version (1.1.0) posted that includes all the suggested changes (THANK YOU) with the exception of @Guinness' MsgBox note. That is perfectly legit and when I catch my second wind I will circle back on it (requires wholesale gutting of most code snippet images). This pass took a long time because I cross referenced each code snippet, made sure I had it on file (and if not, I recreated it). Then I organized the code by directories and example numbers that matched the text in the book. Finally, I pushed out the updated text and companion code file(s) . More to follow after my eyes un-cross. As always, comments and suggestions most welcome.
    1 point
  16. May be some of you know the shareware VectorMagic who permit to easily convert bitmap Images to clean Vector Art ! Pic2Vector 1.0.1.4 is free, and can give similar effects ! I was interested by some effects added to a photo. I'm not using gdi for the vectorization, but 2 command line tools : Autotrace 0.27 with ILDA file support for converting bitmap to vector graphics Custom Version at : http://www.raycomposer.de/en/ressources/autotrace/ More general infos : http://autotrace.sourceforge.net/ GPL Ghostscript 9.07 use here for converting vector graphics to Jpeg. More infos : http://www.ghostscript.com/doc/9.07/Use.htm# example 1 example 2 example 3 example 4 example 5 example 6 example 7 example 8 Free to you to play with settings for see changes.(Infos with tooltip added to each type of setting) If UAC Enable, use right click, execute as Admin. Click on vectorized Pic for display it in fullscreen with Windows picture Viewer. You can save result to jpg, png, bmp or gif format. Changes Version 1.0.1.4 Settings can be saved by creating a profil. No more appcrash window for autotrace.exe. New buttons for display compatibility with xp. Externals files are embedded, no more downloads needed. Some minor improvements. Added new examples to topic. Tested with WinXp, Win7 and Win 8.1. previous downloads : 666 source and executable are available in the Download Section Hope you like it !
    1 point
×
×
  • Create New...