Search the Community
Showing results for tags 'Find'.
-
Good evening everyone I am working with Word UDF ( thanks @water! ), and, especially, with the function _Word_DocFindReplace(). The replace does work everywhere in the document, but, it does not work in Headers or Footers. Am I missing something or am I forced to use the code below? I have already looked in the Help file ( about _Word_DocFindReplace() ), but there are no mentions about replace text in Headers/Footers. Sub FindAndReplaceFirstStoryOfEachType() Dim rngStory As Range For Each rngStory In ActiveDocument.StoryRanges With rngStory.Find .Text = "find text" .Replacement.Text = "I'm found .Wrap = wdFindContinue .Execute Replace:=wdReplaceAll End With Next rngStory End Sub Thanks everyone in advance Best Regards.
-
hello dears First I would like to apologize to you for my many questions. I have a new question if you allow I am programming an audio player for blinds I had a problem I put an option in the folders context menu to Opens the audio files that in the selected folder I did not know how to make the Autoit Search the subfolders Please provide an example of how to search for files in the subfolders Let's say, for example, MP3 files Just give me a simple example and I will try to modify it as appropriate for the program I designing it Please help me to find the solution Thanks in advance
-
Using the alarm received parameter how to search for the picture that matches the year month day hour min and sec and by the name of the .jpg file the jpg file naming format is first letter is always m followed by last two digits of year then two digit month two digit day two digit hour two digit minute and two digit second then get that picture and paste it in Microsoft Excel.How to do it? Please help me. Thank you.
- 10 replies
-
Hello guys, I'm working on this script: $search = GUICtrlCreateButton("Search", 10, 10, 90, 30) $find = GUICtrlCreateInput("", 710, 10, 200, 25) GUICtrlSetState($find, $GUI_DISABLE) $ok_find = GUICtrlCreateButton("Find", 925, 10, 65, 25) GUICtrlSetState($ok_find, $GUI_DISABLE) Case $search GUICtrlSetState($ok_trova, $GUI_ENABLE) GUICtrlSetState($trova, $GUI_ENABLE) _GUICtrlListView_SimpleSort($list, $g_bSortSense, 0, False) _GUICtrlListView_DeleteAllItems($list) $File_txt = _FileListToArray("\\PATH\", "*.ini", $FLTA_FILES, True) Local $aLines, $File_txt For $i = 1 To $File_txt[0] _FileReadtoArray($File_txt[$i], $aLines) For $j = 1 To $aLines[0] GUICtrlCreateListViewItem($aLines[$j], $list) Next Next For $i2 = 0 To _GUICtrlListView_GetColumnCount($list) _GUICtrlListView_SetColumnWidth($list, $i2, $LVSCW_AUTOSIZE_USEHEADER) Next Case $ok_find $iI = _GUICtrlListView_FindInText($list, GUICtrlRead($input_find)) MsgBox($MB_SYSTEMMODAL, "Information", "Target Item Index: " & $iI) _GUICtrlListView_EnsureVisible($list, $iI) through a inputbox I would search for the desired word and highlight it in the GuiCtrlListView. Can you help me?
- 1 reply
-
- guictrllistview
- find
-
(and 1 more)
Tagged with:
-
I was looking to find the MIME type of a file using AutoIt and found a function to do it but it only detects the 26 hardcoded, test, MIME types and returns 0 if the file is not one of the few hardcoded MIME's... So I decided to throw a function together... It detects 249 MIME types via the files extention. The thing is it dedects only by the extention; and not by actually checking the file. True MIME Finder: Supports 26 MIME Types ; sample usage $file = "c:\file path\file.txt" $mime_type = __GetMIMEByCode($file) MsgBox(0, "MIME Type:", $mime_type) ; the function Func __GetMIMEByCode($f_file) $f_call = DllCall("urlmon.dll", "long", "FindMimeFromData", _ "ptr", 0, _ "wstr", $f_file, _ "ptr", 0, _ "DWORD", 0, _ "ptr", 0, _ "DWORD", 1, _ "ptr*", 0, _ "DWORD", 0) If @error Then Return 0 $f_mime = DllStructGetData(DllStructCreate("wchar[" & _WinAPI_StringLenW($f_call[7]) & "]", $f_call[7]), 1) Return $f_mime EndFunc Determine MIME By Extension: Supports 249 MIME Types ;sample usage $file = "c:\file path\filename.txt" $mime_type = __GetMIMEByExtention($file) MsgBox(0, "MIME Type:", $mime_type) ; the function Func __GetMIMEByExtention($f_file) Local $f_extension = StringSplit($f_file, ".") Switch '.' & $f_extension[$f_extension[0]] Case '.x3d' Return 'application/vnd.hzn-3d-crossword' Case '.3gp' Return 'video/3gpp' Case '.3g2' Return 'video/3gpp2' Case '.mseq' Return 'application/vnd.mseq' Case '.pwn' Return 'application/vnd.3m.post-it-notes' Case '.plb' Return 'application/vnd.3gpp.pic-bw-large' Case '.psb' Return 'application/vnd.3gpp.pic-bw-small' Case '.pvb' Return 'application/vnd.3gpp.pic-bw-var' Case '.tcap' Return 'application/vnd.3gpp2.tcap' Case '.7z' Return 'application/x-7z-compressed' Case '.abw' Return 'application/x-abiword' Case '.ace' Return 'application/x-ace-compressed' Case '.acc' Return 'application/vnd.americandynamics.acc' Case '.acu' Return 'application/vnd.acucobol' Case '.atc' Return 'application/vnd.acucorp' Case '.adp' Return 'audio/adpcm' Case '.aab' Return 'application/x-authorware-bin' Case '.aam' Return 'application/x-authorware-map' Case '.aas' Return 'application/x-authorware-seg' Case '.air' Return 'application/vnd.adobe.air-application-installer-package+zip' Case '.swf' Return 'application/x-shockwave-flash' Case '.fxp' Return 'application/vnd.adobe.fxp' Case '.pdf' Return 'application/pdf' Case '.ppd' Return 'application/vnd.cups-ppd' Case '.dir' Return 'application/x-director' Case '.xdp' Return 'application/vnd.adobe.xdp+xml' Case '.xfdf' Return 'application/vnd.adobe.xfdf' Case '.aac' Return 'audio/x-aac' Case '.ahead' Return 'application/vnd.ahead.space' Case '.azf' Return 'application/vnd.airzip.filesecure.azf' Case '.azs' Return 'application/vnd.airzip.filesecure.azs' Case '.azw' Return 'application/vnd.amazon.ebook' Case '.ami' Return 'application/vnd.amiga.ami' Case 'N/A' Return 'application/andrew-inset' Case '.apk' Return 'application/vnd.android.package-archive' Case '.cii' Return 'application/vnd.anser-web-certificate-issue-initiation' Case '.fti' Return 'application/vnd.anser-web-funds-transfer-initiation' Case '.atx' Return 'application/vnd.antix.game-component' Case '.mpkg' Return 'application/vnd.apple.installer+xml' Case '.aw' Return 'application/applixware' Case '.les' Return 'application/vnd.hhe.lesson-player' Case '.swi' Return 'application/vnd.aristanetworks.swi' Case '.s' Return 'text/x-asm' Case '.atomcat' Return 'application/atomcat+xml' Case '.atomsvc' Return 'application/atomsvc+xml' Case '.atom, .xml' Return 'application/atom+xml' Case '.ac' Return 'application/pkix-attr-cert' Case '.aif' Return 'audio/x-aiff' Case '.avi' Return 'video/x-msvideo' Case '.aep' Return 'application/vnd.audiograph' Case '.dxf' Return 'image/vnd.dxf' Case '.dwf' Return 'model/vnd.dwf' Case '.par' Return 'text/plain-bas' Case '.bcpio' Return 'application/x-bcpio' Case '.bin' Return 'application/octet-stream' Case '.bmp' Return 'image/bmp' Case '.torrent' Return 'application/x-bittorrent' Case '.cod' Return 'application/vnd.rim.cod' Case '.mpm' Return 'application/vnd.blueice.multipass' Case '.bmi' Return 'application/vnd.bmi' Case '.sh' Return 'application/x-sh' Case '.btif' Return 'image/prs.btif' Case '.rep' Return 'application/vnd.businessobjects' Case '.bz' Return 'application/x-bzip' Case '.bz2' Return 'application/x-bzip2' Case '.csh' Return 'application/x-csh' Case '.c' Return 'text/x-c' Case '.cdxml' Return 'application/vnd.chemdraw+xml' Case '.css' Return 'text/css' Case '.cdx' Return 'chemical/x-cdx' Case '.cml' Return 'chemical/x-cml' Case '.csml' Return 'chemical/x-csml' Case '.cdbcmsg' Return 'application/vnd.contact.cmsg' Case '.cla' Return 'application/vnd.claymore' Case '.c4g' Return 'application/vnd.clonk.c4group' Case '.sub' Return 'image/vnd.dvb.subtitle' Case '.cdmia' Return 'application/cdmi-capability' Case '.cdmic' Return 'application/cdmi-container' Case '.cdmid' Return 'application/cdmi-domain' Case '.cdmio' Return 'application/cdmi-object' Case '.cdmiq' Return 'application/cdmi-queue' Case '.c11amc' Return 'application/vnd.cluetrust.cartomobile-config' Case '.c11amz' Return 'application/vnd.cluetrust.cartomobile-config-pkg' Case '.ras' Return 'image/x-cmu-raster' Case '.dae' Return 'model/vnd.collada+xml' Case '.csv' Return 'text/csv' Case '.cpt' Return 'application/mac-compactpro' Case '.wmlc' Return 'application/vnd.wap.wmlc' Case '.cgm' Return 'image/cgm' Case '.ice' Return 'x-conference/x-cooltalk' Case '.cmx' Return 'image/x-cmx' Case '.xar' Return 'application/vnd.xara' Case '.cmc' Return 'application/vnd.cosmocaller' Case '.cpio' Return 'application/x-cpio' Case '.clkx' Return 'application/vnd.crick.clicker' Case '.clkk' Return 'application/vnd.crick.clicker.keyboard' Case '.clkp' Return 'application/vnd.crick.clicker.palette' Case '.clkt' Return 'application/vnd.crick.clicker.template' Case '.clkw' Return 'application/vnd.crick.clicker.wordbank' Case '.wbs' Return 'application/vnd.criticaltools.wbs+xml' Case '.cryptonote' Return 'application/vnd.rig.cryptonote' Case '.cif' Return 'chemical/x-cif' Case '.cmdf' Return 'chemical/x-cmdf' Case '.cu' Return 'application/cu-seeme' Case '.cww' Return 'application/prs.cww' Case '.curl' Return 'text/vnd.curl' Case '.dcurl' Return 'text/vnd.curl.dcurl' Case '.mcurl' Return 'text/vnd.curl.mcurl' Case '.scurl' Return 'text/vnd.curl.scurl' Case '.car' Return 'application/vnd.curl.car' Case '.pcurl' Return 'application/vnd.curl.pcurl' Case '.cmp' Return 'application/vnd.yellowriver-custom-menu' Case '.dssc' Return 'application/dssc+der' Case '.xdssc' Return 'application/dssc+xml' Case '.deb' Return 'application/x-debian-package' Case '.uva' Return 'audio/vnd.dece.audio' Case '.uvi' Return 'image/vnd.dece.graphic' Case '.uvh' Return 'video/vnd.dece.hd' Case '.uvm' Return 'video/vnd.dece.mobile' Case '.uvu' Return 'video/vnd.uvvu.mp4' Case '.uvp' Return 'video/vnd.dece.pd' Case '.uvs' Return 'video/vnd.dece.sd' Case '.uvv' Return 'video/vnd.dece.video' Case '.dvi' Return 'application/x-dvi' Case '.seed' Return 'application/vnd.fdsn.seed' Case '.dtb' Return 'application/x-dtbook+xml' Case '.res' Return 'application/x-dtbresource+xml' Case '.ait' Return 'application/vnd.dvb.ait' Case '.svc' Return 'application/vnd.dvb.service' Case '.eol' Return 'audio/vnd.digital-winds' Case '.djvu' Return 'image/vnd.djvu' Case '.dtd' Return 'application/xml-dtd' Case '.mlp' Return 'application/vnd.dolby.mlp' Case '.wad' Return 'application/x-doom' Case '.dpg' Return 'application/vnd.dpgraph' Case '.dra' Return 'audio/vnd.dra' Case '.dfac' Return 'application/vnd.dreamfactory' Case '.dts' Return 'audio/vnd.dts' Case '.dtshd' Return 'audio/vnd.dts.hd' Case '.dwg' Return 'image/vnd.dwg' Case '.geo' Return 'application/vnd.dynageo' Case '.es' Return 'application/ecmascript' Case '.mag' Return 'application/vnd.ecowin.chart' Case '.mmr' Return 'image/vnd.fujixerox.edmics-mmr' Case '.rlc' Return 'image/vnd.fujixerox.edmics-rlc' Case '.exi' Return 'application/exi' Case '.mgz' Return 'application/vnd.proteus.magazine' Case '.epub' Return 'application/epub+zip' Case '.eml' Return 'message/rfc822' Case '.nml' Return 'application/vnd.enliven' Case '.xpr' Return 'application/vnd.is-xpr' Case '.xif' Return 'image/vnd.xiff' Case '.xfdl' Return 'application/vnd.xfdl' Case '.emma' Return 'application/emma+xml' Case '.ez2' Return 'application/vnd.ezpix-album' Case '.ez3' Return 'application/vnd.ezpix-package' Case '.fst' Return 'image/vnd.fst' Case '.fvt' Return 'video/vnd.fvt' Case '.fbs' Return 'image/vnd.fastbidsheet' Case '.fe_launch' Return 'application/vnd.denovo.fcselayout-link' Case '.f4v' Return 'video/x-f4v' Case '.flv' Return 'video/x-flv' Case '.fpx' Return 'image/vnd.fpx' Case '.npx' Return 'image/vnd.net-fpx' Case '.flx' Return 'text/vnd.fmi.flexstor' Case '.fli' Return 'video/x-fli' Case '.ftc' Return 'application/vnd.fluxtime.clip' Case '.fdf' Return 'application/vnd.fdf' Case '.f' Return 'text/x-fortran' Case '.mif' Return 'application/vnd.mif' Case '.fm' Return 'application/vnd.framemaker' Case '.fh' Return 'image/x-freehand' Case '.fsc' Return 'application/vnd.fsc.weblaunch' Case '.fnc' Return 'application/vnd.frogans.fnc' Case '.ltf' Return 'application/vnd.frogans.ltf' Case '.ddd' Return 'application/vnd.fujixerox.ddd' Case '.xdw' Return 'application/vnd.fujixerox.docuworks' Case '.xbd' Return 'application/vnd.fujixerox.docuworks.binder' Case '.oas' Return 'application/vnd.fujitsu.oasys' Case '.oa2' Return 'application/vnd.fujitsu.oasys2' Case '.oa3' Return 'application/vnd.fujitsu.oasys3' Case '.fg5' Return 'application/vnd.fujitsu.oasysgp' Case '.bh2' Return 'application/vnd.fujitsu.oasysprs' Case '.spl' Return 'application/x-futuresplash' Case '.fzs' Return 'application/vnd.fuzzysheet' Case '.g3' Return 'image/g3fax' Case '.gmx' Return 'application/vnd.gmx' Case '.gtw' Return 'model/vnd.gtw' Case '.txd' Return 'application/vnd.genomatix.tuxedo' Case '.ggb' Return 'application/vnd.geogebra.file' Case '.ggt' Return 'application/vnd.geogebra.tool' Case '.gdl' Return 'model/vnd.gdl' Case '.gex' Return 'application/vnd.geometry-explorer' Case '.gxt' Return 'application/vnd.geonext' Case '.g2w' Return 'application/vnd.geoplan' Case '.g3w' Return 'application/vnd.geospace' Case '.gsf' Return 'application/x-font-ghostscript' Case '.bdf' Return 'application/x-font-bdf' Case '.gtar' Return 'application/x-gtar' Case '.texinfo' Return 'application/x-texinfo' Case '.gnumeric' Return 'application/x-gnumeric' Case '.kml' Return 'application/vnd.google-earth.kml+xml' Case '.kmz' Return 'application/vnd.google-earth.kmz' Case '.gqf' Return 'application/vnd.grafeq' Case '.gif' Return 'image/gif' Case '.gv' Return 'text/vnd.graphviz' Case '.gac' Return 'application/vnd.groove-account' Case '.ghf' Return 'application/vnd.groove-help' Case '.gim' Return 'application/vnd.groove-identity-message' Case '.grv' Return 'application/vnd.groove-injector' Case '.gtm' Return 'application/vnd.groove-tool-message' Case '.tpl' Return 'application/vnd.groove-tool-template' Case '.vcg' Return 'application/vnd.groove-vcard' Case '.h261' Return 'video/h261' Case '.h263' Return 'video/h263' Case '.h264' Return 'video/h264' Case '.hpid' Return 'application/vnd.hp-hpid' Case '.hps' Return 'application/vnd.hp-hps' Case '.hdf' Return 'application/x-hdf' Case '.rip' Return 'audio/vnd.rip' Case '.hbci' Return 'application/vnd.hbci' Case '.jlt' Return 'application/vnd.hp-jlyt' Case '.pcl' Return 'application/vnd.hp-pcl' Case '.hpgl' Return 'application/vnd.hp-hpgl' Case '.hvs' Return 'application/vnd.yamaha.hv-script' Case '.hvd' Return 'application/vnd.yamaha.hv-dic' Case '.hvp' Return 'application/vnd.yamaha.hv-voice' Case '.sfd-hdstx' Return 'application/vnd.hydrostatix.sof-data' Case '.stk' Return 'application/hyperstudio' Case '.hal' Return 'application/vnd.hal+xml' Case '.html' Return 'text/html' Case '.irm' Return 'application/vnd.ibm.rights-management' Case '.sc' Return 'application/vnd.ibm.secure-container' Case '.ics' Return 'text/calendar' Case '.icc' Return 'application/vnd.iccprofile' Case '.ico' Return 'image/x-icon' Case '.igl' Return 'application/vnd.igloader' Case '.ief' Return 'image/ief' Case '.ivp' Return 'application/vnd.immervision-ivp' Case '.ivu' Return 'application/vnd.immervision-ivu' Case '.rif' Return 'application/reginfo+xml' Case '.3dml' Return 'text/vnd.in3d.3dml' Case '.spot' Return 'text/vnd.in3d.spot' Case '.igs' Return 'model/iges' Case '.i2g' Return 'application/vnd.intergeo' Case '.cdy' Return 'application/vnd.cinderella' Case '.xpw' Return 'application/vnd.intercon.formnet' Case '.fcs' Return 'application/vnd.isac.fcs' Case '.ipfix' Return 'application/ipfix' Case Else Return 0 EndSwitch EndFunc
-
I searched around for the best way to this and am still a bit lost. I am trying to find the last non-empty cell in a column in Excel. In the past, there was a function _ExcelSheetUsedRangeGet($oExcel, $vSheet) in >this thread. However, much has changed since then and when I downloaded it I could not find that function to see how it worked. Google found this site for me which offered a couple of promising looking approaches: They are in VBA. I usually can convert VBA but I am not 100% on these. The first approach looks a lot like it should convert easily to _Excel_RangeFind but I am not familiar enough with all the parameters. I understand the operators referenced in the help file but I did not see a lot of info on XLFindLookIn and not sure what to do with .Row. I am also not sure if these are the best approaches? Any guidance on the best way to do this would be much appreciated. If this is already part of _Excel_RangeFind I could use an example. Any help would be greatly appreciated. JFish
-
How can I programatically find the styles of all the sentences on a Microsoft Word document? I tried this code but it didn't work: #include <Word.au3> Global $oWord, $oDoc $oWord = _Word_Create() $oDoc = _Word_DocGet($oWord, 1) Local $sCount = $oDoc.Sentences.Count For $i = 0 To $sCount - 1 Local $oRange = _Word_DocRangeSet($oDoc, -1, $wdSentence, $i, $wdSentence, 1) ConsoleWrite("The style of this sentence is: " & $oRange.Style & @LF) Next
-
Hi everyone! (again).. I am trying to cross-reference user input with a .txt file.. or at least thats what the plan is.. before i get way too heavily involved.. is it possible to have the user input a date (November 6 2012) and then search a .txt file that has "November 6 2012 : xxxxx:xxxxx:xxxxx" and pull out the xxxxx:xxxxx:xxxxx, and use that as a string? OR, should i transfer that data into a global array? THANKS@
-
The program is supposed to search for *.pst files, then copy the results to a server share. What am I doing wrong? It doesn't seem to be doing anything. $nMsg = GUIGetMsg() Switch $nmsg Case $bckuppst While 1 $pst1=FileFindFirstFile("*.pst") FileCopy($pst1, "\\majordc01\backups\" & @UserName, 8) $pst2=FileFindNextFile($pst1) FileCopy($pst2, "\\majordc01\backups\" & @UserName, 8) if @error then ExitLoop WEnd EndSwitch Thanks!
- 5 replies
-
- FileFindFirstFile
- find
-
(and 1 more)
Tagged with:
-
_FileFindEx Get More from File/Folder Searches (formerly _WinAPI_FileFind) Since it's always bugged me that the AutoIT implementation of 'FindFirstFile' and 'FindNextFile' only returned filenames and that extra calls had to be made to get file-size, attributes, short-names, and date/time of file creation,last-access, & last-modification which severely increased the amount of time it took to properly analyze the contents of a folder and it's files, I decided to create an alternative. This uses the same Windows calls as AutoIT, except it returns all the information that it rightfully should for each file found - including: File attributes (in numerical form, not a silly string format)Creation TimeLast-Access TimeLast-Write TimeFileSizeFilename (obviously)8.3 short name (if it is 1. different from the regular Filename and 2. if short-names haven't been turned offReparse Point info (if available)Now, the calling process is a little different, though for the most part not much is required to be altered in existing code. Basically, the attributes-check for folders is a numerical test, and when a folder is found, you *need* to test for '.' and '..' navigation (fake) folders. Also, the 'While' loop changes into a 'Do-Until' loop. Additionally, the first _FileFindExFirstFile() call returns a file, whereas FileFindFirstFile() doesn't (which never made sense to me). To convert times into a readable format, you'll need to pass the array to the _FileFindExTimeConvert() function. Optionally, you can get the _WinTimeFunctions UDF and call those functions using array index constants: $FFX_CREATION_TIME, $FFX_LAST_ACCESS_TIME, or $FFX_LAST_MODIFIED_TIME. Note all _FileFindEx* calls are done using a special array, though 'ByRef' for quicker performance. A nice application I found for this UDF was comparing files/folders - which is pretty easy using 64-bit filetime and file-size comparisons (no need for time conversion there). The ZIP includes 4 files: the _FileFindEx UDF, FileFindExTest, the license agreement (same as below), and _LinkedOutputDisplay. Please note that _LinkedOutputDisplay on its own is a mess - but its included as-is to help see a side-by-side comparison of the output from FileFindExTest. To get all the same information that _FileFindEx provides, the AutoIt functions below would need to be called: FileFindFirst/NextFileFileGetAttrib *** NOTE: This Fails to report on some attributes (Reparse Points, Sparse Files) ***FileGetTime *3 (one for each time - Creation, Last-Access, Last-Modified)FileGetSizeFileGetShortName (note: this provides a full path, rather than just a file name)Please note that for a fair time comparison, a clean boot is needed for each test due to O/S buffering after a scan. Between boots, the order of function calls in 'FileFindExTest' would need to be swapped. In first-run tests, _FileFindEx has consistently been quicker when gathering more than basic filename info. However, running the UDF in 64-bit mode on Vista+ O/S's results in slower performance, hence this note: *IMPORTANT* - Speed is severely affected on certain processors when the script is run in x64 mode. I therefore recommend running/compiling the code in both bit-modes beforehand to see what the speed difference is. On my machine I've found x86 is much faster, whereas x64 is much slower than AutoIt's search functions. Other's have so I'm guessing it must be how optimized the hardware architecture is at running x64 code. Update Log: Download the ZIP Here 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.