Re: Problem with a "simple" script

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Aug 18, 8:58 am, "Joe Fawcett" <joefawc...@xxxxxxxxxxxxxxxx> wrote:
In J(ava)Script function arguments must be surrounded by parentheses.
WScript.Echo ("Executing:\n" + strCmdLine);

--

Joe Fawcett (MVP - XML)http://joe.fawcett.name

"RichardOnRails" <RichardDummyMailbox58...@xxxxxxxxxxxxxxxxxxx> wrote in
messagenews:1187439663.894562.38630@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

On Aug 18, 3:00 am, "asdf" <a...@xxxxxxxx> wrote:
You are not sharing the script,

you are trying to execute it on my machine.

------------------------------------------------------

And then your lousy .jpg reference.

------------------------------------------------------

Does law enforment now run around with spawned gun triggers,
ready to fire on a touch or a click ?

------------------------------------------------------

Your "simple" insight makes me to write this.

"RichardOnRails" <RichardDummyMailbox58...@xxxxxxxxxxxxxxxxxxx> wrote in
messagenews:1187416313.916543.41700@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Hi,

I wrote a pretty simple script which fails as noted below and I can't
figure out what's wrong. Any guidance would be most appreciated.

The script is posted on
http://home.comcast.net/~CaptQueeg/ShowHexEquivs.wsf.

When I run it with "WScript ShowHexEquivs.wsf" in a Cmd window, I get
a Message Box, which is displayed on
http://home.comcast.net/~CaptQueeg/ShowHexEquivs.jpg

Line 18, col. 21 appears to be the "E" starting the string following
the "WScript.Echo" command.

BTW, my purpose in writing this script is to have a convenient way to
invoke my hex-editor to display the ASCII codes of the special
keyboard characters so I can see deduce their collating sequence.

Thanks in Advance,
Richard

You are not sharing the script,
you are trying to execute it on my machine.

I'm not "trying" to execute the script on your machine. When I
clicked thehttp://home.comcast.net/~CaptQueeg/ShowHexEquivs.wsflink
on my machine, the script was displayed in Notepad, not executed.

I executed a local copy. the script in a Cmd window with, e.g. WScript
ShowHexEquivs.wsf.

BTW, I'm running on WinXP/SP2, in case that makes any difference.

And then your lousy .jpg reference.

What is "lousy" about it? It displayed the error message I got when I
ran the script.

Does law enforment now run around with spawned gun triggers,
ready to fire on a touch or a click ?

Is this relevant to my script, or the the posting of it? I don;t get
it.

I've deleted the posted script in favor of including it below.

Best wishes,
Richard

=========== ShowHexEquivs.wsf ===========
<?xml version="1.0"?>
<!-- ShowHexEquivs.wsf -->

<!--
Run as WScript.exe ShowHexEquivs.wsf

var strPgmName = "K:\\_Utilities\\HexEditor_XVI32\\XVI32.exe";
var strFileName = "K:\\_Projects\\CharacterSets\\ASCII-
Special.txt";
-->

<job>
<script language="JScript">
var strPgmName = "Wordpad.exe";
var strFileName = "ShowHexEquivs.wsf";
var strSpaces = " ";
var strCmdLine = strPgmName + strSpaces + strFileName;

WScript.Echo "Executing:\n" + strCmdLine;

var objShell = WScript.CreateObject("WScript.Shell");
objShell.Run strCmdLine;
</script>
</job>

Hi Joe,

Since putting up a .js file online seemed to caused some heartburn, I
decided to put up the script as .txt (as I subsequently saw from your
post) and perhaps simplify the issue by posting some published code
that I couldn't get to work.

So I put up http://home.comcast.net/~CaptQueeg/ScriptingTest.txt

Then I saw your advice and put up http://home.comcast.net/~CaptQueeg/ScriptingTestCorrected.txt,
which ran fine.

Now I've got to go back to my original problem and see if I can
straighten that out. I had tried using WScript.Echo in my original
project but went astray somehow.

Many thanks for your help.
--
Richard

.



Relevant Pages

  • Re: Internet Explorer - Firefox
    ... Firefox, the problem is how publisher displayed it in IE. ... I imagine it is a problem with how the script is ... suppose to display a search box for flights..i am pretty sure that the ...
    (microsoft.public.publisher.webdesign)
  • Re: Display a block of text in Firefox & Safari
    ... in FireFox and Safari it appears as a narrow ... There seems to be a needless reliance on the global variable 'NumberOfQuestionsShown', I've suggested a different strategy below that should be easier to maintain - it uses a single class to hide/show questions so the script doesn't need to know how many questions there are nor do they need to be consecutively numbered. ... var questionNum; ... Instead of going through all questions, how about giving them all the same style, then just modify the style to change display from 'none' to ''. ...
    (comp.lang.javascript)
  • Re: Conditional formatting
    ... happens if you step through the script in Script Debugger? ... I'd like to dynamically place a button on my layout. ... I only want the "Show All" button to display when I'm ... calculation determining how the button is labelled and describing what ...
    (comp.databases.filemaker)
  • Re: Internet Explorer - Firefox
    ... the Pub 2003 coding engine produces the code. ... the problem is how publisher displayed it in IE. ... original script given to you from the source, ... suppose to display a search box for flights..i am pretty sure ...
    (microsoft.public.publisher.webdesign)
  • Re: Internet Explorer - Firefox
    ... the Pub 2003 coding engine produces the code. ... the problem is how publisher displayed it in IE. ... I imagine it is a problem with how the script ... suppose to display a search box for flights..i am pretty sure ...
    (microsoft.public.publisher.webdesign)