Re: Problem with a "simple" script
- From: RichardOnRails <RichardDummyMailbox58407@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 18 Aug 2007 15:14:48 -0000
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
.
- References:
- Problem with a "simple" script
- From: RichardOnRails
- Re: Problem with a "simple" script
- From: asdf
- Re: Problem with a "simple" script
- From: RichardOnRails
- Re: Problem with a "simple" script
- From: Joe Fawcett
- Problem with a "simple" script
- Prev by Date: Re: Problem with a "simple" script
- Next by Date: Re: Problem with a "simple" script
- Previous by thread: Re: Problem with a "simple" script
- Next by thread: Re: Problem with a "simple" script
- Index(es):
Relevant Pages
|