Can someone help with this script? (js)

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
Avarixzen
Posts: 1
Joined: Tue Oct 31, 2017 11:53 pm

Can someone help with this script? (js)

Post by Avarixzen » Wed Nov 01, 2017 12:04 am

I've never used these forums before, sorry if this is in the wrong location or only problems are allowed to be posted!

iMacros: VERSION BUILD=9030808
Browser: FIREFOX 55.0.3 (32-Bit)
OS: Windows 10

I don't know if that info is needed, but there it is.

My code:

Code: Select all

while(true){
var macro;
macro ="CODE:";
macro +="TAG POS=1 TYPE=* ATTR=TXT:*This<SP>username<SP>is<SP>already<SP>in<SP>use.* ";

var ret=null;
ret=iimPlay(macro);
if(ret>0)
{
ret = iimPlay("Name")
}
else
{
}
}
Okay, so I barely know Java! And I'm completely lost on what is actually going on in this code, all I know is that it works. So why am I posting?

Well here is what the script currently does: Each loop it checks for "This username is already in use" and if it finds that, it runs my "Name" macro which is perfect. But I need it to have an or like this:

if "This username is already in use" OR "This username is not appropriate"

Help maybe? :oops: :shock: :roll:
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Can someone help with this script? (js)

Post by chivracq » Wed Nov 01, 2017 2:37 am

Avarixzen wrote:I've never used these forums before, sorry if this is in the wrong location or only problems are allowed to be posted!

Code: Select all

 iMacros:    VERSION BUILD=9030808
Browser:    FIREFOX 55.0.3 (32-Bit)
        OS:     Windows 10
I don't know if that info is needed, but there it is.

My code:

Code: Select all

while(true){
var macro;
macro ="CODE:";
macro +="TAG POS=1 TYPE=* ATTR=TXT:*This<SP>username<SP>is<SP>already<SP>in<SP>use.* ";

var ret=null;
ret=iimPlay(macro);
if(ret>0)
{
ret = iimPlay("Name")
}
else
{
}
}
Okay, so I barely know Java! And I'm completely lost on what is actually going on in this code, all I know is that it works. So why am I posting?

Well here is what the script currently does: Each loop it checks for "This username is already in use" and if it finds that, it runs my "Name" macro which is perfect. But I need it to have an or like this:

if "This username is already in use" OR "This username is not appropriate"

Help maybe? :oops: :shock: :roll:
- Sub-Forum is perfect, as Threads related to using a '.js' Script belong indeed to the 'iMacros for FF' Sub-Forum... :D
- FCI mentioned: => Perfect...! :D
- But...!, grrr...!!!, the Thread Title is a bit useless (= non-Descriptive): => I don't read..., sorry... :oops: Try searching the Forum for an Answer in similar Threads with "Can someone help with this script? (js)" as Search Keywords... => Well, good luck...! :idea:
=> Give a Descriptive Title to your Thread about its real Content and your real Qt/Pb for me to read..., unless you expect a "Dunno, maybe...!?" Answer to your Qt... :idea:
(You can always edit all your (previous) Posts...)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply