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++.
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
-
Co0oDe
- Posts: 12
- Joined: Tue Jul 21, 2015 4:17 pm
Post
by Co0oDe » Sat Aug 29, 2015 6:21 pm
OS: WINDOWS 10
iMacros: VERSION BUILD=8920312
Browser: Firefox 39.0
---------------------------------------
i was trying to convert imacros to javascript...
but i got that error
SyntaxError: missing ; before statement, line 1 (Error code: -991)
My Code
Code: Select all
macro += "SET !VAR3 EVAL("Math.floor(Math.random()*256 + 1);")" + "\n";
-
chivracq
- Posts: 9576
- Joined: Sat Apr 13, 2013 1:07 pm
- Location: Amsterdam (NL)
Post
by chivracq » Sun Aug 30, 2015 1:17 pm
Co0oDe wrote:OS: WINDOWS 10
iMacros: VERSION BUILD=8920312
Browser: Firefox 39.0
---------------------------------------
i was trying to convert imacros to javascript...
but i got that error
SyntaxError: missing ; before statement, line 1 (Error code: -991)
My Code
Code: Select all
macro += "SET !VAR3 EVAL("Math.floor(Math.random()*256 + 1);")" + "\n";
Yep, I think you need to (Single, Double, Triple...?) escape the Double Quotes within the 'EVAL()'...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
-
Co0oDe
- Posts: 12
- Joined: Tue Jul 21, 2015 4:17 pm
Post
by Co0oDe » Sun Aug 30, 2015 3:39 pm
Yep, I think you need to (Single, Double, Triple...?) escape the Double Quotes within the 'EVAL()'...
Yes you're right.
Correct Code:
Code: Select all
macro += "SET !VAR3 EVAL('Math.floor(Math.random()*256 + 1);')" + "\n";
-
chivracq
- Posts: 9576
- Joined: Sat Apr 13, 2013 1:07 pm
- Location: Amsterdam (NL)
Post
by chivracq » Sun Aug 30, 2015 3:44 pm
Co0oDe wrote:
Yep, I think you need to (Single, Double, Triple...?) escape the Double Quotes within the 'EVAL()'...
Yes you're right.
Correct Code:
Code: Select all
macro += "SET !VAR3 EVAL('Math.floor(Math.random()*256 + 1);')" + "\n";
Oh..., good...!, or replace them with Single Quotes indeed, which I find more "elegant"...!
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...