Awhy won't this short javascript work?

J

Joe Jones

I have this one line typed into Notepad and saved it as vertical.js.

(new ActiveXObject(Shell.Application")).TileVeritcally()

It is supposed to tile my open windows vertically when I run it, but I get
this error instead:

Unterminated string constant
code 800A03F7
Line 1 Character 59 Compilation Error

Why won't it work?
 
J

Joona I Palaste

Joe Jones said:
I have this one line typed into Notepad and saved it as vertical.js.
(new ActiveXObject(Shell.Application")).TileVeritcally()
It is supposed to tile my open windows vertically when I run it, but I get
this error instead:
Unterminated string constant
code 800A03F7
Line 1 Character 59 Compilation Error
Why won't it work?

Because you're posting in a Java newsgroup instead of a Javascript
one like comp.lang.javascript?
Or maybe because
Shell.Application"
and
"Shell.Application"
aren't the same thing?

--
/-- Joona Palaste ([email protected]) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"The obvious mathematical breakthrough would be development of an easy way to
factor large prime numbers."
- Bill Gates
 
T

Tim Slattery

Joe Jones said:
I have this one line typed into Notepad and saved it as vertical.js.

(new ActiveXObject(Shell.Application")).TileVeritcally()

It is supposed to tile my open windows vertically when I run it, but I get
this error instead:

Unterminated string constant
code 800A03F7
Line 1 Character 59 Compilation Error

Why won't it work?

First, comp.lang.javascript is right around the corner. This is a Java
group, and Java has nothing at all to do with JavaScript!

Second, I see two errors. You've misspelled "TileVertically", and
there is one doublequote (") at the end of "Shell.Application". An
unbalanced doublequote will infallibly result in the error message you
quoted.
 
J

Joe Jones

You NG cops kicked me to another group but answered my question anyway. This
is exactly why I posted it here. I knew I would get an answer. Of course
people programming with Java would know the answer to this.
 
J

Joona I Palaste

Joe Jones said:
You NG cops kicked me to another group but answered my question anyway. This
is exactly why I posted it here. I knew I would get an answer. Of course
people programming with Java would know the answer to this.

Good that you got your answer, but honestly, do you think that justifies
posting to the wrong newsgroup? Perhaps in the future you want to ask
Javascript questions on rec.woodworking too?

--
/-- Joona Palaste ([email protected]) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"I said 'play as you've never played before', not 'play as IF you've never
played before'!"
- Andy Capp
 
C

Chris Smith

Joe said:
You NG cops kicked me to another group but answered my question anyway. This
is exactly why I posted it here. I knew I would get an answer. Of course
people programming with Java would know the answer to this.

It's true that close to 40% of Java developers also happen to know at
least a little JavaScript (according to some statistics I recently ran
across). However, close to 100% of JavaScript developers know
JavaScript reasonably well. In other words, the reason people are
pointing you to comp.lang.javascript is that there are more people there
who can help you with this kind of question in the future. You'd get
the same thing if you asked about C++ in a Java newsgroup, or Perl in a
C++ newsgroup, or JavaScript in a Fortran newsgroup; even though some
people know multiple languages, it works best for you and others to ask
questions in a newsgroup devoted to the language you're interested in.

This whole thing about you tricking us into answering is in your head.
People are here to help you out, and you don't need to trick them into
doing so.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
H

Hylander

Joona I Palaste said:
Good that you got your answer, but honestly, do you think that justifies
posting to the wrong newsgroup? Perhaps in the future you want to ask
Javascript questions on rec.woodworking too?

I would think the porn and viagra marketing groups would be a tad
better than java. The dilution of this group with client java writing
folks means possibly less web-programming savvy possible responses. Of
course, with a group name like "rec.woodworking" or
"alt.paris.hilton.wood.working", perhaps my idea is no less novel than
yours.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top