Windows Command Code Resolved

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Windows Command Code Resolved

Dan Shafer
Just to close the loop on my earlier question....

Chipp and I walked through on the phone the use of the "start"  
command in the Win shell and for some reason, it worked fine. I think  
I was enclosing the file name in quotation marks earlier and when I  
took them out, voila!

So the bare-bones version of this is simplicity itself:

on mouseUp
   if the platform is "Win32"  then
     put "start" && the eBookContents of this stack into openCmd
   else
     put "open" && the eBookContents of this stack into openCmd
   end if
   put shell (openCmd) into shellResult
end mouseUp

Lots of error-checking and other stuff to add, of course, but this  
gets me to the next level.

I appreciate everyone's help, esp. Jonathan, who went way above and  
beyond and, of course, Chipp.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Shafer, Revolution Consultant and Author
http://www.shafermedia.com
Get my book, "Revolution: Software at the Speed of Thought"
 From http://www.revolutionpros.com, Click "My Stuff"



_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: Windows Command Code Resolved

Lynch, Jonathan
Something to be wary of...

If the file path to your document contains spaces, it might confuse the
start command.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dan Shafer
Sent: Friday, July 29, 2005 6:58 PM
To: Revolution List
Subject: Windows Command Code Resolved

Just to close the loop on my earlier question....

Chipp and I walked through on the phone the use of the "start"  
command in the Win shell and for some reason, it worked fine. I think  
I was enclosing the file name in quotation marks earlier and when I  
took them out, voila!

So the bare-bones version of this is simplicity itself:

on mouseUp
   if the platform is "Win32"  then
     put "start" && the eBookContents of this stack into openCmd
   else
     put "open" && the eBookContents of this stack into openCmd
   end if
   put shell (openCmd) into shellResult
end mouseUp

Lots of error-checking and other stuff to add, of course, but this  
gets me to the next level.

I appreciate everyone's help, esp. Jonathan, who went way above and  
beyond and, of course, Chipp.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Shafer, Revolution Consultant and Author
http://www.shafermedia.com
Get my book, "Revolution: Software at the Speed of Thought"
 From http://www.revolutionpros.com, Click "My Stuff"



_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: Windows Command Code Resolved

Lynch, Jonathan
In reply to this post by Dan Shafer

Perhaps doing this?

put "start" && quote & the eBookContents of this stack & quote into
openCmd

also, for some Windows systems, I believe that it is necessary to
replace "/" with "\" in your file path.

Hey Dan, what Windows OS are you using?

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Lynch,
Jonathan
Sent: Friday, July 29, 2005 7:07 PM
To: How to use Revolution
Subject: RE: Windows Command Code Resolved

Something to be wary of...

If the file path to your document contains spaces, it might confuse the
start command.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Dan Shafer
Sent: Friday, July 29, 2005 6:58 PM
To: Revolution List
Subject: Windows Command Code Resolved

Just to close the loop on my earlier question....

Chipp and I walked through on the phone the use of the "start"  
command in the Win shell and for some reason, it worked fine. I think  
I was enclosing the file name in quotation marks earlier and when I  
took them out, voila!

So the bare-bones version of this is simplicity itself:

on mouseUp
   if the platform is "Win32"  then
     put "start" && the eBookContents of this stack into openCmd
   else
     put "open" && the eBookContents of this stack into openCmd
   end if
   put shell (openCmd) into shellResult
end mouseUp

Lots of error-checking and other stuff to add, of course, but this  
gets me to the next level.

I appreciate everyone's help, esp. Jonathan, who went way above and  
beyond and, of course, Chipp.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Shafer, Revolution Consultant and Author
http://www.shafermedia.com
Get my book, "Revolution: Software at the Speed of Thought"
 From http://www.revolutionpros.com, Click "My Stuff"



_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Windows Command Code Resolved

Dan Shafer
In reply to this post by Lynch, Jonathan
GOod to know. Chipp mentioned something about escaping file names;  
presumably this has something to do with that.

Dan

