Jump to content

WorknMan

Active Members
  • Posts

    39
  • Joined

  • Last visited

Everything posted by WorknMan

  1. Tried the newest verison here, and got: Line 460 $objNodeList = $objDoc.documentElement.selectNodes($strXPath) Error: Error in expresison. What does this mean? These kinds of errors used to happen randomly with the old version, then it stopped working altogether a few days ago. Which is why I tried the new one.
  2. Hey guys, I've done some searching but can't find a solution for this. I am having a problem with one of my scripts dying. Specifically, this: I did not write this UDF, and I have no idea how to fix it, or how to test for this condition. It dies with this error about once out of every 100 times I run it, so it's very hard to debug. And worse yet, I use this script to feed data to me remotely, so it's very annoying to have this happen when I'm not at home. What I'm wondering is if it's possible to 'catch' this error and have the script exit gracefully? Ideally I'd like to just have the script rerun itself, since it almost always finishes successfully on the second attempt. But at the very least, I'd like to have the script shut down gracefully.
  3. Hey guys, Forgive me... I haven't read all 38 pages of this thread to see if this is covered; I am using this wrapper as part of an RSS reader app. It is working great, except that at least once a week, I get the following error: Line 451 $objNodeList = $objDoc.documentElement.SelectNodes($strXPath) $objNodeList = ^ERROR Error: Error in expression Anyone know what this is, and/or if there's a way to exit the script gracefully if this error can't be avoided... I am not an AutoIt expert
  4. Hey, that toast solution works great. Thanks for pointing it out
  5. Thanks guys, I'll have a peek
  6. Hi all, We recently upgraded from Windows XP to Windows 7 at work, and I noticed that none of my AutoIt scripts that were using TrayTip would display their balloon notifications. After trying to resolve this on my own without any success, I finally escalated it to our IT dept, who let me know that there's a 'global' policy in place that disables balloon tips on ALL machines, and cannot be undone So I'm wondering if there are any workarounds for this? Maybe an alternate way to display a balloon notification that doesn't use the standard API? A lot of my scripts are 'background' processes that need to display status notifications and other info to the user from time to time, without throwing a message box in their face. One idea was to use a tooltip, but that only works when you hover your mouse over the tray icon.
  7. Hmmm, I'm getting a message from multiple browsers that the download failed/was interrupted. Also, is this like an AutoIt UDF to interface with jira, or a proprietary app?
  8. Don't know if you will see this since it is about 6 months later, but I'm actually interested in this. I don't see any download links though?
  9. Well, I kind of figured as such, but was wondering where to get the UDF I thought it might be a part of the AutoItObject UDF, but don't see any reference to it in the documentation or the code.
  10. Ok, I got a lot of info to sift through here, but I have a question for trancexx, or anyone who knows I see this line in your code: Global $oMyList = LinkedList() What is that LinkedList() function?
  11. I'm wondering if it's possible to set up data types in AutoIt that are a little more complex than arrays, but not really as complex as full-blown objects either. I know there's an OOP UDF floating around, but I'm not exactly sure how it works. Basically, if I've got a $person array that's set up like this: $person[0] = 'Jane' ;first name $person[1] = 'Doe' ;last name $person[2] = 23 ;age $person[3] = 'F' ;gender ; and so on ... return $person I'd like to be able to set this up as something like: $person.firstname $person.lastname $person.age .... The reason I ask is because I've got a script using an array with 15+ elements, and it gets a bit difficult to try and remember what is $array[11] when I see it in code. Plus, if I ever need to change the order of the elements, that is a huge pain in the arse when it's being passed around from function to function.
  12. Sweet, that's going to save me some time Thanks!
  13. Just wondering if there is a function to convert a date like Fri, 4 Feb 2011 15:23:19 to the following format: YYYYMMDDHHMMSS Reason why I'm asking is because I have an array of these dates that I'm pulling from RSS feeds, and I need to sort the array from earliest date to latest. Or maybe there's another, more elegant way to go about this?
  14. Actually, I can't get TrayTip to work at all in Win7. Just as a test, I copied and pasted the example code right out of the help file: TrayTip("I'm a title", "I'm the message", 5, 1) MsgBox(4096,"", "Press OK to see another tip.") TrayTip("clears any tray tip","",0) TrayTip("", "A different tray tip.", 5) Sleep(5000) It works fine on an XP machine, but only displays the message box on Win7. I even went to taskbar properties and told it to show icon and notifications. Perhaps there is a setting in Win7 that disables balloon tips globally? I saw this: http://www.recipester.org/Recipe:Disable_or_Enable_Balloon_Tips_in_Windows_7_39291042 Tried adding 'EnableBalloonTips' and setting its value to 1, but still nothing?
  15. FYI: Answering my own post. I just downloaded wget and run that when I need to fetch a file. If you don't mind the DOS window popping up, it works fine
  16. I was wondering the same thing. Anybody got a better work around than the registry hack? I was able to get this to work once, but now it throws an error in line 316 of ie.au3: $o_object.navigate($s_Url) Note: I'm actually trying to download a protected file using Inetget, but figured I'd try it this way, since the other way wasn't working because of IE's new security setting.
  17. ARRRRGGGHHHH!!! I'm about to tear my hair out trying to figure this out. Got some simple code: If FileExists("U:\") Then MsgBox(0, "Test", "File does exist!") Else MsgBox(0, "Test", "File does NOT exist!") EndIf If I run the script by double clicking on it, it sees the drive. If I run the script from an external app, it doesn't. In this case, the external app is TheBat (email program - I'm launching the app as part of a mail rule.) If I change the network drive to a local drive, it works both ways. I just can't launch it externally when the network drive is specified? Any ideas???
  18. Actually, it's: #include "include\file_name.au3" But close enough, thanks
  19. I'm writing a script that will have several include files. I want to put these in a subdirectory of the main script directory called 'include', and then include them like so: #include @scriptdir & "\include\file_name.au3" This way, if I ever move the script around, I don't have to go back in and manually change the path. However, I am getting the 'cannot parse include' message. Is it not possible to use @Scriptdir (or even variables) with #include?
  20. I'm sure this has probably been brought up before, but I'm not sure what keywords to use to search for it, so ... Sometimes, my AutoIt scripts will execute all of their code, and instead of terminating, they just keep running. There's one script in particular I have running every couple of minutes that does a few things, writes to a log file, and then exits. Well, it's supposed to exit anyway I just checked my task monitor and there was like 20 copies of it autoit3.exe running... it's writing to the log file, which is the very last line of code in the script. I tried putting in 'Exit' explicitly, but that didn't work either. So, I'm wondering if there's some reason why a script would hang out in memory after it's finished doing its thing? EDIT: I forgot to mention that I've had this happen on 2 machines - one running WinXP and the other running Windows 7 x64.
  21. Specifically, I want to write a script that will move any apps/windows running on the secondary monitor over to the primary.
  22. I ended up using the following code, which is working with > 99% success rate, with none of the 'sticky key' problems I was having before: Func _GetTextFromActiveWindow() ;Get window title, in case we need it $window_title = WinGetTitle("[active]") if $window_title == "" Then SoundPlay(@WindowsDir & "\media\Windows XP Error.wav",1) Exit EndIf WinActivate($window_title) ClipPut("") ;Clear the clipboard, so we can check for data when we write to it $readtext = "" ;We'll put new clipboard data in this variable For $i = 1 to 8 Step 1 $rand = random (1, 4, 1) Send ("{CTRLDOWN}") ;Try various methods until we get text on the clipboard Switch $rand Case 1 Send("{INS}") Case 2 ControlSend($window_title, "", "", "{INS}") Case 3 Send("c") Case 4 ControlSend($window_title, "", "", "c^") EndSwitch Send ("{CTRLUP}") $readtext = ClipGet() ;Any text on the clipboard? If $readtext <> "" Then return $readtext EndIf If $i = 4 Then WinActivate($window_title) Sleep(100) EndIf Next return $readtext EndFunc
  23. Ok, this isn't working out quite as well as I had hoped, because although the accuracy has improved, now if I'm typing in text, it's putting me into insert mode sometimes You said it might be worth adding something in your hotkey function to wait untill the hotkey has been released otherwise it might effect the Send'. Can you elaborate on this? I use Autohotkey for all of my global hotkeys, and one of them inparticular calls an AutoIt script, which actually sends the CTRL+Insert/CTRL+C key to the active window, and then does other stuff.
  24. Tried using CTRL+insert and it's working about a 99% success rate now. Thanks for tip
  25. So I've written an AutoIt script that is fired by a global hotkey, with the purpose being to copy some selected text from the active window and then do some stuff with it. The way I am attempting to do this is to have AutoIt send CTRL+C to the active window where text is selected, but this has been problematic; sometimes it works, and sometimes it doesn't. Here is my code: ;Get window title, in case we need it $window_title = WinGetTitle("[active]") ClipPut("") ;Clear the clipboard, so we can check for data when we write to it $readtext = "" ;We'll put new clipboard data in this variable ;For $i = 15 to 1 Step -1 ;Next Send("^c") ;Send CTRL+C to the active window $readtext = ClipGet() ;Any text on the clipboard? If $readtext <> "" Then return $readtext EndIf ;Try alernate method to get clipboard text ControlSend($window_title, "", "", "^c") If $readtext <> "" Then return $readtext EndIf The rate at which this is successful usually depends on the application I'm trying it with. With some apps (such as Firefox), it works most of the time. With other apps (such as IE8 and Metapad), it fails more often than it succeeds. Sometimes, if I try again right after a failed attempt (twice in a row), it'll work without me having to switch windows or anything. And sometimes, it'll just send a 'c' to the active window instead of CTRL+C. Anyway, I'm trying to increase the rate at which this succeeds. Do you guys have any ideas?
×
×
  • Create New...