iimSet Syntax?

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

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.

iimSet Syntax?

by viking on Sun Jan 28, 2018 5:27 pm

I must be getting old.... :shock:
What is wrong with this trivial JavaScript for Firefox:
Code: Select all
var x = 1;
var y = 99;
iimSet("y", x);
alert(x);
alert(y);

y is not set to 1 by iimSet() - it is still = 99.

Firefox v52.3
iMacros v8.9.7
viking
 
Posts: 208
Joined: Sun Mar 16, 2008 12:22 am

Re: iimSet Syntax?

by chivracq on Sun Jan 28, 2018 6:04 pm

viking wrote:I must be getting old.... :shock:
What is wrong with this trivial JavaScript for Firefox:
Code: Select all
var x = 1;
var y = 99;
iimSet("y", x);
alert(x);
alert(y);

y is not set to 1 by iimSet() - it is still = 99.

Code: Select all
Firefox v52.3
iMacros v8.9.7

Nice to see you (back) on the Forum... :wink:

But yep, normal, nearly funny actually, oops...! :wink:
'iimSet()' is for setting Values to Vars for inside your "next" on-the-fly '.iim' Macro...
=> a "PROMPT {{y}}" in that '.iim' Macro will then display your expected "1"... :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6687
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iimSet Syntax?

by viking on Sun Jan 28, 2018 7:21 pm

chivracq wrote:'iimSet()' is for setting Values to Vars for inside your "next" on-the-fly '.iim' Macro...
=> a "PROMPT {{y}}" in that '.iim' Macro will then display your expected "1"... :idea:

Yes, of course :oops: .
Thanks for reminding me!
I haven't written a java-script for quite some time. My memory isn't what it used to be... :(
viking
 
Posts: 208
Joined: Sun Mar 16, 2008 12:22 am

Re: iimSet Syntax?

by chivracq on Sun Jan 28, 2018 7:45 pm

viking wrote:
chivracq wrote:'iimSet()' is for setting Values to Vars for inside your "next" on-the-fly '.iim' Macro...
=> a "PROMPT {{y}}" in that '.iim' Macro will then display your expected "1"... :idea:

Yes, of course :oops: .
Thanks for reminding me!
I haven't written a java-script for quite some time. My memory isn't what it used to be... :(

Oh well..., I've actually never written any single '.js' Script myself as I only use '.iim' Scripts, ah-ah...! :shock:

Good "luck" with your current/next Script and dare to "shout" again if you encounter any further "memory loss", ah-ah...! :wink:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6687
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iimSet Syntax?

by techimac on Sat Feb 17, 2018 12:21 pm

var x = 1;
var y = 99;
alert("x " + x);
alert("y " + y);

var Macro = "";
Macro += "CODE:" + "\n";
Macro += "PROMPT NEW<sp>y<sp>{{Y}}" + "\n";

iimSet("y", x);
iimPlay(Macro );
techimac
 
Posts: 207
Joined: Fri Feb 20, 2015 2:27 pm


Return to iMacros for Firefox

Who is online

Users browsing this forum: Google [Bot] and 12 guests

-->