On Jul 29, 2005, at 4:06 PM, Lynch, Jonathan wrote:

> Something to be wary of...
>
> If the file path to your document contains spaces, it might confuse  
> the
> start command.
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Dan  
> Shafer
> Sent: Friday, July 29, 2005 6:58 PM
> To: Revolution List
> Subject: Windows Command Code Resolved
>
> Just to close the loop on my earlier question....
>
> Chipp and I walked through on the phone the use of the "start"
> command in the Win shell and for some reason, it worked fine. I think
> I was enclosing the file name in quotation marks earlier and when I
> took them out, voila!
>
> So the bare-bones version of this is simplicity itself:
>
> on mouseUp
>    if the platform is "Win32"  then
>      put "start" && the eBookContents of this stack into openCmd
>    else
>      put "open" && the eBookContents of this stack into openCmd
>    end if
>    put shell (openCmd) into shellResult
> end mouseUp
>
> Lots of error-checking and other stuff to add, of course, but this
> gets me to the next level.
>
> I appreciate everyone's help, esp. Jonathan, who went way above and
> beyond and, of course, Chipp.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Dan Shafer, Revolution Consultant and Author
> http://www.shafermedia.com
> Get my book, "Revolution: Software at the Speed of Thought"
>  From http://www.revolutionpros.com, Click "My Stuff"
>
>
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Windows Command Code Resolved

Dan Shafer
In reply to this post by Lynch, Jonathan

On Jul 29, 2005, at 4:17 PM, Lynch, Jonathan wrote:

>
> Perhaps doing this?
>
> put "start" && quote & the eBookContents of this stack & quote into
> openCmd
>
> also, for some Windows systems, I believe that it is necessary to
> replace "/" with "\" in your file path.
>
Yeah, that appears to be part of it as well. My plan for my  
particular app is that the document is stored in the same directory  
as the app, so none of that pathing should become an issue. In fact,  
if the document *isn't* in the folder with the app, that will  
disqualify it from opening.

I'm using WinXP Pro.


> Hey Dan, what Windows OS are you using?
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Lynch,
> Jonathan
> Sent: Friday, July 29, 2005 7:07 PM
> To: How to use Revolution
> Subject: RE: Windows Command Code Resolved
>
> Something to be wary of...
>
> If the file path to your document contains spaces, it might confuse  
> the
> start command.
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Dan  
> Shafer
> Sent: Friday, July 29, 2005 6:58 PM
> To: Revolution List
> Subject: Windows Command Code Resolved
>
> Just to close the loop on my earlier question....
>
> Chipp and I walked through on the phone the use of the "start"
> command in the Win shell and for some reason, it worked fine. I think
> I was enclosing the file name in quotation marks earlier and when I
> took them out, voila!
>
> So the bare-bones version of this is simplicity itself:
>
> on mouseUp
>    if the platform is "Win32"  then
>      put "start" && the eBookContents of this stack into openCmd
>    else
>      put "open" && the eBookContents of this stack into openCmd
>    end if
>    put shell (openCmd) into shellResult
> end mouseUp
>
> Lots of error-checking and other stuff to add, of course, but this
> gets me to the next level.
>
> I appreciate everyone's help, esp. Jonathan, who went way above and
> beyond and, of course, Chipp.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Dan Shafer, Revolution Consultant and Author
> http://www.shafermedia.com
> Get my book, "Revolution: Software at the Speed of Thought"
>  From http://www.revolutionpros.com, Click "My Stuff"
>
>
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Shafer, Revolution Consultant and Author
http://www.shafermedia.com
Get my book, "Revolution: Software at the Speed of Thought"
 From http://www.revolutionpros.com, Click "My Stuff"



_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Windows Command Code Resolved

Rich Herz
In reply to this post by Dan Shafer
> Something to be wary of...
> If the file path to your document contains spaces, it might confuse
> the start command.

Also see the entries under "Command Line/Shell Info" at
http://www.sonsothunder.com/index2.htm?http://www.sonsothunder.com/devres/revolution/revolution.htm?_dply001

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Windows Command Code Resolved

