Jump to content

Parrot

Members
  • Posts

    9
  • Joined

  • Last visited

Parrot's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Why would you want to do something like that with an automatic program?
  2. That seems to be a problem for me. I've just tried saving the images using inetget, but that doesn't seem to work. I believe the cause is that the website doesn't give me a direct link to the image, but rather the link is to a script which serves the image. So apparently that option's out. Does anybody have any other ideas? Or does anybody know what it would take to make the last two lines of my script work the way I want them to?
  3. You mean pseudo code. That doesn't seem to be the case though. I have yet to see an example of pseudo code in the help file. And Szhlopp has demonstrated that the code works, but it needs to be declared first. I'm not sure why they didn't mention that in the help file. The help file does seem to have a few shortcomings. Perhaps the community here should be asking for a better one, or perhaps banding together to create a more comprehensive document. Where did you learn the ins and outs of arrays in AutoIt, BTW? Are there alternative help documents available or did you have to learn from people who already knew the system?
  4. I'm not sure I understand, how was it meant to be taken?? Okay, that code works. Now I'm wondering where exactly it explains how to do this in the help files. Could you direct me to the proper location?
  5. It seems strange, but the instructions given in the help files for how to use arrays don't work. I try putting the following into a script: $Array[0]="A" And it gives me the following error message: Expected a "=" operator in assignment statement.: What's going on here?
  6. Forgive me if I've missed something obvious here, I'm new to AutoIt and figuring out the IE Management is taking a lot of trial and error. Basically, I'm trying to get this script to log into my comics.com account and save an image to my hard drive. The problem I'm running into now is that the image isn't listed as either a .gif or .jpg - instead it's fed by a script listed as something like "archiveViewer?stripId=254232" Usually it's a .gif file, but once in a while it's a .jpg - and I want to make sure I download each file with the proper extension. I don't think I can do that properly using InetGet, but if I'm wrong about that let me know. Explorer's "Save As" function seems to know the proper file type for saving the image, so I thought I'd try to use that and have the script just enter the proper save path minus the file extension. Unfortunately, that doesn't seem to work, the "Save As" dialog opens up, but nothing gets typed in. I'm guessing that there's something about the IE Management scripts that forbids direct entry like that, am I right? In any case, this is what the script looks like right now. Does anybody have any suggestions? #include <IE.au3> $oIE = _IECreate ("https://members.comics.com/members/registration/showLogin.do") _IELoadWait ($oIE) $oForm = _IEFormGetObjByName ($oIE, "userForm") $oEmail = _IEFormElementGetObjByName ($oForm, "email") $oPass = _IEFormElementGetObjByName ($oForm, "password") _IEFormElementSetValue ($oEmail, "myemail") _IEFormElementSetValue ($oPass, "mypassword") $oSubmit = _IEGetObjByName ($oIE, "sign in") _IEAction ($oSubmit, "click") _IELoadWait ($oIE) _IENavigate ($oIE, "http://members.comics.com/members/extra/archive/firstStripInMonth.do?comicId=901&yyyymm=190001&comic=cowandboy") $sHTML = _IEDocReadHTML ($oIE) $oImgs = _IEImgGetCollection ($oIE) $oLinks = _IELinkGetCollection ($oIE) $newlink = "NONE" For $oLink In $oLinks If StringInStr($oLink.href, "?date=") Then $newlink = $oLink.href EndIf Next $newimage = "NONE" For $oImg In $oImgs If StringInStr($oImg.src, "archiveViewer") Then $newimage = $oImg.src EndIf Next _IENavigate ($oIE, $newimage) _IELoadWait ($oIE) _IEAction ($oIE, "saveas") WinWaitActive("Save Picture") Send("D:\allpics\comics\CowAndBoy\1")
  7. What do you mean by "on the control" I'm not sure exactly how these examples could work for anybody. Perhaps I'm missing something. I see a list of functions and some examples how to use them... but no real explanation of how to do what I want done. I'm looking through the functions for something to help me browse to a website and possibly collect or download information off of it.... I come across _IEBodyReadText, but it seems to be just for inserting HTML code into a blank page. I've looked through a few of the others, but none of them seem to bear any relation to what I want. Usually when I read a programming manual there's some explanation of how to do different things, instead of just a list of functions that I'm supposed to hunt through. I guess I'll browse through them a little bit more, see if I can figure it out.
  8. Okay, I've got the part about the co-ordinates. My question now is what is the basis for the ControlClick coordinates, and why are they different from any mouse coordinate system used? Also, I'm looking at IE management in the help file... I'm a little lost. Is there somewhere I can get more than just a list of functions? The help file doesn't explain how to use it very well.
  9. Hello. I'm new to AutoIt and I'm trying to mess around so as to understand the basics and the syntax. I decided to start out by making a program that would open up a firefox window and log into my comics.com account for me. This is what I've got: Run("C:\Program Files\Mozilla Firefox\firefox.exe") WinWaitActive("Mozilla Firefox Start Page - Mozilla Firefox") Opt("MouseCoordMode", 2) MouseClick("left", 320, 40, 1) Send("www.comics.com{ENTER}") WinWait("Comics.com Home Page - Mozilla Firefox") MouseClick("left", 180, 180, 1) WinWait("Comics Extra - Mozilla Firefox") MouseClick("left", 700, 370, 1) I'm using the AutoIt v3 Window Info application in order to determine the mouse position for clicking on the buttons and areas. I took the co-ordinates from the Control tab, looking at the "ControlClick Coords" parameter. I gather that this parameter gives me the coordinates in terms of the user area for the current window, which suits me fine because it means that it won't matter where the window opens up. So I set the MouseCoordMode to 2. That worked fine for the first mouse click, but for the second mouse click something seems to have gone wrong. Instead of clicking on position 180, 180 - the Windo Info tool tells me that it's actually clicking on position 180, 95 What went wrong here?
×
×
  • Create New...