Jump to content

saywell

Active Members
  • Posts

    376
  • Joined

  • Last visited

Everything posted by saywell

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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)
  10. 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
  11. What about using _PathSplit ? William
  12. Look at Melba23's - it's great, and will do what you want. William
  13. 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
  14. Thanks. I copied the registry entry from my previous PC, and it works fine now. William
  15. 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
  16. 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
  17. 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
  18. It would also be handy for Sharepoint automation [and manipulating SP from an autoit script]. William
  19. 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
  20. 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
  21. Melba23 does a great message box variation. Look in his signature. William
  22. Have you forgotten the file extension in the first bit? FileCopy("Y:pdf" & $FileList[$i]&".pdf" , "Y:pdfnew" & $aFile[35] & ".pdf", 9) William
  23. 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
×
×
  • Create New...