Chipp Walters
In reply to this post by Dan Shafer
Hi gang,

Got it working. Pretty simple actually:

Here's the guts (after putting the filepath into fld "docPath")

put shortFilePath(fld "docPath") into tDocPath
replace "/" with "\" in tDocPath
put "start" && tDocPath into tDosCommand
set the hideconsolewindows to true
get shell(tDosCommand)

Here's a demo: type in the message:

go URL "http://www.altuit.com/webs/altuit2/RunRev/WinXPFileLauncher.rev"

best,

Chipp
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Windows Command Code Resolved

Chipp Walters
In reply to this post by Rich Herz
Yep, that's why you use the 'shortFilePath' function.

Richard K. Herz wrote:
>> Something to be wary of...
>> If the file path to your document contains spaces, it might confuse
>> the start command.
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: Windows Command Code Resolved

Lynch, Jonathan
In reply to this post by Dan Shafer
This works on my computer - much easier than the convoluted script I was
using.

I think Chipp's adding in the shortfilepath function was the key...

Earlier attempts at using this approach did not work for me, presumably
because quotes and spaces were confusing 'start'.

Thanks Chipp!

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chipp
Walters
Sent: Friday, July 29, 2005 11:37 PM
To: How to use Revolution
Subject: Re: Windows Command Code Resolved

Hi gang,

Got it working. Pretty simple actually:

Here's the guts (after putting the filepath into fld "docPath")

put shortFilePath(fld "docPath") into tDocPath
replace "/" with "\" in tDocPath
put "start" && tDocPath into tDosCommand
set the hideconsolewindows to true
get shell(tDosCommand)

Here's a demo: type in the message:

go URL "http://www.altuit.com/webs/altuit2/RunRev/WinXPFileLauncher.rev"

best,

Chipp
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: Windows Command Code Resolved

Lynch, Jonathan
In reply to this post by Dan Shafer
One other thing to consider adding to this script...

In the rev front scripts, which accessing the windows shell, they use
this command:
revSetWindowsShellCommand

Which I guess makes sure that Rev uses the correct type of shell command
for the specific windows system that the user is using. (I believe it
has to choose between cmd.exe vs. command.exe)



-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Lynch,
Jonathan
Sent: Monday, August 01, 2005 9:28 AM
To: [hidden email]; How to use Revolution
Subject: RE: Windows Command Code Resolved

This works on my computer - much easier than the convoluted script I was
using.

I think Chipp's adding in the shortfilepath function was the key...

Earlier attempts at using this approach did not work for me, presumably
because quotes and spaces were confusing 'start'.

Thanks Chipp!

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Chipp
Walters
Sent: Friday, July 29, 2005 11:37 PM
To: How to use Revolution
Subject: Re: Windows Command Code Resolved

Hi gang,

Got it working. Pretty simple actually:

Here's the guts (after putting the filepath into fld "docPath")

put shortFilePath(fld "docPath") into tDocPath
replace "/" with "\" in tDocPath
put "start" && tDocPath into tDosCommand
set the hideconsolewindows to true
get shell(tDosCommand)

Here's a demo: type in the message:

go URL "http://www.altuit.com/webs/altuit2/RunRev/WinXPFileLauncher.rev"

best,

Chipp
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: Windows Command Code Resolved

MisterX
Jon

here's a little function from XOS's scripts

on CheckShellPlatform
  if (the platform = "win32") and (word 1 of the systemversion is "windows")
then
    set the shellcommand to "command.com"
  else
    set the shellcommand to "cmd.exe"
  end if
end CheckShellPlatform

