Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/01/2013 in all areas

  1. BuckMaster

    Form Builder beta

    Update v1.0.6 Major script overhaul, I literally started over from scratch only adding parts of code from the old script that were solid. I don’t have a help file made as of now so I am going to explain all of the functionality in this post - Form Builder is no longer bi-directional, you now toggle between script mode and GUI mode using a button in the top right or F4 - The script no longer recompiles on every change but instead inserts changes into the script - Form Builder no longer cares about Event mode or GuiGetMsg mode - No more .gui files, you now edit .au3 scripts directly - Script edit is now a SciLexer control, includes syntax highlighting, folding, call tips, keywords, and inline error annotations. - Script output console is now at the bottom in script mode - Main GUI menu redone, most functions from SciTe have been added along with their hotkeys - All restrictions to editing the script have been removed - GDI+ and Graphic editors removed - Cleanup of script, stability greatly increased - Hotkeys no longer use _IsPressed they now use GUIAccelerator keys (with exception to a few) - Multiple scripts can be open - Form Builder buffers the open scripts and adds an asterisk * to scripts that have been modified - Rich Edit, GUIScrollbars, Dummy, and Updown are disabled for now until I can add them - GUI Menu controls cannot be created as of now but will be rendered in the editor - Undo and Redo actions in script mode and GUI mode added, the GUI undo and redo buffer is cleared switching between modes - The Undo and Redo buffers do not have a limit but are cleared when switching between modes or scripts - Undo and Redo actions do not work for controls that have no control handle - The Treeview now works as a Go to function for controls and functions in script mode - Form Builder now tries to preserve as much of the original content as possible, it will save whitespace in-between parameters and comments on controls - Treeview context menu reworked, much more responsive - Unicode support added File -> Encoding -> UTF-8 - Language support added, I added a couple of language files and used Google translate just so I could size my GUI's for different languages, I do not support what those language files say - Selecting a GUI in the Treeview in GUI mode will allow you to change the GUI's Handle, Position, Background Color, State, Cursor, Font, Font Size and Font Attributes - Auto Declare is no longer hiding in the settings, it is now on the top right and is a toggle between Off, Global and Local - Help File Lookup added (Ctrl + H), allows you to search selected text in the help file, Any variable will be searched and the first result will be displayed, any string will be searched as a keyword in the index - Added current script line, column, and selection length in the bottom left - Standard undeclared style constants are checked before script execution and the script will prompt if an undefined style constant is found - You can now toggle script whitespace, EOL characters, line numbers, margins and output in the View menu - View -> Toggle All Folds works as it does in SciTe, only base level folds are changed and the first fold found determines whether to expand or contract - Form Builder Settings redone - Bugs with submitting data and control selection have been fixed - Fixed problems with frequently called repetitive functions causing issues with large scripts - Fixed bugs with B, I, U and S font attribute buttons getting stuck and called when enter was pressed Update v1.0.7 - Help File Look-up hotkey changed to Ctrl+B - Replace hotkey changed to Ctrl+H - Changes to $SCN_MODIFIED so only text events are notified - Bookmarks added, Ctrl+M to add or delete a Bookmark from the current line - Edit -> Bookmarks -> Set Bookmark changes the currently selected Bookmark - Edit -> Clear Current Bookmarks deletes only the currently selected Bookmark - Allows you to change foreground and background colors of Bookmarks - Added F2 hotkey for Next Bookmark - Added Shift+F2 hotkey for Previous Bookmark - Fixed a bug that made it so script annotation did not show up for some people - Script errors and warnings now add a Bookmark on each line - Ctrl+E hotkey added to clear all Bookmarks and Annotations - Minor GUI tweaks - Fixed a bug with the GUI Style undo action - Undo and Redo actions for GUI windows will now update the window properties if the GUI is selected - F4 Hotkey no longer switches modes, switching modes is now F10 - F4 is to toggle next error or warning message, works like it does in SciTe, bookmarks the line and highlights the error in the console - Shift+F4 Hotkey added to toggle previous error or warning message - Shift+F5 Hotkey added to clear script output - Ctrl+F5 Hotkey added as SyntaxCheck Prod - Form Builder now performs a SyntaxCheck before entering GUI Mode and prompts on Error or Warning - Language Select Menu Added Settings -> Lanugage - Icons added to main menu - Languages added to all new menu items and msgbox's - Language Files updated for new data - Language Support added for Arabic, Chinese, Dutch, French, German, Hebrew, Japanese, Swedish, Thai, and Vietnamese [ Google Translate ] - Fixed bug with updating a language that made it look like ANSI and UTF-8 were both selected - Added redo button next to undo button - Font attribute buttons Bold, Italic, Underline and Strike-Out changed to labels Update v1.0.8 - Somehow a main function got deleted causing the script to crash on some changes - Fixed some issues with updating Languages Hotkeys Ctrl + N - New Blank Script Ctrl + G - New GUI Script Ctrl + O - Open Script Ctrl + Shift + S - Save As Ctrl + S - Save Esc - Close Open Script Alt + F4 - Exit Ctrl + Z - Undo Ctrl + Y - Redo Ctrl + X - Cut Ctrl + C - Copy Ctrl + V - Paste Ctrl + A - Select All Ctrl + W - Clear inline script annotation Ctrl + E - Clear inline script annotation and bookmarks Ctrl + F - Find Ctrl + F3 - Find Next Shift + F3 - Find Previous (doesn’t work yet) Ctrl + B - Help File Lookup F5 - Go Alt + F5 - Beta Run F7 - Build Ctrl + F7 - Compile F11 - Full screen F8 - Toggle Show/Hide Script Output Ctrl + I - Open Include Ctrl + H - Replace F1 - AutoIt Help File Ctrl + D - Duplicate Control Delete - Delete Control Ctrl + Shift + 8 - Toggle Show/Hide Script Whitespace Ctrl + Shift + 9 - Toggle Show/Hide Script EOL characters Ctrl - GUI Mode multicontrol selection F10 - Switch Modes F4 - Next Message Shift+F4 - Previous Message Shift+F5 - Clear Output Ctrl+M - Add Bookmark F2 - Next Bookmark Shift+F2 - Previous Bookmark Basic GUI Mode How To Create a Control - click a control on the left - click in the GUI you wish to add the control Left Click: Click and drag to auto resize the control Right Click: Creates the control at a standard size Select a Control - click inside the control or select it in the treeview Change a controls Data - First select the control - modify the controls data on the right, press enter to submit changes state, cursor, font and resizing update when you change the data - when modifying the data parameter the script recognizes if there is a variable in the data and will add quotes accordingly ex. data parameter = $data, End result in script: GUICtrlCreateButton($data, 50, 50, 100, 20) ex. data parameter = data, End result in script: GUICtrlCreateButton("data", 50, 50, 100, 20) ex. data parameter = "data"&$data, End result in script: GUICtrlCreateButton("data"&$data, 50, 50, 100, 20) Applying an Image to a control - select a control - control styles must be applied to some controls before adding an image - click the ... button next to the Image input in the Control Properties area in the bottom right - select the image you want to display, allows jpg, bmp, gif, ico and dll files - selecting a dll will open another prompt to choose which resource to display Control Grouping - multiple controls must be selected - press the group controls button - control grouping allows you to resize and move multiple controls at the same time, as of now groups are deleted when leaving GUI mode I only have a couple odds and ends to finish up before everything should be complete, I need to add Undo and Redo actions for copying and duplicating controls and a couple other minor things, eventually I want to try to add all of the UDF controls as well. If people are willing to translate the language file I would be very grateful, the ones I have right now are from Google translate, I only used them for testing and have no idea what they say. I want to thank Kip, Prog@ndy, Isi360 and all of the other contributors on this forum, without you guys i don't think i could have written this script. Please post any comments, problems or suggestions, BuckMaster * I only used one "magic number" on my main close case statement, only for faster locating, and i don't care. Form Builder Source.zip Form Builder.zip
    1 point
  2. Eukalyptus the GDI+ guru ported the Warp Text to Splines to GDI+ (thread on German forum with examples). I had the idea to mix his example 7 with some GDI+ elements to create an old school Amiga style intro. Here how it looks: It is very CPU intensive and running with acceptable speed only on newer CPUs. Download: Text to Bezier Intro.7z (20 downloads previously) Use latest 7-Zip tool to extract archive properly. Source Code can be seen here: http://pastebin.com/U24ACRAr Credits: see scroller. To start the intro in benchmark mode either change line 23 or compile it and start it with one of following parameter: "/b", "/benchmark" or "/bench". Results will be written to Benchmark.txt in script dir. Here some benchmark results: Br, UEZ Change Log: 2013-05-01: some small modifications 2013-05-06: added benchmark mode
    1 point
  3. Read this first: http://www.autoitscript.com/forum/index.php?app=forums&module=extras&section=boardrules
    1 point
  4. Melba23

    Screen Resolution Change

    Rickname, As the Mod who closed the earlier thread to which you linked has already posted in this one and is letting it run, perhaps he knows more about the subject than you. While I am always very happy for conscientious forum members report anything they think might be suspicious, I would ask them please to think a bit before jumping to conclusions. M23
    1 point
  5. MariusN, I am pleased you like it. Do try and understand how it works so that you use some of the tricks in your own scripts. And of course do ask if you have any questions. M23
    1 point
  6. Glad you got it working
    1 point
  7. I wouldn't set @error on success. Use something like this: If @error = 0 Then MsgBox(4096, "Success", "Yes") Return 1 Else MsgBox(4096, "Error", "No") Return 0 EndIf
    1 point
  8. Accordibng to the help file: The first parameter sets the value of @error, the second of @extended and the third the return value. Example Func Test() Return SetError(7, 12345, "Wrong Result") EndFunc
    1 point
  9. water

    Screen Resolution Change

    Looks like kSetup is an ordinary windows GUI. If this is true I suggest to use the Control* functions of AutoIt. Drop all screen related functions to make your script much more reliable.
    1 point
  10. Most of the AutoIt functions return a value and set the macros @error and @extended to 0 if the function ran succesfully. If an error occurred then either thze return value or @error that and which error happened.
    1 point
  11. MariusN, Can you please post the rest of the code. What you have posted shows exactly why you run into recursion problems, but does not give too many clues as to exactly how we can resolve the problem. In principle, you need to conclude each function and return a value from it to the main loop where you decide if you need to run the next. But without seeing that main loop it is difficult to code it so that it all integrates correctly. M23 P.S. When you post code please use AutoIt tags - put [autoit] before and [/autoit] after your posted code. Then you get a scrolling box and syntax colouring as you can see above now I have added them.
    1 point
  12. *sigh* Asked a million times... $iPic = GUICtrlCreatePic(@ScriptDir & "\pic.jpg", 0, 0, 400, 400) GUICtrlSetState($iPic, $GUI_DISABLE) Make a forum search next time. Br, FireFox.
    1 point
  13. Bert

    Change Screen Resolution

    In a word - no. May I ask you a simple Yes or no question or two: Would the users of these multiple machines - would they like what you have in mind? YES or NO or better way - would they APPROVE of what you have in mind and not be annoyed, bothered, or calling up someone asking for it to be set back the way it was before what you want to do happens to said machine? YES or NO
    1 point
  14. Vegar, Not something we want to discuss here. M23
    1 point
  15. kylomas

    GUI interaction

    chopperenzo, 1 - yes 2 - yes 3 - yes 4 - yes The best way to get started is to download and install AutoIT and the full SCITE editor. In the package you will find a HELP file that will explain all that you need. As you have already discovered, this forum is also an excellent support resource. Good Luck, kylomas
    1 point
  16. playlet

    ---

    ---
    1 point
  17. another example: #include <Date.au3> #include <Date.au3> Local $sLastDayOfSchool = "2013/06/12" Local $sTodaysDate = @YEAR & "/" & @MON & "/" & @MDAY $sDate = $sTodaysDate $iDaysLeft = 0 While _DateDiff('d', $sDate, $sLastDayOfSchool) > 0 $aTemp = StringSplit($sDate, "/") $iDate =_DateToDayOfWeek($aTemp[1], $aTemp[2], $aTemp[3]) ConsoleWrite($iDate & " " ) If $iDate <> 1 And $iDate <> 7 Then $iDaysLeft += 1 EndIf $sDate = _DateAdd("D", 1, $sDate) ConsoleWrite($iDaysLeft & @CRLF) WEnd MsgBox(1, 1, $iDaysLeft)
    1 point
  18. Ontosy, $a=InputBox("aaa","bbb","ccc", "*", 200, 120, Default, Default, 60) M23
    1 point
  19. Ascend4nt

    _EnumChildWindows

    _EnumChildWindows Enumerate controls/children of a Window This code enumerates all controls/children of a given Window and returns them in an array. Example code is included. *small change 9/15/2010: removed a #include line from the example code posted here (not required)*update 3/28/2010:Control ID is now retrieved. Unfortunately the indexing was reworked (sorry). But at least now I believe all the relevant information needed is retrieved.Parameters to the function now have a slightly different meaning. Basically, this was done to allow searching for controls with an empty-string for a Title. All defaults are now 0, so a call can be made like this to find all Controls with a 'Button' classname: _EnumChildWindows($hWnd,0,0,"Button") #include <_EnumChildWindows.au3> ; =============================================================================================================================== ; <TestEnumChildWindows.au3> ; ; Test for _EnumChildWindows UDF. ; ; Author: Ascend4nt ; =============================================================================================================================== ; =================================================================================================================== ; TEST ; =================================================================================================================== #include <Array.au3> Local $hWnd="",$hControl="",$sTitle="",$sClass="",$aEnumList Local $iCalcPID,$hNumber1Button=-1,$hNumber4Button=-1,$hPlusButton=-1,$hEqualButton=-1 $iCalcPID=Run("calc.exe") If @error Then Exit $hWnd=WinWait("Calculator") If $hWnd=0 Then Exit ProcessClose($iCalcPID) ; Important to wait for the window to fully 'create' itself before getting child windows! ; Note that other processes that become activated somewhere between _WinWaitEx and this will cause WinWaitActive() to wait for manual activation ;WinWaitActive($hWnd) ; bad idea in busy environment WinActivate($hWnd) ; this seems to be a better alternative, the window seems fully created after this is called in my tests ; Parameters to function ;$hControl=HWnd(0x########) ;$sTitle="^(\d|\+|=){:content:}quot; ;$sClass="Button" $aEnumList=_EnumChildWindows($hWnd,$hControl,$sTitle,$sClass) ;,2) for RegExp Title If @Error Then Exit ProcessClose($iCalcPID) ; Find specific items [Certain versions of Calc won't return any text] For $i=1 to $aEnumList[0][0] Switch $aEnumList[$i][3] Case "1" $hNumber1Button=$aEnumList[$i][0] ConsoleWrite("'1' Advanced Mode Name (in current state): [CLASS:Button; INSTANCE:"&$aEnumList[$i][2]&"]"&@CRLF) Case "4" $hNumber4Button=$aEnumList[$i][0] ConsoleWrite("'4' Advanced Mode Name (in current state): [CLASS:Button; INSTANCE:"&$aEnumList[$i][2]&"]"&@CRLF) Case "+" $hPlusButton=$aEnumList[$i][0] ConsoleWrite("'+' Advanced Mode Name (in current state): [CLASS:Button; INSTANCE:"&$aEnumList[$i][2]&"]"&@CRLF) Case "=" $hEqualButton=$aEnumList[$i][0] ConsoleWrite("'=' Advanced Mode Name (in current state): [CLASS:Button; INSTANCE:"&$aEnumList[$i][2]&"]"&@CRLF) EndSwitch Next ; Add Headers $aEnumList[0][0]="Handle" $aEnumList[0][1]="Classname" $aEnumList[0][2]="Iteration" $aEnumList[0][3]="Title/Text" ; Bring the window forward WinActivate($hWnd) ; Perform a simple calculation to show interaction If $hNumber1Button<>-1 Then ControlClick($hWnd,"",$hNumber1Button,"primary",3) ControlClick($hWnd,"",$hNumber4Button) Sleep(1000) ControlClick($hWnd,"",$hPlusButton) Sleep(1000) ControlClick($hWnd,"",$hNumber4Button,"primary",2) ; double click, but that's fine Sleep(1000) ControlClick($hWnd,"",$hEqualButton) EndIf ; And Display ALL Enumerated Windows _ArrayDisplay($aEnumList,"Enumerated controls for 'Calculator'") ProcessClose($iCalcPID)Download the ZIP from my site Ascend4nt's AutoIT Code License agreement: While I provide this source code freely, if you do use the code in your projects, all I ask is that: If you provide source, keep the header as I have put it, OR, if you expand it, then at least acknowledge me as the original author, and any other authors I creditIf the program is released, acknowledge me in your credits (it doesn't have to state which functions came from me, though again if the source is provided - see #1)The source on it's own (as opposed to part of a project) can not be posted unless a link to the page(s) where the code were retrieved from is provided and a message stating that the latest updates will be available on the page(s) linked to.Pieces of the code can however be discussed on the threads where Ascend4nt has posted the code without worrying about further linking.
    1 point
  20. I did syntax correction for current AutoIt 3.2.12.1 Not tested. VAConvert.04corrected.zip
    1 point
  21. Quick update: Fixed a few bugs. Added "Notes" tab Added "AutoIt" tab. And thanks for the rate! (Whoever did it)
    1 point
×
×
  • Create New...