1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

iMacros click on popup dialog box OK button

Discussion in 'Other Scripting Languages' started by Scorpion Ghost, Feb 11, 2016.

  1. Scorpion Ghost

    Scorpion Ghost Senior Member

    Joined:
    Mar 22, 2013
    Messages:
    1,026
    Likes Received:
    218
    Occupation:
    Internet!
    Location:
    On the Interwebz
    Home Page:
    So I've had an iMacro for about a year now working fine.

    The iMacro has the following line in it:

    Code:
    ONDIALOG POS=1 BUTTON=OK CONTENT=
    That's because after the tab 2 closes, a dialog popup box appears and the "OK" button needs to be clicked. However, for some reason since a few days now this stopped working. I think the popup box somehow changed.

    Here is how the box looks:

    http://oi66.tinypic.com/4jpz74.jpg

    (sorry for link, can't upload photo or embed photo here - both give errors - I have no idea why)

    I need to be able to click this, because otherwise I can't continue doing what I need to do.

    Can anyone help with this?
     
  2. ChanzGrande

    ChanzGrande Elite Member

    Joined:
    Feb 16, 2008
    Messages:
    2,484
    Likes Received:
    1,172
    Occupation:
    Accountant
    Location:
    Northern Woods Counting Money
    This can be an easy fix actually. Here is what I recommend. Run the macro up until the point in time that it should click the OK button, and stop it before it gets to that part. Now what you want to do is start recording a macro by hitting the record button in iMacros. Then click the button. Stop the recording, and it will save it as "default.iim." You can then edit that file and see what the code was for the click on the OK button and then adjust yours.

    You may need to change the recording mode sometimes and/or try it with multiple different settings, however - I've never really found a task that couldn't be automated with iMacros somehow, so it's mostly about finding the correct tag information or using the alternate recording modes to capture something that can re-create this click.

    Generally ... it's a real simple change to the button that causes a macro to break like this, so you also could parse the HTML code using firefox web developers tools "inspector" and see if you can identify what is different about the button. They probably changed its container name, or moved it outside a div, or something like that, so you just need a new correct way to identify it for imacros and it will do it. Worst case scenario use iMacros image validation tool, and take a picture of the button ... that generally makes it very easy for imacros to click it since it knows exactly what the button looks like. You do need the actual iMacros to use the Image Validation tool.

    I find the image validation tool to be a real last ditch approach in resolving this, and I really think you'll solve this easily enough if you just record your own macro from the point of failure. Good luck!
     
    Last edited: Feb 12, 2016
  3. Scorpion Ghost

    Scorpion Ghost Senior Member

    Joined:
    Mar 22, 2013
    Messages:
    1,026
    Likes Received:
    218
    Occupation:
    Internet!
    Location:
    On the Interwebz
    Home Page:
    Hey man, thanks for the reply.

    Well, see, I'm using the Firefox iMacro add-on. I think you're talking about the standalone iMacro application, right? I have that program, but I need this to work on the Firefox iMacros...

    I tried recording with the various options, but whenever I click the button, the iMacro simply records nothing...

    I'll try to take a look with inspect element to see if I can figure something out.

    If anyone has an idea about this, please share.
     
  4. Scorpion Ghost

    Scorpion Ghost Senior Member

    Joined:
    Mar 22, 2013
    Messages:
    1,026
    Likes Received:
    218
    Occupation:
    Internet!
    Location:
    On the Interwebz
    Home Page:
    I still didn't manage to figure this out.

    Can anyone help?
     
  5. Scorpion Ghost

    Scorpion Ghost Senior Member

    Joined:
    Mar 22, 2013
    Messages:
    1,026
    Likes Received:
    218
    Occupation:
    Internet!
    Location:
    On the Interwebz
    Home Page:
    So I asked about this on the iMacros forum. My post has to be approved. Let's see if it will be. I have no idea how strict they are. Let's see whether or not they'll restrict my free speech.. :D

    So come on, a lot of guys on this forum know iMacros. Help me figure this one out.
     
  6. Asif WILSON Khan

    Asif WILSON Khan Executive VIP Jr. VIP

    Joined:
    Nov 10, 2012
    Messages:
    11,478
    Likes Received:
    32,425
    Gender:
    Male
    Occupation:
    Fun Lovin' Criminal
    Location:
    London
    Home Page:
    Have you tried re-installing it, something may have become corrupted, has happened to me before. Also if you installed any new addons, disable them in case you have a conflict.

    https://addons.mozilla.org/en-US/firefox/addon/imacros-for-firefox/

    Alternatively try the Chrome or IE Versions (bottom of page).

    http://imacros.net/download
     
  7. Scorpion Ghost

    Scorpion Ghost Senior Member

    Joined:
    Mar 22, 2013
    Messages:
    1,026
    Likes Received:
    218
    Occupation:
    Internet!
    Location:
    On the Interwebz
    Home Page:
    I tried the first advice, and I didn't install any new addons or nothing. Didn't work.

    I need it to work on Firefox though.

    I also tried another advice you gave about a year ago, with noscript/yesscript addons to hopefully have that box not appear by disabling Javascript using those add-ons. Didn't work.

    I'm not sure where to look next. Either an iMacro can click that button, or somehow to make a code with Greasemonkey to press the enter every 10 seconds for example, or some other way?

    I asked on the iMacros forum and got nothing. I asked here, hopefully I'll get some help. I'll also ask on thebot.net also to see if anyone over there can help.

    Thanks
     
  8. Scorpion Ghost

    Scorpion Ghost Senior Member

    Joined:
    Mar 22, 2013
    Messages:
    1,026
    Likes Received:
    218
    Occupation:
    Internet!
    Location:
    On the Interwebz
    Home Page:
    If someone can help me I'll pay you $2 via Paypal.

    I know, it's not a lot. Hopefully it gives an incentive to someone who can help me deal with this.

    Reply here or send me a message.
     
    Last edited: Feb 18, 2016
  9. Asif WILSON Khan

    Asif WILSON Khan Executive VIP Jr. VIP

    Joined:
    Nov 10, 2012
    Messages:
    11,478
    Likes Received:
    32,425
    Gender:
    Male
    Occupation:
    Fun Lovin' Criminal
    Location:
    London
    Home Page:
  10. schulze123

    schulze123 BANNED BANNED

    Joined:
    Jan 2, 2016
    Messages:
    6
    Likes Received:
    16
    ONDIALOG POS=1 BUTTON=OK CONTENT=
    TAG POS=1 TYPE=A ATTR=ONCLICK:VisitThisPage(*);&&HREF:javascript:void(0);
    TAB T=2
    WAIT SECONDS={{!VAR2}}
    TAB T=1
    TAB CLOSEALLOTHERS
    WAIT SECONDS={{!VAR1}}
     
    • Thanks Thanks x 1
  11. Scorpion Ghost

    Scorpion Ghost Senior Member

    Joined:
    Mar 22, 2013
    Messages:
    1,026
    Likes Received:
    218
    Occupation:
    Internet!
    Location:
    On the Interwebz
    Home Page:
    Hey thanks,

    I looked at those links. I don't think the 1st one has anything to do with what I need. The second and third links you posted do, but the third one doesn't work in firefox, and I need a solution which works for Firefox. And the second link, that's what I used in my code when I originally made it. But I got lucky back then and the code simply worked. But now it doesn't anymore.

    Here is my script:

    Code:
    URL GOTO=http://www.likesasap.com/website.php
    WAIT SECONDS={{!VAR1}}
    TAG POS=1 TYPE=INPUT:BUTTON ATTR=*
    TAB T=2
    WAIT SECONDS={{!VAR3}}
    TAB T=1
    ONDIALOG POS=2 BUTTON=OK CONTENT=
    WAIT SECONDS={{!VAR2}}
    TAG POS=1 TYPE=INPUT:BUTTON ATTR=*
    TAB T=2
    WAIT SECONDS={{!VAR3}}
    TAB T=1
    ONDIALOG POS=1 BUTTON=OK CONTENT=
    WAIT SECONDS={{!VAR2}}
    TAG POS=1 TYPE=INPUT:BUTTON ATTR=*
    TAB T=2
    WAIT SECONDS={{!VAR3}}
    TAB T=1
    ONDIALOG POS=1 BUTTON=OK CONTENT=
    TAB CLOSEALLOTHERS
    WAIT SECONDS={{!VAR2}}
    The page I need it to work for is this one: http://www.likesasap.com/website.php

    However, you need an account to be able to get to that page. I have a throwaway account for LikesASAP, so if anyone is willing to look into it, I can give you the credentials to login here or through a personal message.
     
  12. Scorpion Ghost

    Scorpion Ghost Senior Member

    Joined:
    Mar 22, 2013
    Messages:
    1,026
    Likes Received:
    218
    Occupation:
    Internet!
    Location:
    On the Interwebz
    Home Page:
    Hey, thanks for that.

    So I made the script like this:

    Code:
    TAG POS=1 TYPE=INPUT:BUTTON ATTR=*
    TAB T=2
    WAIT SECONDS={{!VAR3}}
    TAB T=1
    ONDIALOG POS=1 BUTTON=OK CONTENT=
    TAG POS=1 TYPE=A ATTR=ONCLICK:VisitThisPage(*);&&HREF:javascript:void(0);
    TAB T=2
    WAIT SECONDS={{!VAR2}}
    TAB T=1
    TAB CLOSEALLOTHERS
    WAIT SECONDS={{!VAR1}} 
    
    And the code you gave me basically sort of clicks, or tries to click, that OK button. But the popup remains there still. But if I click the popup OK button manually, the popup closes and I get the points.

    Maybe some revision to that code will do the trick?
     
  13. Asif WILSON Khan

    Asif WILSON Khan Executive VIP Jr. VIP

    Joined:
    Nov 10, 2012
    Messages:
    11,478
    Likes Received:
    32,425
    Gender:
    Male
    Occupation:
    Fun Lovin' Criminal
    Location:
    London
    Home Page:
    Try this:

    Code:
    SET !ERRORIGNORE YES
    SET !LOADCHECK NO
    SET !REPLAYSPEED FAST
    SET !TIMEOUT 13
    SET !TIMEOUT_PAGE 8
    SET !TIMEOUT_STEP 6
    TAB T=1
    URL GOTO=http://www.likesasap.com/website.php
    ONDIALOG POS=1 BUTTON=OK CONTENT=
    TAB T=1
    TAG POS=1 TYPE=INPUT:BUTTON ATTR=*
    TAB T=1
    WAIT SECONDS=25
    TAB T=1
    ONDIALOG POS=1 BUTTON=OK CONTENT=
    TAB T=1
    TAG POS=1 TYPE=INPUT:BUTTON ATTR=*
    TAB T=1
    WAIT SECONDS=25
    ONDIALOG POS=1 BUTTON=OK CONTENT=
    TAB T=1
    TAG POS=1 TYPE=INPUT:BUTTON ATTR=*
    TAB T=1
    WAIT SECONDS=25
    TAB T=1
    ONDIALOG POS=1 BUTTON=OK CONTENT=
    TAB T=1
    TAG POS=1 TYPE=INPUT:BUTTON ATTR=*
    TAB T=1
    WAIT SECONDS=25
    TAB T=1
    ONDIALOG POS=1 BUTTON=OK CONTENT=
    TAB T=1
    TAG POS=1 TYPE=INPUT:BUTTON ATTR=*
    TAB T=1
    WAIT SECONDS=25
    TAB T=1
    ONDIALOG POS=1 BUTTON=OK CONTENT=
    TAB T=1

    It was the first result that looked similar to your script:
    http://lmgtfy.com/?q=URL+GOTO=http://www.likesasap.com/website.php+WAIT+SECONDS={{!VAR1}}
     
    • Thanks Thanks x 1
  14. Scorpion Ghost

    Scorpion Ghost Senior Member

    Joined:
    Mar 22, 2013
    Messages:
    1,026
    Likes Received:
    218
    Occupation:
    Internet!
    Location:
    On the Interwebz
    Home Page:
    Damn. That worked :)

    And damn, do I feel stupid :(


    Funny thing is I googled for a Likesasap site hits iMacro, and tried 2 of them, but they were not working. You Googled smarter, and got it.


    Okay. Now I know you don't make a lot of money Asif, the struggling internet marketer. So how about I send you the $2 bucks I promised you? :D


    Thanks a lot man. This was really annoying the shit out of me. Good job. 5 stars. Highly recommended. Outstanding experience :p
     
  15. Asif WILSON Khan

    Asif WILSON Khan Executive VIP Jr. VIP

    Joined:
    Nov 10, 2012
    Messages:
    11,478
    Likes Received:
    32,425
    Gender:
    Male
    Occupation:
    Fun Lovin' Criminal
    Location:
    London
    Home Page:


    Money not required Mate, glad I could help.
     
    • Thanks Thanks x 1