Leaderboard
Popular Content
Showing content with the highest reputation on 01/10/2016 in all areas
-
Distorting GDI+ Paths with other Paths
UEZ and one other reacted to scintilla4evr for a topic
Hello. When I was editing some text in Photoshop and applying distortions, I started to think how I could distort GDI+ Paths in the same manner. So, here it is: It's not perfect, but nothing is. Here's a link to the file: Distorting_GDI_Paths_with_other_Path_objects.zip A PDF file with explanations and mathematical formulas is included in the ZIP file. Have fun!2 points -
Hello all ! Here are some functions that I have created to manipulate multidimensionnal arrays. I think some of them can be useful. Some functions are limited to 32 dimensions. List of the functions : _ArrayAssign : Assigns an array variable by name with the data. _ArrayCompare : Checks if two array are identical (size or data) _ArrayDeclare : Creates an empty array with the specified size. _ArrayDeclareFromString : Creates an array from an array declaration type string. _ArrayEnumValues : Returns all values and indexes of an array in a 2D array. _ArrayEval : Returns the array from an array variable name, or the value of an array element by its name _ArrayShuffleMultiDim : Shuffle the whole data of an array. _ArrayToDeclarationString : Returns an array declaration string. The returned string can be used with _ArrayDeclareFromString. Some examples : _Example1() _Example2() _Example3() _Example4() _Example5() _Example6() _Example7() Func _Example1() Local $aArray1 = _ArrayDeclareFromString("[ [ 1, 2, 3], ['a', 'b', 'c'], [True, False, Null], [], [0x10, 1.3, -10.2E-3] ]") _ArrayDisplay($aArray1, "_ArrayDeclareFromString") EndFunc Func _Example2() Global $aArray2 = [[1,2,""], [4,5,6]] ; Must be a global variable _ArrayDisplay($aArray2, "Before _ArrayAssign") _ArrayAssign("aArray2[0][2]", 3) _ArrayDisplay($aArray2, "After _ArrayAssign") EndFunc Func _Example3() Local $aValues = [ [1,2,3], ['a', True, False] ] _ArrayAssign("aArray3", $aValues) Local $aRet = _ArrayEval("aArray3") _ArrayDisplay($aRet, "_ArrayEval") MsgBox(0, "", "Value for aArray3[1][0] : " & _ArrayEval("aArray3[1][0]") ) EndFunc Func _Example4() Local $aArray3 = [ [[ "000", "001", "002"], ["010", "011", "012"]] , [[ "100", "101", "102"], ["110", "111", "112"]] ] Local $aArray = _ArrayEnumValues($aArray3) _ArrayDisplay($aArray) EndFunc Func _Example5() Local $aArray4 = [ [1, 2, 3], [], ['A string', "That's so ""cool"" !"], [0x10, 1.3, -10.2E-3] ] Local $sDeclaration = _ArrayToDeclarationString($aArray4) MsgBox(0, "", $sDeclaration) EndFunc Func _Example6() Local $aArray5 = [ [[ "000", "001", "002"], ["010", "011", "012"]] , [[ "100", "101", "102"], ["110", "111", "112"]] ] Local $aBefore = _ArrayEnumValues($aArray5) _ArrayDisplay($aBefore, "Before shuffle") _ArrayShuffleMultiDim($aArray5) Local $aAfter = _ArrayEnumValues($aArray5) _ArrayDisplay($aAfter, "After shuffle") EndFunc Func _Example7() Local $aArray6 = [[1, 2], [3, 4]] Local $aArray7 = [["", 2], [3, 4]] Local $iRet = _ArrayCompare($aArray6, $aArray7) If $iRet Then MsgBox(0, "", "Arrays have exactly the same size") Else MsgBox(0, "", "Arrays do not have the same size and dimension.") EndIf $iRet = _ArrayCompare($aArray6, $aArray7, 1) If $iRet Then MsgBox(0, "", "Arrays have exactly the same size and values") Else MsgBox(0, "", "Arrays do not have the same size and values.") EndIf EndFunc ArrayMultiDim.au31 point
-
hi forum peoples for people that are using dBaseIII and dBaseIV database files i want to share my dbase dll + udf that i wrote for one of my projects the dll supports; open/create/read/write dbaseIII dbf files open/create/read/write dBaseIV dbf files open/create/read/write dbaseIII dbt memo files open/create/read/write dBaseIV dbt memo files most basic functions are in the dll more functions wil be added when needed dll ,udf and several samples are included in zipfile Have fun Jpam update; udf has now standard function headers changed Opt("OnExitFunc", "Close_DLL") to OnAutoItExitRegister("Close_DLL") update 02-01-2016: added fast powerfull case-insensitive search() function to dll with wildcard support update 09-01-2016: added foxpro 2.x and visual foxpro read support added foxpro 2.x fpt memo read support added visual foxpro memo read support dbasedll.zip1 point
-
Hello ! Here is a small function which allows you to make changes in the Firefox configuration file (of the user running the script) Warning : to make changes into the configuration file, Firefox must be stopped Here you can find some settings in this webpage : http://kb.mozillazine.org/About:config_entries Examples : ; Changes the start page _FF_Config("browser.startup.homepage", "http://www.autoitscript.com/forum") ; Set a manual proxy _FF_Config("network.proxy.type", 1) ; Sets the proxy in manual mode _FF_Config("network.proxy.http", "192.168.1.10") ; Sets the http proxy name/IP _FF_Config("network.proxy.http_port", 3128) ; Sets the http proxy port _FF_Config("network. proxy. autoconfig_url") ; Remove the proxy url ; Allow popups _FF_Config("dom.disable_open_during_load", false) Also, you can use _FF_GetProfileList() to retrieve the list of Firefox profiles for the current user. Now, the two functions : #include <File.au3> ; needed for _PathFull ; #FUNCTION# ==================================================================================================================== ; Name ..........: _FF_Config ; Description ...: Configures Mozilla Firefox ; Syntax ........: _FF_Config($sSettingName[, $sSettingValue = Null[, $sProfileName = ""]]) ; Parameters ....: $sSettingName - Name of the setting to add, change or delete. ; $sSettingValue - [optional] Value of the setting. Default is Null = deletes the line. ; $sProfileName - [optional] Name of the Firefox profile. Default is "" = all Firefox profiles ; Return values .: Success - Returns 1 ; Failure - Returns 0 and set @error to : ; 1 : Unable to list the Firefox profiles ; 2 : Unable to load the specified Firefox profile ; 3 : Firefox is running ; Author ........: jguinch ; =============================================================================================================================== Func _FF_Config($sSettingName, $sSettingValue = Null, $sProfileName = "") Local $sFFConfigFile = "prefs.js" Local $sContent, $aProfiles = _FF_GetProfileList(), $iError = 0, $hPrefs If @error Then Return SetError(@error, 0, 0) If ProcessExists("firefox.exe") Then Return SetError(3, 0, 0) If IsString($sSettingValue) Then $sSettingValue = '"' & $sSettingValue & '"' If IsBool($sSettingValue) Then $sSettingValue = StringLower($sSettingValue) For $i = 1 To $aProfiles[0][0] If $sProfileName <> "" AND $aProfiles[$i][0] <> $sProfileName Then ContinueLoop $sContent = FileRead($aProfiles[$i][1] & "\" & $sFFConfigFile) If @error Then Return SetError(2, 0, 0) If $sSettingValue = Null Then $sNewContent = StringRegExpReplace($sContent, '(?mi)^\Quser_pref("' & $sSettingName & '"\E\V+\R', '') Else $sNewContent = StringRegExpReplace($sContent, '(?mi)^\Quser_pref("' & $sSettingName & '", \E\K.+(?=\);$)', $sSettingValue) If NOT @extended Then $sNewContent = StringRegExpReplace($sContent, ";\K\v*$", @CRLF & 'user_pref("' & $sSettingName & '", ' & $sSettingValue & ');' & @CRLF) EndIf $hPrefs = FileOpen($aProfiles[$i][1] & "\" & $sFFConfigFile, 2) If $hPrefs = -1 Then Return SetError(2, 0, 0) FileWrite($hPrefs, $sNewContent) FileClose($hPrefs) Next Return 1 EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _FF_GetProfileList ; Description ...: List the Firefox profiles in a 2D array ; Syntax ........: _FF_GetProfileList() ; Parameters ....: None ; Return values .: Success - Returns a 2D array (see remarks) ; Failure - Returns 0 and set @error to 1 (unable to list the Firefox profiles) ; Author ........: jguinch ; Remarks........: The array returned is two-dimensional and is made up as follows: ; $aArray[0][0] : Number of profiles ; $aArray[0][1] : Default profile index in the array ; $aArray[1][0] : 1st profile name ; $aArray[1][1] : 1st profile path ; ... ; $aArray[n][0] : nth profile name ; $aArray[n][1] : nth profile path ; =============================================================================================================================== Func _FF_GetProfileList() Local $sProfileName, $sIsRelative, $sProfilePath, $aResult[10][2] = [[0]] Local $sFFAppDataPah = @AppDataDir & "\Mozilla\Firefox" Local $sProfiles = $sFFAppDataPah & "\profiles.ini" Local $aSections = IniReadSectionNames($sProfiles) If @error OR NOT IsArray($aSections) Then Return SetError(1, 1, 0) For $i = 1 To $aSections[0] If $aSections[$i] <> "General" Then $sProfileName = IniRead($sProfiles, $aSections[$i], "Name", "") $sIsRelative = IniRead($sProfiles, $aSections[$i], "IsRelative", "") $sProfilePath = IniRead($sProfiles, $aSections[$i], "Path", "") If $sIsRelative = "" OR $sProfilePath = "" OR $sProfileName = "" Then ContinueLoop If Number($sIsRelative) = 1 Then $sProfilePath = _PathFull( @AppDataDir & "\Mozilla\Firefox\" & StringReplace($sProfilePath, "/", "\") ) If NOT FileExists($sProfilePath & "\prefs.js") Then ContinueLoop $aResult[0][0] += 1 If $aResult[0][0] = UBound($aResult) Then Redim $aResult[ UBound($aResult) * 2][2] If Number(IniRead($sProfiles, $aSections[$i], "Default", "error")) = 1 Then $aResult[0][1] = $aResult[0][0] $aResult[ $aResult[0][0] ][0] = $sProfileName $aResult[ $aResult[0][0] ][1] = $sProfilePath EndIf Next If NOT $aResult[0][1] AND $aResult[0][0] > 0 Then $aResult[0][1] = 1 Redim $aResult [ $aResult[0][0] + 1 ][2] Return $aResult EndFunc1 point
-
Installer and zip file are both available in the download directory. Check your AV software for any activities it has performed. Jos1 point
-
I recommend to make contact with other script maybe with local TCP connection, file saving/reading, when it closes it would send data to other script that it was closed. Or easier way, just kill process/end task of other script.1 point
-
Correct. That's something the OP could have found himself by simply having a look at the help file! "If two AutoIt scripts set the same hotkeys, you should avoid running those scripts simultaneously as the second script cannot capture the hotkey unless the first script terminates or unregisters the key prior to the second script setting the hotkey."1 point
-
1 point
-
$n = 45.7 $f = Floor($n) $c= Ceiling($n) MsgBox(64 + 262144, Default, $n & @CRLF & $f & @CRLF & $c, 0)1 point
-
Can you please give us more information? Why do you need to run those scripts at the same time and why do you want to end them with the same hotkey? Different hotkeys should work, so could you please post your code when you tried to different hotkeys?1 point
-
Thanks. Now, you can do the reverse, build the array from a string : $array = _ArrayDeclareFromString('[[["Art"],["Painting",2,7],["Music",2,3],["Drama",3,4],["Dance",1,10]],[["Science"],["Maths",6,6],["Physics",5,1],["Chemistry",5,6],["Biology",5,6]],[["Sport"],["Football",12,8],["Golf",4,0],["Snooker",1,1],["Chess",10,0]]]') $aEnum = _ArrayEnumValues($array) ; useful for arrays > 2 dimensions _ArrayDisplay($aEnum)1 point
-
@jguinch This could be done simpler #Include <Array.au3> $string = "This is a string with seven words" $aWords = StringRegExp($string, "^|\w+", 3) $aWords[0] = UBound($aWords) - 1 _ArrayDisplay($aWords)1 point
-
You're pretty close, the problem with creating a folder with the exact same name as the file is Windows won't allow it, because the name already exists in the path. You could remove the .txt and create a folder without the extension #include <file.au3> #include <Array.au3> Global $sPath = @ScriptDir & '\' Global $filesArray = _FileListToArray($sPath , "*.txt") For $i = 1 to $filesArray[0] Local $dirName = StringTrimRight($filesArray[$i], 4) DirCreate($sPath & $dirName) FileMove($sPath & $filesArray[$i], $sPath & $dirName & '\' & $filesArray) Next1 point
-
StreamHelper
dynamitemedia reacted to Damein for a topic
Possibly, but I used the game logos to minimize the internet usage.1 point -
Distorting GDI+ Paths with other Paths
algiuxas reacted to scintilla4evr for a file
1 point -
Blender UDF
Quantumation reacted to scintilla4evr for a topic
Another update, and within it: Added Scene-related functionsAdded keyframe manipulationIf you have already installed the addon in Blender, you don't have to install it again. This version does not make changes in the Python addon. Happy automating! Blender_UDF.zip PS. You guessed it! The you-know-which-option-in-the-Python-addon still is pointlessly not working.1 point -
@Trong : Local $sArray = StringRegExp("-(A))-(B))-", "(?si)(?|^()|\Q(\E(.*?)(?=\Q)\E))", 3) Edit : where did you find the regex ?1 point
-
I miss your last post. Sorry. Try this: #include <StringConstants.au3> #include <ie.au3> Sleep(2500) _Example() Func _Example() $oIE = _IEAttach("xyz", "URL") $oTable = _IETableGetCollection ($oIE) If @error then Return ConsoleWrite('! #' & @ScriptLineNumber & ' @error='& @error &' @extended=' & @extended & @CRLF) Local $oMyTable = _IETableGetCollection ($oIE, 78) If @error then Return ConsoleWrite('! #' & @ScriptLineNumber & ' @error='& @error &' @extended=' & @extended & @CRLF) Local $sMyOnClickString = "aspxGVPagerOnClick('ctl00_ContentPlaceHolder1_ASPxRoundPanel1_PCPrehled_ASPxCPPrescasy_ASPxCPPrescasyGrid_GV1','PN1');" Local $oTD = _IE_Table_GetTD($oMyTable, $sMyOnClickString) If @error then Return ConsoleWrite('! #' & @ScriptLineNumber & ' @error='& @error &' @extended=' & @extended & @CRLF) $oTD.Click() EndFunc ;==>_Example Func _IE_Table_GetTD(ByRef $oTable, $sOnClickString, $bRegExp = False) Local $oTRs_coll = $oTable.rows If @error then Return ConsoleWrite('! #' & @ScriptLineNumber & ' @error='& @error &' @extended=' & @extended & @CRLF) ConsoleWrite('TD Contents Start:' & @CRLF) For $oTR_enum In $oTRs_coll For $oTD_enum In $oTR_enum.cells ConsoleWrite($oTD_enum.onclick & @CRLF) If $bRegExp Then If StringRegExp($oTD_enum.outerhtml, $sOnClickString, $STR_REGEXPMATCH) Then Return SetError($_IESTATUS_Success, 0, $oTD_enum) Else If StringInStr($oTD_enum.outerhtml, $sOnClickString) Then Return SetError($_IESTATUS_Success, 0, $oTD_enum) EndIf Next Next ConsoleWrite('TD Contents END' & @CRLF) SetError($_IESTATUS_NoMatch, 0, Null) EndFunc ;==>_IE_Table_GetTD1 point
-
A short users guide to the IPB v4 new forum. The forum operates in much the same way as the old v3 one, but there are several major differences - so here is a quick guide: Firstly login: This requires displayname/password - not username/password as before. Next the editor: This is now full WYSIWYG using HTML and seems a lot better than the v3 one. There are buttons to add hyperlinks, quotes, code and spoilers, plus Trac links . Do not use the old BB codes as they will almost certainly not be honoured. Posting links to threads/posts is easy: Posting a thread/post URL (use the "share this post" button at top right to get a post URL) directly into the editor actually inserts a clickable single line box. Using the editor "link" button lets you choose clickable text to display in place of the box. The "code" button gives a choice of "AutoIt" (with syntax highlighting) or plain "Text" (plus a couple of other choices). Code over a certain length still appears in scrollable boxes, and thanks to Jon these still have "expand/popup" buttons. Paragraph spacing is automatically applied when pressing {ENTER} - use {Shift-ENTER} for single lines. Now the member details: The dropdown under the member name at top right still accesses things such as Private Messages, Content, Followed Content. To change display name, signature, password, go to "Account Settings" How members are notified of forum events has changed - check to find out how previous settings have been transferred because there are now some forced choices where the notification will be in-forum rather than by email. The "Friend" functionality has been replaced by the ability to "Follow" other members - this is done via a button on their profile page.1 point
-
We want the forum to be a pleasant place for everyone to discuss AutoIt scripting, and we also want to protect the reputation of AutoIt. So we ask you to respect these simple rules while you are here: Forum Posting 1. Do not ask for help with AutoIt scripts, post links to, or start discussion topics on the following subjects: Malware of any form - trojan, virus, keylogger, spam tool, "joke/spoof" script, etc. Bypassing of security measures - log-in and security dialogs, CAPTCHAs, anti-bot agents, software activation, etc. Automation of software/sites contrary to their EULA (see Reporting bullet below). Launching, automation or script interaction with games or game servers, regardless of the game. Running or injecting any code (in any form) intended to alter the original functionality of another process. Decompilation of AutoIt scripts or details of decompiler software. This list is non-exhaustive - the Moderating team reserve the right to close any thread that they feel is contrary to the ethos of the forum. 2. Do not post material that could be considered pornographic, violent or explicit - or express personal opinions that would not be acceptable in a civilized society. Do not post any copyrighted material unless the copyright is owned by you or by this site. 3. To protect this community, any files posted by you are subject to checks to ensure that they do not contain malware. This includes, but is not limited to, decompilation and reverse engineering. 4. Do not flame or insult other members - and just report the thread to a Moderator (see below) if you are so attacked. 5. Do not PM other users asking for support - that is why the forum exists, so post there instead. 6. Do not create multiple accounts - if you inadvertently created multiple accounts then contact a Moderator to close the unwanted ones. 7. Do not repost the same question if the previous thread has been locked - particularly if you merely reword the question to get around one of the prohibitions listed above. 8. Do not delete your posts, nor completely remove their content, if doing so will interrupt the flow of the thread. 9. Do not post in a thread while the Moderating team are actively trying to determine whether it is legal. The Moderation team will do their best to act in fair and reasonable manner. Sanctions will only be applied as a last resort and any action taken will be explained in the relevant thread. If moderation action is taken, you will need to acknowledge this through a dialog or you will be unable to post further in the forum. Please note that this dialog is not an agreement that the warning was justified - it is only there so that members are aware that moderation action has been taken and that they may have certain restrictions applied to their account. If you feel that you have been unfairly moderated then contact the Moderator concerned - using a PM or the "Report" button is preferable to opening a new thread (although new members may have to do this). But do be aware that the Moderation team has the final word - the rules are set out by the site owner and you are only welcome here if you respect his wishes. Signatures and Avatars There is no formal policy for the use of signatures but if a moderator thinks it is too big and/or distracting then you may be asked to tone it down. No-one likes wading through signatures that are a page high. Similarly for avatars, expect distracting flashing and animated gifs to be removed. Reporting If you feel a post needs Moderator attention, please use the "Report" button next to the post date at the top. You can then enter details of why you have reported the post - but there is no need to include the content of the post as that is done automatically. The Moderating team will be alerted to the post and will deal with it as soon as they can. If you suspect a EULA violation, do not expect the Moderating team to do all the work - please provide some evidence in the report such as a copy of (or link to) the EULA in question, as well as the section you believe has been violated. Finally, please do not enter into an argument with the original poster - that is why we have Moderators. Spam Please do not react to spam in any way other than reporting it. Multiple reports are combined by the forum software, so there is no need to announce that you have reported the spam - in fact doing so only increases the work for the Moderator who deals with it. Interacting with this website Anyone found abusing the website is subject to harsh punishment without warning. A non-exhaustive list of potential abuses include: Automated forum registration or login. Automated posting or sending messages on the forum. Automated manipulation of polls, user reputation or other forum features. Automated creation or comments on issue tracker tickets. Automated creation or editing of wiki pages. Other abuses which are either examples of excessive bandwidth usage or automation of the site. Use common sense. If you do not have common sense, don't do anything. Do not automate the forum, wiki or issue tracker in any way at all. Scripts which automatically update AutoIt such as AutoUpdateIt are acceptable as long as they are not abused and do not generate excessive bandwidth usage.1 point