How to create a variable from one to four positions?

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++.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

How to create a variable from one to four positions?

by topmktwww on Thu Nov 17, 2016 5:08 am

Hello folks, have a great day.

I need help to finish my command line, for example,

TAG POS=1 TYPE=BUTTON ATTR=TXT:Accepted<SP>XXXX

where XXXX are ramdom numbers from 0000 to 9999 instead to create a 9999 command line, I would like to know if is possible to put a variable there and the list will run until the list is cleaned,

thank you all


Robson
My Best Regards / Saludos / Atenciosamente

Robson G. Barros

Pale Moon = 26.5.0 x86 (I have just Changed)
Windows 7 SP1 US Language Version
Imacros = 8.8.7.1-signed
topmktwww
 
Posts: 11
Joined: Thu Nov 17, 2016 5:04 am

Re: How to create a variable from one to four positions?

by iimfun on Fri Nov 18, 2016 12:52 am

You can use this code, for example
Code: Select all
SET counter EVAL("('000' + ({{!LOOP}} - 1)).match(/\\d{4}$/);")
TAG POS=1 TYPE=BUTTON ATTR=TXT:Accepted<SP>{{counter}}

Play it in loop mode. (Current: 1, Max: 10000)
iimfun
 
Posts: 201
Joined: Tue Jul 19, 2016 6:06 am

Re: How to create a variable from one to four positions?

by topmktwww on Fri Nov 18, 2016 9:35 am

iimfun wrote:You can use this code, for example
Code: Select all
SET counter EVAL("('000' + ({{!LOOP}} - 1)).match(/\\d{4}$/);")
TAG POS=1 TYPE=BUTTON ATTR=TXT:Accepted<SP>{{counter}}

Play it in loop mode. (Current: 1, Max: 10000)


Thank you I ahve tested and I see a odd behavior,
looks like is freezed and is not running,

I will keep testing.
My Best Regards / Saludos / Atenciosamente

Robson G. Barros

Pale Moon = 26.5.0 x86 (I have just Changed)
Windows 7 SP1 US Language Version
Imacros = 8.8.7.1-signed
topmktwww
 
Posts: 11
Joined: Thu Nov 17, 2016 5:04 am


Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: Majestic-12 [Bot] and 2 guests

Website Monitoring