imacros stopped by pop-up messages (using java)

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
eduardoBellini
Posts: 5
Joined: Thu Sep 26, 2019 9:30 pm

imacros stopped by pop-up messages (using java)

Post by eduardoBellini » Thu Sep 26, 2019 9:48 pm

I am testing your product and I use java programming using "Jacob"
The website I use requires a username and password with which I have no problems. but if the web page sends a pop-up message like the session is over, everything stops until I manually click on the message. as I do to prevent the system from stopping before pop-up messages on the website, considering that I want to use java programming to handle imacros.

Thanks
chivracq
Posts: 8716
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: imacros stopped by pop-up messages (using java)

Post by chivracq » Fri Sep 27, 2019 12:49 am

eduardoBellini wrote:
Thu Sep 26, 2019 9:48 pm
I am testing your product and I use java programming using "Jacob"
The website I use requires a username and password with which I have no problems. but if the web page sends a pop-up message like the session is over, everything stops until I manually click on the message. as I do to prevent the system from stopping before pop-up messages on the website, considering that I want to use java programming to handle imacros.

Thanks

Yeah, but "testing your product", you need the 'Scripting Interface' if you want to control iMacros from 'Java', which is not included in the 'Trial' Version for iMB (v12.5), and hum, you don't even mention in which Browser you are "testing"...
=> (F)CIM...! :mrgreen: (Read my Sig...)

You would get the Behaviour you describe in pure '.iim' already, I'm not "convinced" your Thread belongs to the 'SI&CLI' Sub-Forum, @TechSup will see your Thread and will be able to move it (to the 'General' Sub-Forum probably) if needed... :wink:

