
saywell
Active Members-
Posts
376 -
Joined
-
Last visited
Everything posted by saywell
-
Delete an empty line in a file with _FileWriteToLine
saywell replied to himago03's topic in AutoIt General Help and Support
Thank, Melba. I see the logic. Perhaps File Edit Line would have covered both. Or a File Delete Line function separately? I'll look at the array read/write method. Regards, William -
Delete an empty line in a file with _FileWriteToLine
saywell replied to himago03's topic in AutoIt General Help and Support
Hi, M23 I've just returned to AutoIt scripting after several years' absence. I need to delete a number of lines from the middle section of a text file, thus keeping the first few lines and the last few lines. Has your function seen the light of day yet, as it seems to have the option to do just what I need? Regards, William -
Smtp Mailer That Supports Html And Attachments.
saywell replied to Jos's topic in AutoIt Example Scripts
Thanks Jos - That works as intended from the scripting point of view. Reply-to address added correctly. Sadly gmail's servers ignore the reply-to address when sending automatic responses [anti-spam]. But at least a manual reply works to that address, so still some benefit. William -
Smtp Mailer That Supports Html And Attachments.
saywell replied to Jos's topic in AutoIt Example Scripts
Is there any way to add a reply-to address? My users send photos via a shared gmail account, but I'd like to set up an auto-response in my email account to automagically send a 'received' message to the sender's own email account. Thanks, William -
Answered in wiki.
-
_FileGetProperty - Retrieves the properties of a file
saywell replied to BrewManNH's topic in AutoIt Example Scripts
This seems to work for tif and jpeg files [change the extension in 2 places to switch between file types for this demo] William #Include <Array.au3> #include <File.au3> #Include <String.au3> Global $sInImage= FileOpenDialog ("Test File","C:\Documents and Settings\Owner\Desktop\SBACC Comp nov2013\possibles","All(*.*)") Global $Testfile = StringReplace ($sInImage,".tif",".txt") RunWait (@ScriptDir&'\i_view32.exe "'& $sInImage & '" /info="'&$Testfile&'"','') $file= FileOpen($Testfile) $text = FileRead($file) FileClose($file) $adimensions = _StringBetween($text,"Image dimensions =","Pixels") $aHtWid = StringSplit ($adimensions[0]," x ",1) $wid = StringStripWS($aHtWid[1],8) $ht = StringStripWS($aHtWid[2],8) MsgBox (0,"Wid x Ht", $wid&"x"&$ht) FileDelete ($Testfile) exit -
_FileGetProperty - Retrieves the properties of a file
saywell replied to BrewManNH's topic in AutoIt Example Scripts
Thanks, BrewManNH. Looks like the info is inaccessible for scripting, then. I'll look into getting it from the irfanview command line - though a bit messier as this will only write the data to a file, as far as I can make out. But it should be easy to read it back into autoit. Regards, William -
_FileGetProperty - Retrieves the properties of a file
saywell replied to BrewManNH's topic in AutoIt Example Scripts
Mouseover shows dimensions, but this isn't listed in the array. Nor in the file properties shown in irfanview - though the width and height are shown in the EXIF data. If I right click on the file in explorer ==> properties ==> Summary tab, the width and height are listed there. Is there any way to retrieve the dimensions - which would be just as easy to work with? Regards, William -
_FileGetProperty - Retrieves the properties of a file
saywell replied to BrewManNH's topic in AutoIt Example Scripts
I get a msgbox with null entry. the array shows the property names in Col zero, but only some of the values in col 1. The dates are all there, the camera model is shown, and the total pixels, but nothing in height or width . If I mouseover the file in windows explorer, it displays them without a problem. William -
_FileGetProperty - Retrieves the properties of a file
saywell replied to BrewManNH's topic in AutoIt Example Scripts
I've had a problem with image files. With tif and jpeg files the following code shows a null field for the dimensions. Is it my error, a bug, or what? Running XP SP3 William Global $Testfile= FileOpenDialog ("Test File","C:\Documents and Settings\Owner\Desktop\SBACC Comp nov2013\possibles","All(*.*)") Global $sProperties = _FileGetProperty ($Testfile,"width",300) MsgBox (0,"width", $sProperties) Global $aProperties = _FileGetProperty ($Testfile,"",300) _ArrayDisplay ($aProperties) -
Is there any way this udf could be adapted to get a list of emails from a gmail account - to and from addresses and subject line would be good even if full content impractical? William
-
StringSplit / StringTrimRight......?
saywell replied to telmob's topic in AutoIt General Help and Support
What about using _PathSplit ? William -
_FileListToArray And FileFindNextFile
saywell replied to 4Bravo's topic in AutoIt General Help and Support
Look at Melba23's - it's great, and will do what you want. William -
Compile without compression possible?
saywell replied to caleb41610's topic in AutoIt General Help and Support
Yes -
For some reason neither pasting nor url create button will work [XP, Chrome]. Google 'get size unformatted drive' and the first hit is a thread here with some possibilities. William
-
Thanks. I copied the registry entry from my previous PC, and it works fine now. William
-
OP doesn't want to do that, though. $run=0 While 1 call ("First") $run += 1 If $run = 5 then call ("one-in-five") $run = 0 endif wend William
-
I've just installed Autoit, Scite etc on a new work PC. All seemed Ok until I tried to compile using the right-click menu. When I choose 'compile with options' i get this error message. Presumable there's a setting somewhere that needs changing or adding. Any suggestions, anyone? Regards, William
-
Or use _FileReadToArray and step through the array checking for those that end in .php. Stringright would be useful here. You can then write the matching ones to your new file. William
-
"Manipulating" powershell or command prompt
saywell replied to kestrel's topic in AutoIt General Help and Support
It would also be handy for Sharepoint automation [and manipulating SP from an autoit script]. William -
Try _DateToDayValue to get numerical value for the day subtract 1 to get num value for the day before then _DayValueToDate to get gregorian date for that day. Or perhaps _DateAdd with a negative difference. William
-
Count number of files in folder..?
saywell replied to LarsBNygaard's topic in AutoIt General Help and Support
If you can't find it in the help file [look in User Defined Function Reference -> File management] It's in the web help at http://www.autoitscript.com/autoit3/docs/libfunctions/_FileListToArray.htm William -
Melba23 does a great message box variation. Look in his signature. William
-
Have you forgotten the file extension in the first bit? FileCopy("Y:pdf" & $FileList[$i]&".pdf" , "Y:pdfnew" & $aFile[35] & ".pdf", 9) William
-
Rotate mouse movement by 90 degrees
saywell replied to leuce's topic in AutoIt General Help and Support
It would be handy for me. I use a biggish 16:10 for working in photoshop. It's mechanically easy to rotate from landscape to portrait, but my graphics card software is rather obtuse, and so i rarely make the switch. In this case, text wouldn't matter, as not used [apart from keyboard shortcuts in PS, which wouldn't be affected] but mouse/tablet cursor movement would. If no one here comes up with a good solution, I might make this a project... William