Leaderboard
Popular Content
Showing content with the highest reputation on 06/06/2013 in all areas
-
Good coding practices in AutoIt
jaberwacky and one other reacted to guinness for a topic
This is better. #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 72 points -
OOo/LibO Calc UDF
rohmanabdur reacted to GMK for a topic
I decided to enhance the functionality of the OOo COM UDF found >here and >here. Thanks to Leagnus and Andy G for providing the initial functions and framework. This UDF includes the following working functions: _OOoCalc_BookNew _OOoCalc_BookOpen _OOoCalc_BookAttach _OOoCalc_BookSave _OOoCalc_BookSaveAs _OOoCalc_BookClose _OOoCalc_WriteCell _OOoCalc_WriteFormula _OOoCalc_WriteFromArray _OOoCalc_HyperlinkInsert _OOoCalc_RangeMoveOrCopy _OOoCalc_RangeSort _OOoCalc_RangeClearContents _OOoCalc_CreateBorders _OOoCalc_NumberFormat _OOoCalc_ReadCell _OOoCalc_ReadSheetToArray _OOoCalc_RowDelete _OOoCalc_ColumnDelete _OOoCalc_RowInsert _OOoCalc_ColumnInsert _OOoCalc_SheetAddNew _OOoCalc_SheetDelete _OOoCalc_SheetNameGet _OOoCalc_SheetNameSet _OOoCalc_SheetList _OOoCalc_SheetActivate _OOoCalc_SheetSetVisibility _OOoCalc_SheetMove _OOoCalc_SheetPrint _OOoCalc_HorizontalAlignSet _OOoCalc_FontSetProperties _OOoCalc_CellSetColors _OOoCalc_RowSetColors _OOoCalc_ColumnSetColors _OOoCalc_RowSetProperties _OOoCalc_ColumnSetProperties _OOoCalc_FindInRange _OOoCalc_ReplaceInRange Please help me test this and let me know of any problems, questions, suggestions or comments you may have. Edit (August 5, 2016): Latest files have been uploaded. Script-breaking changes include renaming the functions to start with _OOoCalc_. Edit (November 14, 2016): New version, including fixed sort function! Edit (November 15, 2016): Lots of minor changes including tightening up the error checking. Edit (November 16, 2016): Added ByRef to object parameters. Edited demo. OOoCalcConstants.au3 OOoCalc.au3 OOoCalc_Demo.au31 point -
mesale0077 asked me whether I could code some CSS loading animations from different web sites. These are the results using GDI+ (AutoIt v3.3.12.0+ required!): _GDIPlus_MonochromaticBlinker.au3 / _GDIPlus_RotatingBokeh.au3 _GDIPlus_SpinningCandy.au3 / _GDIPlus_SteamPunkLoading.au3 _GDIPlus_IncreasingBalls.au3 / _GDIPlus_PacmanProgressbar.au3 _GDIPlus_StripProgressbar.au3 / _GDIPlus_RingProgressbar.au3 _GDIPlus_LineProgressbar.au3 / _GDIPlus_SimpleLoadingAnim.au3 _GDIPlus_TextFillingWithWater.au3 / _GDIPlus_MultiColorLoader.au3 _GDIPlus_LoadingSpinner.au3 / _GDIPlus_SpinningAndPulsing.au3 _GDIPlus_TogglingSphere.au3 / _GDIPlus_CloudySpiral.au3 _GDIPlus_GlowingText.au3 (thanks to Eukalyptus) / _GDIPlus_HypnoticLoader.au3 _GDIPlus_RotatingRectangles.au3 / _GDIPlus_TRONSpinner.au3 _GDIPlus_RotatingBars.au3 / _GDIPlus_AnotherText.au3 (thanks to Eukalyptus) _GDIPlus_CogWheels.au3 (thanks to Eukalyptus) / _GDIPlus_DrawingText.au3 (thanks to Eukalyptus) _GDIPlus_GearsAnim.au3 / _GDIPlus_LEDAnim.au3 _GDIPlus_LoadingTextAnim.au3 / _GDIPlus_MovingRectangles.au3 _GDIPlus_SpinningAndGlowing.au3 (thanks to Eukalyptus) / _GDIPlus_YetAnotherLoadingAnim.au3 _GDIPlus_AnimatedTypeLoader.au3 / _GDIPlus_Carousel.au3 Each animation function has a built-in example how it can be used. AiO download: GDI+ Animated Wait Loading Screens.7z (previous downloads: 1757) Big thanks to Eukalyptus for providing several examples. Maybe useful for some of you Br, UEZ PS: I don't understand CSS - everything is made out of my mind, so it might be different from original CSS examples1 point
-
LAST VERSION - 3.8 03-Jul-12 This library contains the WinAPI functions are not included for unknown reasons to the native AutoIt WinAPI library. I use this UDF in nearly all of my programs, and decided to share it with the AutoIt community. I agree that over time some of these functions will be part of the native AutoIt library, but still... The library includes some undocumented, but useful functions (eg _WinAPI_GetFontResourceInfo()). The library also contains all the necessary constants to work with the appropriate functions. Most functions from this UDF intended for experienced users, but beginners will find the same lot of useful information for yourself. I will be to periodically add new functions to the library. The archive contains WinAPIEx library, and as usual an excellent examples from me. Some examples I took from this forum and to simplify them for better understanding. For those who use SciTE (full version) I have prepared the au3.userudfs.properties and au3.user.calltips.api files to highlight functions from this UDF in your scripts. Just copy this files to ...SciTEProperties and ...SciTEAPI, respectively. I hope this UDF will be useful for many as for me. I look forward to any feedback and suggestions. Maybe somebody wants to add new WinAPI functions? Credits Available functions Files to download WinAPIEx UDF v3.8 for AutoIt 3.3.6.1 Previous downloads: 27953 WinAPIEx UDF v3.8 for AutoIt 3.3.8.x Previous downloads: 148501 point
-
_HotKeyString_To_AutoitCode
mesale0077 reacted to AZJIO for a topic
; #FUNCTION# ;================================================================================= ; Function Name ...: _HotKeyString_To_AutoitCode ; Description ........: Converts text format recording hotkey to format HotKeySet in Autoit3 ; Syntax................: _HotKeyString_To_AutoitCode ( $sKey ) ; Parameters: ; $sKey - text format recording hot key, such as "Ctrl + s" ; Return values ....: Success - Returns a string in the format function in HotKeySet Autoit3, such as "^s" ; Failure - empty string, @error: ; |1 - empty string ; |2 - with modifiers used in more than one key ; |3 - the same modifier is used more than once ; Author(s) ..........: AZJIO ; Remarks ..........: ; ============================================================================================ Func _HotKeyString_To_AutoitCode($sKey) Local $ch, $k If $sKey = '' Then Return SetError(1, 0, '') $sKey = '{' & StringRegExpReplace(StringStripWS($sKey, 8), '(?<!\+)\+', '}{') & '}' ; удаляем пробелы, используем "+" как разделитель If StringRight($sKey, 3) = '}{}' Then $sKey = StringTrimRight($sKey, 2) ; если заканчивается разделителем справа, вместо клавиши If StringLeft($sKey, 3) = '{}{' Then $sKey = StringTrimLeft($sKey, 2) ; если заканчивается разделителем слева, вместо клавиши $sKey = StringRegExpReplace($sKey, '\{([^!+^#{}])\}', '\1') ; если не метасимволы то убираем обрамляющие фигурные скобки ; Создаёт строку модификаторов Local $sMod = '' Local $aMod = StringRegExp($sKey, '(\{(?:Alt|Shift|Ctrl|Win)\})', 3) ; извлекает модификаторы If Not @error Then For $i = 0 To UBound($aMod) - 1 $sMod &= $aMod[$i] Next $sMod = StringReplace($sMod, '{Alt}', '!') If @extended > 1 Then Return SetError(3, 0, '') $sMod = StringReplace($sMod, '{Shift}', '+') If @extended > 1 Then Return SetError(3, 0, '') $sMod = StringReplace($sMod, '{Ctrl}', '^') If @extended > 1 Then Return SetError(3, 0, '') $sMod = StringReplace($sMod, '{Win}', '#') If @extended > 1 Then Return SetError(3, 0, '') EndIf ; проверка наличие только одной клавиши в сочетании с модификаторами $sKey = StringRegExpReplace($sKey, '\{Alt\}|\{Shift\}|\{Ctrl\}|\{Win\}', '') ; удаляем модификаторы $ch = StringRegExpReplace($sKey, '\{.*?\}', '') ; подсчитываем элементы обрамлённые фигурными скобками $k = @extended $k += StringLen($ch) ; добавляем количество символов без фигурных скобок If $k <> 1 Then Return SetError(2, 0, '') ; возвращает пустую строку при ошибке Return $sMod & $sKey EndFunc ;==>_HotKeyString_To_AutoitCode example #include <_HotKeyString_To_AutoitCode.au3> $sHotKey = _HotKeyString_To_AutoitCode('Ctrl + s') & @LF $sHotKey &= _HotKeyString_To_AutoitCode('Ctrl + Alt+ F1') & @LF $sHotKey &= _HotKeyString_To_AutoitCode('Ctrl + Shift+ +') & @LF $sHotKey &= _HotKeyString_To_AutoitCode('Win + Home') MsgBox(0, 'Yes?', $sHotKey) ; error $sHotKey = _HotKeyString_To_AutoitCode(' + Shift') & @LF ; excess divider $sHotKey &= _HotKeyString_To_AutoitCode('Ctrl + Shift+ ') & @LF ; excess divider $sHotKey &= _HotKeyString_To_AutoitCode(' + Shift+ ') & @LF ; excess divider $sHotKey &= _HotKeyString_To_AutoitCode(' Ctrl + Shift') & @LF ; only modifiers $sHotKey &= _HotKeyString_To_AutoitCode(' Ctrl + d+Shift') & @LF ; non-compliance with order $sHotKey &= _HotKeyString_To_AutoitCode('Ctrl + s + d') ; more than one key with the modifier MsgBox(0, 'Faulty', $sHotKey) To read from an ini-file1 point -
HiHo Forum, I'm currently implementing a custom file extension filter into SMF's report, and I've noticed that this is a wheel that get's re-invented all the time. So I made this post as a reference and for further discussion. Here's what I've got up to now. Do you see any mismatches / missing groups, or do you have a better wording for the group names etc.? The list is far from perfect and still needs lot's of optimization. My goal is to establish a "de facto" standard for File Filter groups and sub-groups, so feel free to add, change and criticize ... Audio (*.flac;*.m3u;*.m4a;*.mid;*.mp3;*.mpa;*.ra;*.wav;*.wma) Compressed (*.7z;*.ace;*.arj;*.cab;*.cbr;*.jar;*.rar;*.tar.gz;*.zip) Disk Image (*.bin;*.ccd;*.cue;*.img;*.iso;*.mdf;*.mds;*.nrg) Document (*.doc;*.docm;*.docx;*.dotm;*.dotx;*.pdf;*.rtf) Executable (*.bat;*.cmd;*.com;*.cpl;*.dll;*.exe) Image (*.bmp;*.gif;*.ico;*.jpeg;*.jpg;*.png;*.psd;*.tga;*.tif) Office (*.accdb;*.accde;*.accdr;*.accdt;*.csv;*.dbf;*.doc;*.docm;*.docx;*.dotm;*.dotx;*.mdb;*.mde;*.odg;*.odp;*.ods;*.odt;*.otp;*.ots;*.ott;*.pot;*.potm;*.potx;*.ppam;*.pps;*.ppsm;*.ppsx;*.ppt;*.pptm;*.pptx;*.rtf;*.sldm;*.sldx;*.thmx;*.txt;*.xlam;*.xll;*.xls;*.xlsb;*.xlsm;*.xlsx;*.xltm;*.xltx) Text (*.au3;*.bak;*.bat;*.c;*.cfg;*.cgi;*.conf;*.cpp;*.css;*.h;*.htm;*.html;*.inf;*.ini;*.java;*.js;*.log;*.lst;*.nfo;*.php;*.php3;*.pl;*.py;*.reg;*.txt;*.xml) Video (*.3g2;*.3gp;*.asf;*.asx;*.avi;*.divx;*.flv;*.m4v;*.mkv;*.mov;*.mp4;*.mpeg;*.mpg;*.ogv;*.rm;*.swf;*.ts;*.vob;*.wmv) Web (*.asp;*.htm;*.html;*.js;*.mht;*.php;*.php3;*.pl;*.py;*.xml) _FileFilter_Extensions_List_v01.zip Regards1 point
-
horne, How kind - but a pity your repartee does not match the heights achieved by the machine in your avatar. M231 point
-
Potar, A word to the wise - I suggest a change of attitude if you want to get help here in future. M231 point
-
Account for system interruption?
olo reacted to JLogan3o13 for a topic
<sniff> Anyone else smelling fish? In your OP you stated "Windows being the way it is produces a pop up window that will obviously interrupt my script", yet now you don't see these pop-ups but want to code for them just in case?? We cannot help if you aren't forthcoming about what you're actually trying to do. If it is a work thing and you don't want to post in the forum, at least a PM to clarify some of the inconsistencies.1 point -
You have to know that if there is variables types, they need to be manipulated differently. In you script, $aWnd is an array. If you want to test it, you have two functions : IsArray and Ubound. If $aWnd Then ;means nothing, incorrect ;dostuff EndIf If IsArray($aWnd) = 1 Then ;$aWnd is an array ;dostuff EndIfAlmost same thing for WinGetText, it returns a string. If WinGetText($olos) Then ;incorrect (epic btw) (gets the text of an array pointer and then... ok I stop) ;dostuff EndIf If WinGetText($aWnd[1][0]) = $olos[0] Then ;compares the text of the window handle on the index 1 of $aWnd with the first item index of $olos which is Exception. ;dostuff EndIfOn this second snippet you will have to include two nested For statements :-One for looping through the $aWnd array -One for looping through the $olos array aWnd[1][0] = handle1 aWnd[2][0] = handle2 olos[0] = text1 olos[1] = text2 for i = 1 to 2 for j = 0 to 1 if WinGetText(aWnd[i][0]) = olos[j] then ;you're brilliant endif next next Edit: Well I can see that my keyboard, my brain, my fingers, my whatever are... slow. Br, FireFox.1 point
-
@olo You can list all windows and search for a text in it. It would be better to enum windows according to the process. Br, FireFox.1 point
-
1 point
-
Personally, I'd add in a timeout and If WinActive (though not strictly necessary) and some sleeps to make sure of timing being under control. Conditional checks and sleeps allow you to test things far more easily.1 point