Jump to content

Redbeard

Active Members
  • Posts

    30
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Redbeard's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Sorry to revive an old topic, but this doesn't seem to work in Windows 10. Is there an alternative? Thanks
  2. Hello, I normally use AutoIt as a portable app but when I upgraded this time I used the installation. Now I've got this garbage cluttering up my context menu: "Compile with Options", "Compile Script (x64)", etc. Is there a built in way to disable or remove these menu items or do I have to dig through the registry? Thanks in advance
  3. I've wrote and compiled a script (just a short script that renames some files) and I noticed it's trying to access the internet. Is it looking for AutoIt updates or something? I'm using AutoIt 3, 3, 6, 1.
  4. From what I can see the verb in the registry is /e which I assume means Edit. Either way it should open with ShellExecute, yes? To add to the confusion, ShellExecuteWait opens the spreadsheet fine!
  5. No, if I were to enter C:\spreadsheet.xls in the windows Run dialog the spreadsheet opens fine. So the association seems to be working as it should.
  6. I'm having a very strange problem. If I run a command like:ShellExecute("C:\spreadsheet.xls") excel will open but not spreadsheet.xls. I can double click any excel file and it opens fine under any other circumstances, it's just shellexecute that has the problem. Any ideas why?
  7. Hey all, I've got an interesting issue here: @StartupCommonDir = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\" (as it should since I'm running Win7) but @StartupDir = "". I've checked my Environment Variables but there are no Startup items listed. Where does autoit read these variables from? Thanks for your help Redbeard
  8. Thanks Andreik, that's how I've been doing it but I thought _ReplaceStringInFile might be faster if I could get it to work. It's strange to me that _ReplaceStringInFile will find things line @TAB but not @LF, @CR or @CRLF. Anyway, it seems I will have to go back to doing it the way you suggested. Thanks for your help.
  9. Thanks for the post but I'm trying to search and replace, not count. I read my original post and it was misleading so I corrected it.
  10. Actually, I'm not trying to count lines, I'm trying to do an actual find/replace. The code I posted was just an example of how I can't get _ReplaceStringInFile to find line feeds. Sorry for the confusion.
  11. Hello, Is there any way to make _ReplaceStringInFile find line feeds? I want to find and replace certain lines in a text file that contain line feeds. I've tried searching for @LF, @CR and @CRLF but no luck. Example script: $A = _ReplaceStringInFile(@ScriptDir & "\text file.txt", @CR, @CR & "test") MsgBox(0,"",$A) This script always returns 0. Am I doing something wrong?
  12. Thanks for your help but we've got it figured out. As taz742 pointed out all I had to do was switch my @LF for @CRLF and it worked fine. Although, like I said, I could have sworn I tried that. Thanks again for the help.
  13. The code listed is for the first instance of the script. If I run the script again, via command line, to add more files to the batch then it uses the 1 Write Mode, adds the new files to the list and exits.
  14. Well, like I said it's just a temp file. I use it to batch convert video files, and since this is fairly resource intensive I don't want more than one version of the converter to run at a time. So, by using a temp file and deleting each line after use I can continue to add files, via command line, to the temp file while the converter is running. I suppose there isn't any extreme benefit to deleting the line but since it always reads the first line there is some minimal amount of time saved by not searching the file for the "next" line. Thanks for the input, though.
  15. The temp file is created only for this temp usage so I'm not worried about the lack of an extension, I've used it this was many times before. But, the @CRLF worked even though I would have sworn I had tried that. Thank you all for your help.
×
×
  • Create New...