[OT] Windows Command Help

Jon jbondy at sover.net
Fri Jul 29 08:24:32 EDT 2005


Windows has a facility built in that associates file extensions with 
applications.  Thus, you can tell Windows that the default application 
for a JPG is FRED.EXE.  Normally, any useful document has an associated 
application. There are ways to ask windows to open a document using the 
default application. In Delphi, this is what I write to do this:

   i := ShellExecute(Application.handle, 'open', fName, '', '', 
SW_SHOWNORMAL); 

Now, how easy it might be to do this from within Rev, I cannot say. I'm 
just explaining how Windows works.  Hope this helps.  Feel free to 
contact me off list if you want to get into the details.

:)

Jon


Dan Shafer wrote:

> The problem is I don't know the name or path of the app. On OS X,  
> this doesn't matter. But it appears I cannot ask Windows to launch a  
> document and expect it to figure out which app to use.
>
> Great.
>
> Dan
>
> On Jul 28, 2005, at 6:24 PM, MisterX wrote:
>
>> Hi Dan
>>
>> It's funny to see MacOS - no-to-CLIs - crowd do it in Unix and not  
>> in DOS ;0
>>
>> what you need is something like
>> c:\notepad <pathtomyfile>
>> or notepad.exe <path to myfile"
>> or <pathtoapp> <path to file> should work...
>>
>> BUT this will block Rev... :(
>>
>> so shell("start" && quote && appspath && docpath && quote should  
>> work...)
>>
>> cheers
>> Xavier
>>
>>
>>> -----Original Message-----
>>> From: use-revolution-bounces at lists.runrev.com
>>> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of
>>> Dan Shafer
>>> Sent: Friday, July 29, 2005 02:57
>>> To: Revolution List
>>> Subject: [OT] Windows Command Help
>>>
>>> In OS X, I can issue the shell command "launch" followed by a
>>> document path and the system opens that document with the
>>> appropriate app.
>>>
>>> Is there an equivalent command/syntax for Windows? I tried "start"
>>> but if I give it a document path, it opens a new command
>>> window but doesn't do anything.
>>>
>>> Thanks in advance for any help for the Windows-challenged.
>>>
>>>
>>>
>>>
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> 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
>>> use-revolution at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage
>>> your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>>
>>>
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your  
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>



More information about the use-livecode mailing list