Copy and Paste not working on all Sites?

Discussions and Tech Support specific to the iMacros Firefox add-on.
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
AWallxD
Posts: 5
Joined: Wed Aug 23, 2017 5:46 pm

Copy and Paste not working on all Sites?

Post by AWallxD » Fri Aug 25, 2017 6:48 pm

Hey Guys!

Last Time I made a Javascript wich wasnt working and now I made anotherone for Facebook and its like the same Problem!
On twitter.com it couldnt paste the Username and on Facebook it couldnt paste the email... Maybe someone can fix it (maybe both, but Facebook is more important :))

Twitter:

Code: Select all

iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=button ATTR=class:UIWalkthrough-skip<sp>js-close');var PROMPT1 = prompt('Please enter Accounts Password!')

for(var EMAILLOOP = 1; 1 <= EMAILLOOP; EMAILLOOP++)
{
//Namelist
var load;
load = 'CODE; ';
load += 'SET !DATASOURCE C:\\Users\\Username\\Documents\\iMacros\\Datasources\\Names.txt' + '\n';
load += 'SET !DATASOURCE_COLUMNS 1' + '\n';
iimSet('emailloop', EMAILLOOP);
load +='!SET !DATASOURCE_LINE {{emailloop}}' + '\n';
load += 'ADD !EXTRACT {{!COL1}}' + '\n';
iimPlay(load)
var Name= iimGetLastExtract(1);

//Email copy
iimPlay('CODE:'+'SET !TIMEOUT_PAGE 100'+'\nTab open'+'\nTab t=2'+'\nURL GOTO=https://www.mohmal.com/en');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=a ATTR=id:rand');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=div ATTR=class:email EXTRACT=TXT');
var mail= iimGetLastExtract(1)

//twitter register
iimPlay('CODE:'+'SET !TIMEOUT_PAGE 100'+'\nTab open'+'\nTab t=2'+'\nURL GOTO=https://twitter.com/signup');

//fill in data + full register
iimSet('Name',Name)
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=input ATTR=id:full-name CONTENT={{content1}}');
iimSet('mail',mail)
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=input ATTR=id:email CONTENT={{mail}}');
iimSet('prompt1',PROMPT1)
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=input ATTR=id:password CONTENT={{prompt1}}');
iimPlay('CODE:'+'wait seconds=4');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=input ATTR=id:submit_button');
iimPlay('CODE:'+'wait seconds=4');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=a ATTR=class:skip-link');
iimPlay('CODE:'+'wait seconds=10');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=input ATTR=id:username CONTENT={{content1}}');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=div ATTR=class:StartCongratulations-buttons');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=button ATTR=type:button');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=a ATTR=class:js-nav<sp>js-skip-step');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=input ATTR=type:checkbox');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=button ATTR=type:button');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=a ATTR=id:user-dropdown-toggle');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=button ATTR=class:dropdown-link');

//confirm account
iimPlay('CODE:'+'SET !TIMEOUT_PAGE 100'+'\nTab open'+'\nTab t=2'+'\nURL GOTO=https://www.mohmal.com/de/view');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=a ATTR=href:#');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=a ATTR=class:button');
iimPlay('CODE:'+'tab t=1');
iimPlay('CODE:'+'tab closeallothers');

//new email
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=a ATTR=id:delete');
}
Facebook:

Code: Select all

for(var LOOP = 1; 1 <= LOOP; LOOP++)
{
iimPlay('CODE:'+'SET !TIMEOUT_PAGE 100'+'\nURL GOTO=https://twed.com/giveaway/');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=div ATTR=class:fb_login');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=a ATTR=id:reg-link');
iimPlay('CODE:'+'wait seconds=1');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=a ATTR=class:_42ft<sp>_4jy0<sp>_4jy6<sp>_4jy2<sp>selected<sp>_51sy');
iimPlay('CODE:'+'wait seconds=1');

var CONTENT10 = 'name'
iimSet('content10',CONTENT10)
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=input ATTR=id:u_0_7 CONTENT={{content10}}');

var CONTENT11 = 'name'
iimSet('content11',CONTENT11)
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=input ATTR=id:u_0_9 CONTENT={{content11}}');

iimPlay('CODE:'+'SET !TIMEOUT_PAGE 15'+'\nTab open'+'\nTab t=2'+'\nURL GOTO=https://www.mohmal.com/en');
iimPlay('CODE:'+'wait seconds=1');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=a ATTR=id:rand');
iimPlay('CODE:'+'wait seconds=1');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=div ATTR=class:email EXTRACT=TXT');
var CONTENT12= iimGetLastExtract(1);

iimPlay('CODE:'+'TAB CLOSE')
iimPlay('CODE:'+'wait seconds=1');

iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=input ATTR=id:u_0_c CONTENT={{CONTENT12}}');
iimPlay('CODE:'+'wait seconds=1');
var CONTENT13 = 'PW'
iimSet('content13',CONTENT13)
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=input ATTR=id:u_0_j CONTENT={{content13}}');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=input ATTR=id:u_0_5');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=button ATTR=id:u_0_p');
}
FCI: Windows 10, Firefox (latest Version),VERSION BUILD=9030808, imacros free Version
almodoen
Posts: 11
Joined: Tue Sep 05, 2017 9:26 pm

Re: Copy and Paste not working on all Sites?

Post by almodoen » Wed Sep 06, 2017 12:33 am

hi AWallxD , i see many errors in your script , firstly face book changing IDs of elements dynamically , so you can't rely on IDS for Facebook and you are using dinamic class "_42ft<sp>_4jy0<sp>_4jy6<sp>_4jy2<sp>selected<sp>_51sy" , dynamic means it's not const class it change every time you refresh your page ..


you code:

iimPlay('CODE:'+'SET !TIMEOUT_PAGE 15'+'\nTab open'+'\nTab t=2'+'\nURL GOTO=https://www.mohmal.com/en');
iimPlay('CODE:'+'wait seconds=1');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=a ATTR=id:rand');
iimPlay('CODE:'+'wait seconds=1');
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=div ATTR=class:email EXTRACT=TXT');

Code: Select all

change it:
var CONTENT12= iimGetLastExtract(1);
to
var CONTENT12= iimGetLastExtract();
iimPlay('CODE:'+'TAB CLOSE')
iimPlay('CODE:'+'wait seconds=1');

you have to add this code:

Code: Select all

iimSet('CONTENT12',CONTENT12);
iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=input ATTR=id:u_0_c CONTENT={{CONTENT12}}');


i can make the script for you but i don't have the time sadly , you have to learn more ..
AWallxD
Posts: 5
Joined: Wed Aug 23, 2017 5:46 pm

Re: Copy and Paste not working on all Sites?

Post by AWallxD » Wed Sep 06, 2017 11:28 am

almodoen wrote:hi AWallxD , i see many errors in your script , firstly face book changing IDs of elements dynamically , so you can't rely on IDS for Facebook and you are using dinamic class "_42ft<sp>_4jy0<sp>_4jy6<sp>_4jy2<sp>selected<sp>_51sy" , dynamic means it's not const class it change every time you refresh your page ..
So its not possible to autofill the email?
But I tested something before:
I just changed Content13 to "mail@mail.com" and then it worked for me. I think its a other problem...
Post Reply