cheers
Xavier

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Lynch, Jonathan
> Sent: Monday, August 01, 2005 15:39
> To: How to use Revolution
> Subject: RE: Windows Command Code Resolved
>
> One other thing to consider adding to this script...
>
> In the rev front scripts, which accessing the windows shell,
> they use this command:
> revSetWindowsShellCommand
>
> Which I guess makes sure that Rev uses the correct type of
> shell command for the specific windows system that the user
> is using. (I believe it has to choose between cmd.exe vs. command.exe)
>
>
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Lynch, Jonathan
> Sent: Monday, August 01, 2005 9:28 AM
> To: [hidden email]; How to use Revolution
> Subject: RE: Windows Command Code Resolved
>
> This works on my computer - much easier than the convoluted
> script I was using.
>
> I think Chipp's adding in the shortfilepath function was the key...
>
> Earlier attempts at using this approach did not work for me,
> presumably because quotes and spaces were confusing 'start'.
>
> Thanks Chipp!
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Chipp Walters
> Sent: Friday, July 29, 2005 11:37 PM
> To: How to use Revolution
> Subject: Re: Windows Command Code Resolved
>
> Hi gang,
>
> Got it working. Pretty simple actually:
>
> Here's the guts (after putting the filepath into fld "docPath")
>
> put shortFilePath(fld "docPath") into tDocPath replace "/"
> with "\" in tDocPath put "start" && tDocPath into tDosCommand
> set the hideconsolewindows to true get shell(tDosCommand)
>
> Here's a demo: type in the message:
>
> go URL
> "http://www.altuit.com/webs/altuit2/RunRev/WinXPFileLauncher.rev"
>
> best,
>
> Chipp
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: Windows Command Code Resolved

Lynch, Jonathan
In reply to this post by Dan Shafer
Hi Xavier - this is the revSetWindowsShellCommand from the revCommon
script:

on revSetWindowsShellCommand
  if the platform is not "Win32" then exit revSetWindowsShellCommand
  set the hideConsoleWindows to true
  if $COMSPEC is not empty then set the shellCommand to $COMSPEC
  else
    --just in case some windows versions don't use $COMSPEC
    if revRunningWindowsNT() then set the shellCommand to "cmd.exe"
    else set the shellCommand to "command.com"
  end if
end revSetWindowsShellCommand

I guess the two accomplish essentially the same thing.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of MisterX
Sent: Monday, August 01, 2005 10:38 AM
To: 'How to use Revolution'
Subject: RE: Windows Command Code Resolved

Jon

here's a little function from XOS's scripts

on CheckShellPlatform
  if (the platform = "win32") and (word 1 of the systemversion is
"windows")
then
    set the shellcommand to "command.com"
  else
    set the shellcommand to "cmd.exe"
  end if
end CheckShellPlatform

cheers
Xavier

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Lynch, Jonathan
> Sent: Monday, August 01, 2005 15:39
> To: How to use Revolution
> Subject: RE: Windows Command Code Resolved
>
> One other thing to consider adding to this script...
>
> In the rev front scripts, which accessing the windows shell,
> they use this command:
> revSetWindowsShellCommand
>
> Which I guess makes sure that Rev uses the correct type of
> shell command for the specific windows system that the user
> is using. (I believe it has to choose between cmd.exe vs. command.exe)
>
>
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Lynch, Jonathan
> Sent: Monday, August 01, 2005 9:28 AM
> To: [hidden email]; How to use Revolution
> Subject: RE: Windows Command Code Resolved
>
> This works on my computer - much easier than the convoluted
> script I was using.
>
> I think Chipp's adding in the shortfilepath function was the key...
>
> Earlier attempts at using this approach did not work for me,
> presumably because quotes and spaces were confusing 'start'.
>
> Thanks Chipp!
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Chipp Walters
> Sent: Friday, July 29, 2005 11:37 PM
> To: How to use Revolution
> Subject: Re: Windows Command Code Resolved
>
> Hi gang,
>
> Got it working. Pretty simple actually:
>
> Here's the guts (after putting the filepath into fld "docPath")
>
> put shortFilePath(fld "docPath") into tDocPath replace "/"
> with "\" in tDocPath put "start" && tDocPath into tDosCommand
> set the hideconsolewindows to true get shell(tDosCommand)
>
> Here's a demo: type in the message:
>
> go URL
> "http://www.altuit.com/webs/altuit2/RunRev/WinXPFileLauncher.rev"
>
> best,
>
> Chipp
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution