Concat error

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Merlino

Concat error

Post by Merlino » Fri Jun 06, 2003 5:54 pm

Hi.
I'm trying to reconstruct a database archive internet site, using macro scheduler but this macro doesn't concatenate the name with auxiliar variable i to save the page with an a sequential name (ex. napoli27.htm, napoli28.htm etc.etc.)
Can you help me ?
This is the script
**********************************
Let>VAREXPLICIT=0
Let>i=27
Label>Start
If i=100,Fine
SetFocus>http://www3.autorita.energia.it/cgi-bin/ricerca_clienti*
Wait>1
Press Tab
Wait>1
Press Tab
Wait>1
Press Enter
WaitWindowOpen>http://www3.autorita.energia.it/cgi-bin/ricerca_clienti*
WaitReady>0
Wait>20
Press Alt
Send Character/Text>f
Release Alt
Send Character/Text>v
Let>nome=Napoli
Concat>nome,i
Send Character/Text>nome
Press Enter
Let>i=i+1
Goto>Start
Label>Fine
*************************************

Thank you

Merlino

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Jun 06, 2003 10:02 pm

You didn't describe the problem, but I found two things.

1. Some extra spaces at end of the lines. These may have been from my copy/paste, and may not be in the original, but you should check to make sure. Use Edit, Show All Chars to review, and/or Edit, Remove Trailing Spaces to remove them if you have a newer version of Macro Scheduler.

2. There is an error on line 4, that causes a loop to run continuously.

Change From:

Label>Start
If i=100,Fine
SetFocus>http://www3.autorita.energia.it/cgi-bin/ricerca_clienti*
Change To:

Label>Start
If>i=100,Fine
SetFocus>http://www3.autorita.energia.it/cgi-bin/ricerca_clienti*
Add the > after If. Be sure to remove all space characters.

===================
Hope this helps............

Merlino

Concat Error

Post by Merlino » Sat Jun 07, 2003 7:12 am

Sorry.
The problem is this.
With this script I would save many htm pages, everyone with his name (example: pagename1.htm;pagename2.htm) including a counter at the end of the name.
Can you help me?
Thank you

Merlino

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Jun 07, 2003 9:49 pm

From your example:
WaitWindowOpen>http://www3.autorita.energia.it/cgi-bin/ricerca_clienti*
WaitReady>0
Wait>20
Press Alt
Send Character/Text>f
Release Alt
Send Character/Text>v
Let>nome=Napoli
Concat>nome,i
Send Character/Text>nome
In the section above you are send ALT-FV, but I don't know what that will do, it depends on the browser you are using..

In Netscape, you would send ALT-FS to "Save As" a file. ALT-FV does a Print Preview.

In MSIE, you would send ALT-FA to "Save As" a file. ALT-FV does a Print Preview.

At a glance, it looks like the rest of the script is correct. You are just using the wrong ALT-F key.
You could also could add a line like the following:
WaitWindowOpen>Save*
before doing
Send Character/Text>nome
Press Enter
The WaitWindowOpen name will depend on your browser.
=========================
Hope this helps..........good luck,
Bob

Lumumba

Post by Lumumba » Sun Jun 08, 2003 7:54 pm

Based on the naming for variables used in the code, as well as the URL used, I guess the browser uses an italian language setting. Therefore the shortcuts could be different to the one we use (UK or US) :idea:

Assumed the URL is complete (regardles the asterix) ...
SetFocus>http://www3.autorita.energia.it/cgi-bin/ricerca_clienti*
Wait>1
Press Tab
Wait>1
Press Tab
Therefore this link would have the focus:
"Torna alla pagina iniziale"
Press Enter
This page opens ...
http://www3.autorita.energia.it/index_idonei.htm

Cause your script waits for
there's no matching window title ...

another slight change

Code: Select all

Let>nome=Napoli 
Concat>nome,%i%
Send Character/Text>%nome%
But as Bob already said, you realy don't point out the issue !

Guest

concat error

Post by Guest » Wed Jul 30, 2003 10:00 am

I had a script with very strange behavior, like % in values of variables that should not have them and input windows that appeared or reappeared when they should not. (v6 & v7)

It seems that under XP SR1, all patches applied, the following simple script does not work in v7. XP starts to behave strangely, have to reboot.

concat>t,rec
mdl>t
concat>t,-
mdl>t

the first mdl outputs something like rec%%
before the second, MS and XP hangs

I have modified my script by just using cancat with variables i.e
// concat>t,.
Let>DOT=.
concat>t,DOT

Is it 'just my Windows'?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts