Jump to content

Frescard

Members
  • Posts

    18
  • Joined

  • Last visited

Everything posted by Frescard

  1. I guess this thread would be the best place:
  2. This works great. Thank you so much! And I guess it would be a general replacement for the existing function? (As it seems to work fine in either admin or restricted user mode.)
  3. I'm not quite sure I understand... If I run the code as shown (with the #RequireAdmin disabled) it will work just fine. If I enable that code (and am then prompted for my admin password) it will not stop the process.
  4. If I run my script as a regular user, invoking the _ProcessSuspend library works just fine, but if I run the script as an admin (which I need for some other actions) it won't do anything. Any idea what might be going on there (or how to avoid this issue)? ;#RequireAdmin #include <Misc.au3> #include <_ProcessSuspend.au3> _ProcessSuspend("notepad.exe") While Not _IsPressed("20") ; space WEnd _ProcessResume("notepad.exe")
  5. A bit late here, but it seems like the StringReplace commands should be case-sensitive (otherwise you're translating lowercase "&eacute;" into uppercase "É").
  6. Thanks! That did it! Just for my understanding, does this mean the 64bit compiler cannot handle this library? (It ran fine on another 64bit machine -without this switch-, but it could be that the defaults there are set differently. I don't have access to it right now, so I can't verify.)
  7. Does this still work? I'm using the code from the post 2 above me, and am trying the default example (under Win10), but only get an error code... #Include "ZLIB.au3" ; Test _ZLIB_Compress And _ZLIB_Uncompress Dim $Original = BinaryFileRead(@AutoItExe) Dim $Compressed = _ZLIB_Compress($Original, 9) Dim $Decompressed = _ZLIB_Uncompress($Compressed) Dim $Result = 'Original Size: ' & BinaryLen($Original) & @CRLF $Result &= 'Compressed Size: ' & BinaryLen($Compressed) & @CRLF $Result &= 'Decompress Succeed: ' & ($Decompressed = $Original) MsgBox(0,'Deflate/Inflate Test', $Result) Exit Func BinaryFileRead($Path) Local $File = FileOpen($Path, 16) Local $Data = FileRead($File) FileClose($File) Return $Data EndFunc This comes up after Autoit tries to execute the _ZLIB_Compress function: !>14:11:15 AutoIt3.exe ended.rc:-1073741819
  8. Ohhh... I didn't realize labels (and their sizes) had such a profound effect! Good to know. And thanks for the quick replies!
  9. I've got a strange situation where, if I precede some radio buttons with a label, that I then cannot click them anymore (only the last one). I can select the active button via the cursor keys, though. Once I remove the label, everything works fine. Grouping them doesn't help. #include <GUIConstantsEx.au3> GUICreate("Checkboxes", 400,70) GUICtrlCreateLabel ("Click one:",20,23,300) ; if I remove this, everything works ;GuiCtrlCreateGroup("",100,10,280,35) ; no change if activated Dim $chk[3] $chk[0] = GUICtrlCreateRadio ("One", 120,20) $chk[1] = GUICtrlCreateRadio ("Two", 220,20) $chk[2] = GUICtrlCreateRadio ("Three",320,20) GUISetState() While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop WEnd
  10. Sorry for resurrecting this old topic, but my question is exactly the same, except I cannot use InetGet, as the images come from an authorized session (i.e. I have to login to the site first, to see those pictures). Can the image be saved directly from that collection somehow?
  11. Actually, it seems I just found a method. The problem was that both windows have the same title, and if I query them by that I always get the first one back. But if instead I use the handles that are returned by WinList, I do get the proper sizes and control texts! Unfortunately, these errors happen all the time, and if they do, I have to re-download the affected file — all of which I'm trying to do while I'm still in bed...
  12. A process I'm trying to automate creates a popup window that stays there for the whole duration, and if it runs into a problem, it creates a type of sub-window (sub-control?), beneath itself, that can be somewhat identified via AutoIt's Window Info, but I have been unable to read it from a script. The permanent window gives me this info: And the eventual error window gives me this: I am looking for the error message in [CLASS: Static; INSTANCE: 2], but whether I address it via this class specifier, or via the ID, I never get anything back. If I use the code below, to search through all windows with the "VBS3" title (which those two seem to have), I only get the little one at the top back (twice): $windows = WinList("VBS3") For $i=1 To $windows[0][0] $size = WinGetPos($windows[$i][0]) ConsoleWrite($windows[$i][0] & ": " & $size[2] & "/" & $size[3] & @CRLF) ; returns "VBS3: 245/81" twice Next
  13. I edited some colors through the SciteConfig tool, and would like to transfer those settings to a different PC (both running Win7). Where are those modified configuration files stored? I looked in the installation folder itself, in the AppData one, and in My Documents, but no luck...
  14. Looks like somebody else was struggling with the same issue I am right now: It's the same application I am trying to automate (JeppView — which is a commercial application, and I'm afraid they don't have a demo), and the method described *used* to work (at least for the 1st column), but not anymore. So, it definitely looks like they are using a custom(ized) control. That means we're out of luck, trying to access it? (The frustrating part is that *some* commands work. If none had any effect it would be much easier to just declare it impossible, but you get to some point, but then not any further...) I'll keep digging, to perhaps find some freeware app that uses the same kind of control, so that I (and perhaps others) might be able to better troubleshoot the issue.
  15. AU3Info reports the control as a SysTreeView32, and, as I mentioned, the other commands I tried ("GetItemCount" & "Select") work fine, so I'm pretty confident that I got hold of the correct control. I got a 64bit system, and the "Compile X64 version" option is checked in the compile menu. I also just updated to 3.3.8.1 (before I was still on 3.3.6.1), but that didn't help either. Another thing I tried was accessing it via the CLASS property (instead of the control ID), but still nothing... $text = ControlTreeView($title,"","[CLASS:SysTreeView32; INSTANCE:2]","GetText","#4")
  16. I used to have a script that was able to sucessfully read the data from a TreeView, but somehow this list was changed, and while I am still able to set the cursor on the desired line, and read the number of items in the list, executing "GetText" will always come back empty, and sets @error to 1: ; "GetItemCount" returns the correct count: $count = ControlTreeView($title,"",$treeID,"GetItemCount") ; "Select" activates the correct line ControlTreeView($title,"",$treeID,"Select","#4") ; But none of these variations return anything but an error $text = ControlTreeView($title,"",$treeID,"GetText") $text = ControlTreeView($title,"",$treeID,"GetText",4) $text = ControlTreeView($title,"",$treeID,"GetText",4,0) $text = ControlTreeView($title,"",$treeID,"GetText","") $text = ControlTreeView($title,"",$treeID,"GetText","#4") $text = ControlTreeView($title,"",$treeID,"GetText","#4","") Another thing that seems to be strange is that if I select line #2, which looks like it has sub-items, the "GetSubItemCount" command will return 0, and sets @error to 1.
  17. Since I seems to be having the same issue, I'm just continuing here, rather than starting a new one. I have the same issue with being unable to read a textbox (which seems to be of type FastFileEdit). I can read the button on the window, but not the textbox. Part of the issue might be that the title of the window is empty (but that's just a guess). The only method that finally worked for me (and might help others in a similar situation) was to copy the text into the clipboard, and to then read it from there. But that seems a bit clumsy, and I'm wondering if I'm overlooked some more "appropriate" method of retrieving the text. The application I'm trying to automate is EasyCHM (whose demo version is fully functional). The methods I tried (and their effect) are listed below, as well as a screenshot of the window in question, along with the data AutoIt's Window Info is retrieving: $txt = ControlGetText ("","","[CLASS:FastFileEdit; INSTANCE:1]") ConsoleWrite ("txt: " &amp; $txt &amp; @CRLF) ; returns nothing $txt = ControlGetText ("[CLASS:TFormCompileStatus]","","[CLASS:FastFileEdit; INSTANCE:1]") ConsoleWrite ("txt: " &amp; $txt &amp; @CRLF) ; returns nothing $txt = WinGetText ("[CLASS:TFormCompileStatus]") ConsoleWrite ("txt: " &amp; $txt &amp; @CRLF) ; returns &amp;Close WinActivate ("[CLASS:TFormCompileStatus]") ControlClick ("[CLASS:TFormCompileStatus]","","[CLASS:FastFileEdit; INSTANCE:1]") Send ("^A") Sleep (100) Send ("^C") $txt = _ClipBoard_GetData () ConsoleWrite ("txt: " &amp; $txt &amp; @CRLF) ; returns full content
  18. I was having problems too, using _FTP_ProgressUpload (it would always abort after a few MB, whereas _FTP_FilePut would work just fine), but I figured since I'm up to 3.3.6.1 that this fairly old thread would probably not apply anymore. BUT... once I pasted the code from into my FTPEx.au, all the problems went away! So — it might be a good idea to update the FTPEx.au package (I just saw that the last update was done on Apr 16, 2010), since without this fix that function is fairly useless (and it took me quite a few tries to actually find this relevant post).
×
×
  • Create New...