When you get that Popup, can you record stg with iMacros...? (You might need to start the Recorder and to wait a while until you get that Popup if it's Modal...)

Check the Command Reference, you have several Commands to handle Dialogs (=> 'ONDIALOG', 'ONERRORDIALOG', etc...)...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
eduardoBellini
Posts: 5
Joined: Thu Sep 26, 2019 9:30 pm

Re: imacros stopped by pop-up messages (using java)

Post by eduardoBellini » Fri Sep 27, 2019 11:00 pm

I am using "iMacros 12.5" 30 days trial emulating IE11
netbeans utility
programming in java to call imacos using jacob library in windows 10 64 bits.
The website I open with imacros from java requires an open session to be used. If that session closes the web page, it displays a pop-up message that stops imacros until I manually close that pop-up window and so the execution of imacros and the java code continues.
I would like to know how to prevent that from happening and to continue running the script normally.
before the last windows update the popup window closed by itself.

I cannot and do not know how to execute commands for dialog handling because the system is stopped until I close the window that opened from the web.

consider that I should do it from a java command line of the type ....

ActiveXComponent iim = new ActiveXComponent("imacros");
iim.invoke("iimInit");
// call iimPlay()
iim.invoke("iimPlay",code:............
chivracq
Posts: 8716
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: imacros stopped by pop-up messages (using java)

Post by chivracq » Fri Sep 27, 2019 11:23 pm

eduardoBellini wrote:
Fri Sep 27, 2019 11:00 pm
I am using "iMacros 12.5" 30 days trial emulating IE11
netbeans utility
programming in java to call imacos using jacob library in windows 10 64 bits.
The website I open with imacros from java requires an open session to be used. If that session closes the web page, it displays a pop-up message that stops imacros until I manually close that pop-up window and so the execution of imacros and the java code continues.
I would like to know how to prevent that from happening and to continue running the script normally.
before the last windows update the popup window closed by itself.

I cannot and do not know how to execute commands for dialog handling because the system is stopped until I close the window that opened from the web.

consider that I should do it from a java command line of the type ....

Code: Select all

        ActiveXComponent iim = new ActiveXComponent("imacros"); 
        iim.invoke("iimInit"); 
        // call iimPlay() 
        iim.invoke("iimPlay",code:............

=> FCI:
iMB v12.5 'Trial' + IE11, Win10_x64.

OK, I understand the "Scenario", but forget about Java (for the moment), your iMacros Script (the '.iim' part) must already (be able to) handle that Popup if it comes up...

I already asked in my previous Reply, are you able to record "stg" if you click that Popup away? => Stg like...:

Code: Select all

ONDIALOG POS=1 BUTTON=OK CONTENT=
And this is the most "common" Case, but in one of my Scripts, for one specific Site, a similar "Session not active anymore" Popup needs to be dismissed using the following Line:

Code: Select all

TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:BoxAlertBtnOk
But in both Cases, iMacros should be able to record the "correct" Line and Syntax needed...

And in the 2nd Case, which happens as soon as I try to load some URL from that Site while already being on it, I also need to log in again before retrying to load that URL... and my Script looks like:

Code: Select all

SET !ERRORIGNORE YES
URL GOTO={{URL_Page1}}
SET !TIMEOUT_STEP 0

' Login:
'******
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:BoxAlertBtnOk
'>
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:logf ATTR=ID:login CONTENT=xxx
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:logf ATTR=NAME:pwd CONTENT=yyy
TAG POS=1 TYPE=INPUT:IMAGE FORM=NAME:logf ATTR=NAME:Enter&&SRC:{{URL_Site}}/interface/ok_on.png

URL GOTO={{URL_Page1}}
The Login part is most of the time not needed, but if I get logged out, then it is there, and my Script relogs me in automatically itself...
Last edited by chivracq on Fri Sep 27, 2019 11:47 pm, edited 2 times in total.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
eduardoBellini
Posts: 5
Joined: Thu Sep 26, 2019 9:30 pm

Re: imacros stopped by pop-up messages (using java)

Post by eduardoBellini » Fri Sep 27, 2019 11:32 pm

I do not understand .....

Can you record "stg" if you click on that popup window? => Stg as ...:

when the java line is executed (sent to imacros) if the session has ended the pop-up window appears and imacros does not respond (as if it had lost focus) and remains stopped until you manually click on the window to close it.
if that does not happen the system remains stopped.

sorry for my bad english my lannguaje is spanish.
chivracq
Posts: 8716
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: imacros stopped by pop-up messages (using java)

Post by chivracq » Fri Sep 27, 2019 11:43 pm

eduardoBellini wrote:
Fri Sep 27, 2019 11:32 pm
I do not understand .....

Can you record "stg" if you click on that popup window? => Stg as ...:

when the java line is executed (sent to imacros) if the session has ended the pop-up window appears and imacros does not respond (as if it had lost focus) and remains stopped until you manually click on the window to close it.
if that does not happen the system remains stopped.

sorry for my bad english my lannguaje is spanish.

Oh...!, I've edited my previous Post in the time that you posted your Reply...

"stg" = "something"

>>>

Yeah, I was a bit "confused" by your Post/Topic when I had to approve it, because your Username sounded Spanish or Italian, I thought, while you had a Russian IP, which "luckily" was "clean"... (Most Users registering to the Forum and trying to post with a Russian IP are nearly always "fake" or Spammers...) :wink:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
eduardoBellini
Posts: 5
Joined: Thu Sep 26, 2019 9:30 pm

Re: imacros stopped by pop-up messages (using java)

Post by eduardoBellini » Sat Sep 28, 2019 12:47 am

Sorry, my IP address is now the usual one, I use a web proxy to play with a friend in Europe that requires creating a tunnel so that my computer can participate in the LAN.

Answering your question, once the pop-up window is open I cannot execute any command or java or imacros. frozen until you manually click to close the window.
after that the imacros function is restored and the control is returned to java to receive the following command
chivracq
Posts: 8716
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: imacros stopped by pop-up messages (using java)

Post by chivracq » Sat Sep 28, 2019 2:35 am

eduardoBellini wrote:
Sat Sep 28, 2019 12:47 am
Sorry, my IP address is now the usual one, I use a web proxy to play with a friend in Europe that requires creating a tunnel so that my computer can participate in the LAN.

Answering your question, once the pop-up window is open I cannot execute any command or java or imacros. frozen until you manually click to close the window.
after that the imacros function is restored and the control is returned to java to receive the following command

Yeah, but I said, forget bout Java for the moment, your Script must first work in pure '.iim' before you can think about porting it to Java or any other Prog Language.
You need to "manually"/deliberately trigger that Popup, to see if you can start the iMacros Recorder at that moment, and if the Popup doesn't allow you to start the Recorder, you then must first start the Recorder, record a few Actions, and then wait (with the Recorder still running) until the Popup will come out. The "Purpose" is to manage to record or see if iMacros records stg when you click it away with the Mouse.

>>>

Yeah, about your IP, that's "nearly strange", I checked again about 1h ago, and it was "still" listed as a "real" IP (from a Russian Provider), while now, 1h later, it is indeed listed as a Proxy IP, ugh...!? I guess you got a bit "lucky" yesterday, and that the DB I use for the Check on VPN/Proxy just got updated... But OK, never mind... You managed to register and to post... :|
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
eduardoBellini
Posts: 5
Joined: Thu Sep 26, 2019 9:30 pm

Re: imacros stopped by pop-up messages (using java)

Post by eduardoBellini » Sat Sep 28, 2019 11:35 am

I tell you that I use imacros as an alternative to managing web pages.
and I simply send commands from java as Goto url or I extract information, I do not use complex scripts, they are simply lines that I send from java as a command line, and as I mentioned the pop-up messages from the website that inform that it has finished Sessions block imacros and I can't do anything, it's like the message window takes the "focus" and until you close that it's all stopped, I've tried to configure the dialog handle commands but I'm very new to imacros.
I thought it might be a setup problem in imacros, something that can be customized since if you add a script in imacros it can contain several lines, from java I can only send one line.
or maybe something linked to windows since before the last update pop-up windows also appeared but closed immediately.
I've been complicated with this for days and I can't solve it.
chivracq
Posts: 8716
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: imacros stopped by pop-up messages (using java)

Post by chivracq » Sat Sep 28, 2019 10:43 pm

eduardoBellini wrote:
Sat Sep 28, 2019 11:35 am
I tell you that I use imacros as an alternative to managing web pages.
and I simply send commands from java as Goto url or I extract information, I do not use complex scripts, they are simply lines that I send from java as a command line, and as I mentioned the pop-up messages from the website that inform that it has finished Sessions block imacros and I can't do anything, it's like the message window takes the "focus" and until you close that it's all stopped, I've tried to configure the dialog handle commands but I'm very new to imacros.
I thought it might be a setup problem in imacros, something that can be customized since if you add a script in imacros it can contain several lines, from java I can only send one line.
or maybe something linked to windows since before the last update pop-up windows also appeared but closed immediately.
I've been complicated with this for days and I can't solve it.

Yeah but I asked you several times 2 Qt's that you never answered clearly, I can't help you any further if you don't answer my 2 Qt's, as you didn't provide any Screenshot, so I still don't have any Idea of what "Kind" of Popup you are talking about, and I guess your Site needs a L&P, and you didn't provide the URL anyway, so I can't do any Testing for you, then sorry, I can't help you from the Info I have and if you don't answer my Qt's... :oops:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Tom, Tech Support
Posts: 3526
Joined: Mon May 31, 2010 4:59 pm

Re: imacros stopped by pop-up messages (using java)

Post by Tom, Tech Support » Mon Sep 30, 2019 2:21 pm

Hi eduardo,

It would be helpful if you can upload a screenshot of what the pop-up looks like to this forum thread. Depending on the type of pop-up that it is, a simple ONDIALOG command may be sufficient to handle it as chivracq had already suggested. But in order for iMacros to be able to handle the pop-up, a macro must already be running and the ONDIALOG command must appear *before* any command that causes the pop-up to appear.
eduardoBellini wrote:
Sat Sep 28, 2019 11:35 am
I thought it might be a setup problem in imacros, something that can be customized since if you add a script in imacros it can contain several lines, from java I can only send one line.
This is not true. You can play a macro with multiple lines from your Java code by separating each line with a newline character.

If you create or edit a multi-line macro using the iMacros Editor and then select Export - Scripting Interface - Javascript from the main menu, you will see an example of how this is done in Javascript. I am sure you are a competent enough Java programmer to be able to do the same in Java.
Regards,

Tom, iMacros Support
Post Reply