Leaderboard
Popular Content
Showing content with the highest reputation on 04/08/2014 in all areas
-
File Name: AutoIt v3.3.11.4 Beta File Submitter: Jon File Submitted: 07 Apr 2014 File Category: Beta 3.3.11.4 (7th April, 2014) (Beta) AutoIt: - Fixed #2677: AutoIt.chm Installdir.htm reference. - Fixed #2676: AutoIt.chm Installdir.htm Sqlite reference. UDFs: - Removed: http://api.exip.org/?call=ip from _GetIP() as the site was taken offline. - Removed: _WinAPI_GetUDFVersion() as all UDFs share the same version number as the AutoIt version they are shipped with. - Changed: $DOW_* constants to $DMW_*. - Changed: Reverted re-write of _PathFull() and _PathGetRelative(). - Changed: Re-wrote Array UDF to add 2D support and add some functions. THIS IS A SCRIPT BREAKING CHANGE. - Changed: Excel UDF was re-written. Functions and/or parameters have been renamed, removed or added. THIS IS A SCRIPT BREAKING CHANGE. - Changed: _SQLite 3.8.2.0 -> 3.8.4.3. - Changed: 5 second timer in _GetIP() to 5 minutes, due to the requirements of http://www.whatismyipaddress.com. - Added: _SQLite_SQLiteExe() download sqlite3.exe when needed. - Added: http://bot.whatismyipaddress.com as an IP disovery site to _GetIP(). - Fixed #2660: Button on GUI example. - Fixed: _IECreate() disable use of Windows Key. - Fixed #2689: When $bCursor in _ScreenCapture_Capture() was set to True and the PC was locked. Click here to download this file1 point
-
#include, more than once?
rickybobby reacted to Melba23 for a topic
rickybobby, Well-written UDFs (and certainly the standard AutoIt include files) use the #include-once directive - that way they will only be included once no matter how any times they are listed in other include files within the script. Note that the new SciTE4AutoIt3 just released includes (amongst many other utilities) Au3Stripper which removed all unused functions and variables from the include files to reduce the script size. You can download it from here. M231 point -
Just another quick and dirty approach using the text you have in the clipboard $sClipBoard = ClipGet() $aArray = StringSplit($sClipBoard, @LF) $sAutoIT = "$sString = " For $i = 1 To $aArray[0] Select Case $i = 1 $sAutoIT = $sAutoIT & "'" & StringStripCR($aArray[$i]) & "' & @CRLF & _" & @CRLF Case $i > 1 And $i < $aArray[0] $sAutoIT = $sAutoIT & @TAB & @TAB & "'" & StringStripCR($aArray[$i]) & "' & @CRLF & _" & @CRLF Case $i = $aArray[0] $sAutoIT = $sAutoIT & @TAB & @TAB & "'" & StringStripCR($aArray[$i]) & "'" EndSelect Next ClipPut($sAutoIT & @CRLF)1 point
-
This is easy to do : #include <File.au3> Local $a = 0 _FileReadToArray("t.txt", $a) Local $s = "" For $i = 1 To $a[0] If $i > 1 Then $s &= " & @CrLf & _" & @CrLf & @TAB & @TAB $s &= '"' & $a[$i] & '"' Next If $s = "" Then $s = "''" ConsoleWrite("$string = " & $s & @Lf) Br, FireFox.1 point
-
1 point
-
How to grab these (a very difficult pattern)
michaelslamet reacted to mikell for a topic
#include <Array.au3> $str = '08121901000 - 022 99621221 - www.adv08.com</div><!--description-->' & @CRLF & _ 'call: 08 55555 6111 (Dadan)</div><!--description-->' & @CRLF & _ '<img src="/getattachment/9630832c-3d4e-4e5b-af83-ee8bb6e9dbad/Show.aspx?maxSideSize=60" alt="Bemper Mitsubishi Pajero 2002"/></div><!--slide-thumbnail-->' & @CRLF & _ '<a href="/Asesoris-car/Aksesoris-other/Bemper-Mitsubishi-Pajero-2002-512066" target="_blank">Bemper Mitsubishi Pajero 2002</a><br />Bemper Mitsubishi Pajero 2002 4x4. Import from Australia, brand new, eks stock, call Raymond 0812711451</div><!--description-->' & @CRLF & _ 'Joe: 0878 6131 7111' & @CRLF & _ 'Text Me : 0822 8124 8624' & @CRLF & _ '081251136118(james)' & @CRLF & _ '7123408,081288778899' & @CRLF & _ '022 99621221,08121901012 - www.adv808.com</div><!--description-->' & @CRLF & _ '99621081,08111901112 - www.adv808.com</div><!--description-->' & @CRLF & _ 'For more info, please call 081233666201 / 081731161201' & @CRLF & _ 'For more info, please call 081233666201' & @CRLF & _ '<div class="titl listtitl"><a href="/car/acce-Others/VIMAX-PILL-ORIGINAL-(4)">VIMAX PILL ORIGINAL PERMANENT (081126747616)</a></div>' & @CRLF & _ 'there is nothing to grab here 08klajsa212222' & @CRLF & _ 'there is no valid pattern to grab here because length is 9 081123456' & @CRLF $aRet = StringRegExp(StringStripWS($str, 8), "08\d{8,10}", 3) _ArrayDisplay($aRet) The results are slightly different than Melba's because this code uses the string from your first post1 point -
Determine file type: text or binary
michaelslamet reacted to KaFu for a topic
http://mark0.net/code-tridlib-e.html1 point -
How to grab these (a very difficult pattern)
michaelslamet reacted to Melba23 for a topic
michaelslamet, This seems to work: #include <Array.au3> Global $aString[] = ["08121901000 - 022 99621221 - www.adv08.com</div><!--description-->", _ "call: 08 55555 6111 (Dadan)</div><!--description-->", _ '<a href="/Asesoris-car/Aksesoris-other/Bemper-Mitsubishi-Pajero-2002-512066" target="_blank">Bemper Mitsubishi Pajero 2002</a><br />Bemper Mitsubishi Pajero 2002 4x4. Import from Australia, brand new, eks stock, call Raymond 0812711451</div><!--description-->', _ "Joe: 0878 6131 7111", _ "Text Me : 0822 8124 8624", _ "081251136118(james)", _ "7123408,081288778899", _ "022 99621221,08121901012 - www.adv808.com</div><!--description-->", _ "For more info, please call 081233666201 / 081731161201", _ "For more info, please call 081233666201", _ '<div class="titl listtitl"><a href="/car/acce-Others/VIMAX-PILL-ORIGINAL-(4)">VIMAX PILL ORIGINAL PERMANENT (081126747616)</a></div>'] For $i = 0 To UBound($aString) - 1 ; Strip all spaces to make sure the digits are sequential $aRet = StringRegExp(StringStripWS($aString[$i], 8), "(08\d{8,10})", 3) _ArrayDisplay($aRet, "", Default, 8) Next SRE decode: (08\d{8,10}) - Capture any string beginning with 08 and followed by 8 to 10 other digits 3 - Create an array of all instances Does that do what you want? M231 point -
How to grab these (a very difficult pattern)
michaelslamet reacted to iamtheky for a topic
_Test("08121901000 - 022 99621221 - www.adv08.com</div><!--description-->") _Test("call: 08 55555 6111 (Dadan)</div><!--description-->") _Test('<a href="/Asesoris-car/Aksesoris-other/Bemper-Mitsubishi-Pajero-2002-512066" target="_blank">Bemper Mitsubishi Pajero 2002</a><br />Bemper Mitsubishi Pajero 2002 4x4. Import from Australia, brand new, eks stock, call Raymond 0812711451</div><!--description-->') _Test("Joe: 0878 6131 7111" & @CRLF) _Test("Text Me : 0822 8124 8624" & @CRLF) _Test("081251136118(james)" & @CRLF) _Test("7123408,081288778899" & @CRLF) _Test("022 99621221,08121901012 - www.adv808.com</div><!--description-->" & @CRLF) _Test("For more info, please call 081233666201 / 081731161201" & @CRLF) _Test("For more info, please call 081233666201" & @CRLF) _Test('<div class="titl listtitl"><a href="/car/acce-Others/VIMAX-PILL-ORIGINAL-(4)">VIMAX PILL ORIGINAL PERMANENT (081126747616)</a></div>' & @CRLF) Func _Test($StringTst) $string = stringstripws($StringTst , 8) $aString = stringregexp($string , "08\d+" , 3) For $i = 0 to ubound($aString) - 1 If StringLen($aString[$i]) > 9 And StringLen($aString[$i]) < 13 Then msgbox (0, '' , $aString[$i]) next EndFunc1 point -
Got error when run code wizard
fikri1979 reacted to Palestinian for a topic
Melba yeah it just might be, I found >the topic again and as I mentioned earlier, from my understanding (of the "It generates code") I thought it was the auto complete in SciTE, still good to know how the auto complete works1 point -
Thanks to all those involved in UDF changes. It may not be immediately apparent to those reading the changelog above, but the changes made to the Excel UDF and Array UDF represent a huge amount of work by a number of people over the last year.1 point
-
#include <Array.au3> #include <Inet.au3> Local $aSRE = StringRegExp(SOURCE, '<a\h+href="([^"]+)"[^>]+>Windows\h+x\d{2}:', 3) _ArrayDisplay($aSRE) I created this too >> http://regex101.com/r/qL3bQ71 point
-
Well said Dan... My words exactly 8)1 point
-
Welcome to the forums! To improve your chances of getting assistance, you may want to post additional information such as website, sample URLs, how you would manually download the photos, code you have tried, etc.1 point