Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 12:03 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Ping Script mistake - how to save to file.
PostPosted: August 24th, 2013, 4:54 pm 
Offline

Joined: December 22nd, 2004, 10:00 am
Posts: 29
Opus: Opus Pro 7.5
OS: Windows 7 32 bit on BootCamp
System: MacBook Pro, 3 GBytes RAM, Core2Duo T8300@2.4 GHz,
Hi all,

this is essentially again the question of how to save the output of a command prompt to a file.
Please tell me what is wrong with my script...I have tried many combinations, with or without the quotes, one or two ">" etc.
Can never get it to work.
Here is the actions on my button:

Launch File

Launch this file: ping.exe
With option/parameter: www.google.com > "d:\\pingresult.txt"

Thanks

Dennis


For this message dzervas has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Ping Script mistake - how to save to file.
PostPosted: August 25th, 2013, 6:00 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
With option/parameter: www.google.com > "d:\\pingresult.txt"

have you tried ?? :
"d:\pingresult.txt"

My understanding of Opus is that the 'escape character' is required where ECMA / opusscript is involved. But it seems with strings in variables and maybe strings in passed parameters to other controllers... does not use the double slash....

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Ping Script mistake - how to save to file.
PostPosted: August 25th, 2013, 10:05 am 
Offline

Joined: December 22nd, 2004, 10:00 am
Posts: 29
Opus: Opus Pro 7.5
OS: Windows 7 32 bit on BootCamp
System: MacBook Pro, 3 GBytes RAM, Core2Duo T8300@2.4 GHz,
Thanks for your answer,

yes, I have tried that.
If the parameter is only www.google.com and nothing else, it works and shows a command prompt window and starts pinging google.
But if I put the rest, it shows a command prompt which quickly dissapears.

Thanks

Dennis


For this message dzervas has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Ping Script mistake - how to save to file.
PostPosted: August 25th, 2013, 12:51 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
You're misunderstanding - ping cannot output to a text file - command prompt can.

Launch:

Code:
cmd.exe


Parameters:

Code:
/c ping www.google.com > b:\ping.txt



Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Ping Script mistake - how to save to file.
PostPosted: August 25th, 2013, 1:44 pm 
Offline

Joined: December 22nd, 2004, 10:00 am
Posts: 29
Opus: Opus Pro 7.5
OS: Windows 7 32 bit on BootCamp
System: MacBook Pro, 3 GBytes RAM, Core2Duo T8300@2.4 GHz,
Mack!!!!!!

yes, that was an eye opener... worked at the first attempt.
Now I see the misunderstanding...

Many thanks!

Dennis


For this message dzervas has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Ping Script mistake - how to save to file.
PostPosted: August 25th, 2013, 4:31 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
ETA: Oops, and great. Mack got it there first. Took me awhile to get there.

dzervas wrote:
Can never get it to work.

Launch this file: ping.exe
With option/parameter: http://www.google.com > "d:\\pingresult.txt"
Hopefully we will not have to say 'never'.

I have played with this a bit. For the longest time and trying different approaches or set-ups, I was going to conclude it was either a Permissions issue (UAC), or that the cmd line tool was setting a path to something other than C:\Windows\System32.

Then all of a sudden, I got it to work. What puzzles me is that I am pretty sure the successful configuration is not different that what I tried before without success.

= = = = = = = = Also, I got some weird behaviours in Opus Previewing / Testing = = = = = = =
Just to check my work, I created another Button on the same page and set it up from scratch to do the launch cmd.exe with parameters to ping a site. First and second time it worked. Then I saved my Pub, did another Preview and that same new Button did not work. However, the 1st Button did work.

My CONCLUSION for the root cause of the problem is this. It is easy to make a small mistake when setting this up in Opus standard actions. On one hand, it seems very 'forgiving'... use 1 or 2 '\' in the filepath, use quotes around filepath or okay without (if no spaces). But try Launching the cmd.exe and using ping as one of the parameters. And look for small mistakes, typos, whatever.

What worked:
BTW, you only need the 1st action, Launch File. The others were there for troubleshooting.


You do not have the required permissions to view the files attached to this post.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

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


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group