Jump to content

trunc.ate

Active Members
  • Posts

    40
  • Joined

  • Last visited

trunc.ate's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks, that did the trick! Since there's only one element of it I could catch it with $search = _XMLGetValue ("//Search")
  2. To specify that: I'm doing a $search = _XMLGetValue ("Settings/Search") To output $search I have two choices, both fail: MsgBox(4096, "test", $search) outputs -1 (which means failure), probably because _XMLGetValue is supposed to return an array. MsgBox(4096, "test", $search[1]) outputs the error "Subscript used with non-Array variable"
  3. I tested this script posted in this thread earlier (can't quote for whatever reason). I just added #Include <_XMLDomWrapper.au3> #include <array.au3> above the code and left the rest as provided. Of course I created that books.xml first. Whatever, all I get is the error What am I doing wrong?
  4. Brilliant, works like a charm. Thanks guys!
  5. But when I get this right, _ReplaceStringInFile can't especially write the first line if it doesn't know what's in it at first?
  6. I'd like to do a search and replace in a text file dependent on what's in the first line of this file. This works nicely with FileReadLine($SourceFile, 1). But at the end of the operation I want to update the first line of the text file. FileWriteLine works different as it only appends a line at the end of the file; is there a way to write the first line?
  7. Hi, I am trying to find a specific (varying) line in a text file and delete it. Here I found a script that deletes blank lines which I thought would be easy to adapt for that purpose. But I am struggling with special characters; the line I want to delete looks like this: user_pref("sessionsaver.static.default.session0", "session0 1127 844 -4 -4 111111 0 1 z1 |0 |0,0| http://www.heise.de/newsticker 1");So I thought I test for StringLeft($line, 48) which is the static part of the line. But AutoIt gives me errors ("could not parse") even when doubling the double quotes as mentioned in the FAQ. How can I handle this string?
  8. Never mind, I found that some of the files were write protected while others were locked. As for the write protected ones I guess this can be handled by FileSetAttrib.
  9. Sorry to bring this topic up again but I just switched to the new v3.0.102 and found that this script to to delete all files in a directory but not the directoy itself doesn't work anymore. Have there been any changes to the File functions?
  10. w00T - thanks, you rock! Works like a charm, I now have it like this: $icon_real = "D:\progs\Firefox\firefox.exe" $icon_temp = "E:\Icons\Firefox-disabled.ico" $LNK = "C:\Dokumente und Einstellungen\<Username>\Anwendungsdaten\Microsoft\Internet Explorer\Quick Launch\Mozilla Firefox.lnk" FileCreateShortcut("",$LNK,"","","",$icon_temp) ...<backup launch code goes here>... FileCreateShortcut("",$LNK,"","","",$icon_real)
  11. Does anybody know how I can quickly update the icons of the Quicklaunch toolbar (beneath the START button) with AutoIt? Background: On system-startup I am running an automated backup of my Firefox-browser via AutoIt and the RunWait command (which fires the backup application). Firefox is represented with an icon in the quicklaunch toolbar. What I want to achieve is that the link and the icon are replaced by others to show me that the browser is currently not available so I don't click on it by accident. There are other ways to notify of that (MsgBox or whatever) but I'd like to try it this way. The icon/link-replacement works but the icon is still the old one (cached). The replacement *is* possible by letting AutoIt disabling and afterwards enabling the toolbar. Drawbacks are that this is sloooow and that the width of the toolbar is not remembered. Any idea of a quicker way?
  12. w00t! That's even better, works like a charm. Thanks!
  13. Thanks, but it's not ensuring the interaction to a specific window, it's really about me who gets easily distracted by other windows. So the goal is not functionality but beauty I just want that specific window on my desktop and all the others hidden.
  14. Is it possible to get a list of all currently active windows? I want to launch a program by script and to concentrate on that window I want to hide all other windows with the @SW_HIDE macro. When I close the new program I'd like to restore the other windows (@SW_RESTORE) as if nothing happend. Seems that everything I need is there but I'll need the window titles, therefore my question.
  15. Hi CyberSlug, cool Script. One remark concerning localized OS versions: When using Notepad, I have to adapt the value in the global variables section ($TEXT_EDITOR = "Notepad"). Note that in foreign Windows versions also the name of Notepad might have been changed (e.g. in the german version it's called "Editor"). That gets important a few lines below because there' a further check for the editor which uses the english term: If $TEXT_EDITOR = "Notepad" Then .... To get your script running, both values above have to be adapted. Maybe it would be a good idea to point that out somewhere in the code.
×
×
  • Create New...