Re: Reveal in Find on Windows

2017-02-23 Thread Sannyasin Brahmanathaswami via use-livecode
HH wrote:
Yes, you are right, the handler only opens the enclosing folder
(or any path item of such a folder path).

Actually that's my main use case…

But now we have all options… thanks to all.

nice to find that I can use launch for both Windows and Mac

But has to have a slash on the end for Windows?

@Mike, right that was a typo sRootFolder is what it should be.  (script local 
for future use in another session)

BR

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Reveal in Find on Windows

2017-02-23 Thread hh via use-livecode
@Roger
I adjusted (uncompletely) the name to the OP's handler name.

Yes, you are right, the handler only opens the enclosing folder
(or any path item of such a folder path).

The purpose of my post was to second the "launch document" solution
for folders and moreover to add the linux variant for the ubuntu-
and debian-flavours (most Raspis run also linux).

I saw the "launch document" method for folders first, as a real
beginner, in an old post of Klaus in the forum.

For revealing/selecting the file one needs, as was partially
explicitly pointed out in other posts before (thanks for that),
specific tools for each platform. Some time ago I tried several hours
to find general variants but I gave up eventually because it is
moreover, within the platform, specific for OS-releases/OS-flavours.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Reveal in Find on Windows

2017-02-23 Thread Roger Eller via use-livecode
You get a star for effort.  ;-p

I tried your handler on Mac and Win, (not currently one of the 50 million
Linux users).  It opened the folder but did not select (reveal) the file or
folder.  The start of your command name didn't match the end, but that's
okay.  Community effort, right?

~Roger


On Thu, Feb 23, 2017 at 11:32 AM, hh via use-livecode <
use-livecode@lists.runrev.com> wrote:

> > Richard G. wrote:
> > There are three major desktop OSes. :)
>
> Yes. And I'm _the only one_ in this thread who posted a handler
> that serves all these three ...
>
> http://lists.runrev.com/pipermail/use-livecode/2017-February/234858.html
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Reveal in Find on Windows

2017-02-23 Thread hh via use-livecode
> Richard G. wrote:
> There are three major desktop OSes. :)

Yes. And I'm _the only one_ in this thread who posted a handler
that serves all these three ...

http://lists.runrev.com/pipermail/use-livecode/2017-February/234858.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Reveal in Find on Windows

2017-02-23 Thread Roger Eller via use-livecode
50 Million!!!  pffft

Well, let's not forget about the Amiga

then.  I know there are still at least 2, because I still have mine.  ;)

~Roger

On Thu, Feb 23, 2017 at 10:52 AM, Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Mike Bonner wrote:
>
> Just remembered, you can bipass the shell call entirely..
>>
>> launch document sRootFolder -- native lc command.  Just need to do as I
>> mentioned and be sure its a folder you're dealing with. (otherwise it will
>> launch the apropos app to match the file type)
>>
>> It will probably work for both platforms. (my mac is down or I'd check
>> there)
>>
>
> As Richmond might ask, "both"?
>
> There are three major desktop OSes. :)
>
> For those who include the roughly 50 million Linux desktop users in their
> deployments, calling xdg-open with the shell function does the trick:
>
> on mouseUp
>put specialFolderPath("desktop") into tFolder
>get shell("xdg-open "& tFolder )
> end mouseUp
>
> --
>  Richard Gaskin
>  Fourth World Systems
>  Software Design and Development for the Desktop, Mobile, and the Web
>  
>  ambassa...@fourthworld.comhttp://www.FourthWorld.com
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Reveal in Find on Windows

2017-02-23 Thread Richard Gaskin via use-livecode

Mike Bonner wrote:


Just remembered, you can bipass the shell call entirely..

launch document sRootFolder -- native lc command.  Just need to do as I
mentioned and be sure its a folder you're dealing with. (otherwise it will
launch the apropos app to match the file type)

It will probably work for both platforms. (my mac is down or I'd check
there)


As Richmond might ask, "both"?

There are three major desktop OSes. :)

For those who include the roughly 50 million Linux desktop users in 
their deployments, calling xdg-open with the shell function does the trick:


on mouseUp
   put specialFolderPath("desktop") into tFolder
   get shell("xdg-open "& tFolder )
end mouseUp

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Reveal in Find on Windows

2017-02-23 Thread hh via use-livecode
The following works here on Mac/Win/Linux with LC 6/7/8/9.

All my newer stacks have a menu (small square at top left)
to do that for each path item of the current stack path.

##  Opens the folder that contains the file pFolderFile
command openWorkingFolder pFolderFile
   set itemdel to "/"
   put item 1 to -2 of pFolderFile into t
   set itemdel to ","
   if the platform is "linux" then
  try
 launch document t
 get shell("xdg-open " & quote)
  end try
   else launch document t
end openWorkingFolderInFinder   


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Reveal in Find on Windows

2017-02-23 Thread Roger Eller via use-livecode
Launch document is good, but the OP wants to simply open a folder, and as
stated in his first post, reveal or select a specific file.  I'll try the
handler on Windows when I get to the office.

~Roger

On Feb 22, 2017 10:45 PM, "Mike Bonner via use-livecode" <
use-livecode@lists.runrev.com> wrote:

> Just remembered, you can bipass the shell call entirely..
>
> launch document sRootFolder -- native lc command.  Just need to do as I
> mentioned and be sure its a folder you're dealing with. (otherwise it will
> launch the apropos app to match the file type)
>
> It will probably work for both platforms. (my mac is down or I'd check
> there)
>
> On Wed, Feb 22, 2017 at 8:41 PM, Mike Bonner  wrote:
>
> > I can't test it on mac, but 2 things. First, if your path is a folder but
> > doesn't have the trailing / you'll end up in the wrong place so you might
> > consider doing a check:
> > if there is a file sRootFolder then delete item -1 of sRootFolder
> >
> > Then for the windows segment use "start":
> >
> > put ("start " & sRootFolder) into tShell  -- also noted there is a typo,
> > you use tRootfolder rather than sRootfolder in your example above
> >
> > I _think_ start is available all the way down to xp, but I can't check to
> > make sure.
> >
> >
> > On Wed, Feb 22, 2017 at 8:06 PM, Sannyasin Brahmanathaswami via
> > use-livecode  wrote:
> >
> >> this is what I have so far…
> >>
> >> command openWorkingFolderInFinder pFolderFile
> >> set the itemdel to "/"
> >> put pFolderFile into sRootFolder
> >> delete item -1 of sRootFolder
> >> switch platform()
> >> case "MacOS"
> >> put ("open " & quote & sRootFolder & quote) into tShell
> >> break
> >> case "Win32"
> >> put ("explorer.exe /n/root," & tRootfolder) into tShell
> >> break
> >> end switch
> >> get shell(tShell)
> >> end openWorkingFolderInFinder
> >>
> >> Can anyone test if this opens a folder on Windows?
> >>
> >> tks
> >>
> >>
> >> On 2/22/17, 4:59 PM, "use-livecode on behalf of Sannyasin
> >> Brahmanathaswami via use-livecode"  runrev.com
> >> on behalf of use-livecode@lists.runrev.com> wrote:
> >>
> >> OK  I studied the doc here:
> >>
> >> https://support.microsoft.com/en-us/help/130510/command-line
> >> -switches-for-windows-explorer
> >>
> >> and actually the use cases are more often to open a folder
> >>
> >> but I don't have windows to test
> >>
> >> does this work to open a folder window on Win32?
> >>
> >> get shell (”explorer.exe /n,/root,c:\windows\system32\m
> >> y-project-folder")
> >>
> >>
> >> BR
> >>
> >>
> >>
> >> On 2/22/17, 1:54 AM, "use-livecode on behalf of Roger Eller via
> >> use-livecode"  >> use-livecode@lists.runrev.com> wrote:
> >>
> >> get shell (”explorer.exe /select,c:\windows\system32\se
> >> lected_file.txt")
> >>
> >> Source:
> >> http://stackoverflow.com/questions/29970897/cmd-file-tasks-
> >> open-directory-and-select-file
> >>
> >> ~Roger
> >>
> >>
> >>
> >> ___
> >> use-livecode mailing list
> >> use-livecode@lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >
> >
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Reveal in Find on Windows

2017-02-22 Thread Mike Bonner via use-livecode
Just remembered, you can bipass the shell call entirely..

launch document sRootFolder -- native lc command.  Just need to do as I
mentioned and be sure its a folder you're dealing with. (otherwise it will
launch the apropos app to match the file type)

It will probably work for both platforms. (my mac is down or I'd check
there)

On Wed, Feb 22, 2017 at 8:41 PM, Mike Bonner  wrote:

> I can't test it on mac, but 2 things. First, if your path is a folder but
> doesn't have the trailing / you'll end up in the wrong place so you might
> consider doing a check:
> if there is a file sRootFolder then delete item -1 of sRootFolder
>
> Then for the windows segment use "start":
>
> put ("start " & sRootFolder) into tShell  -- also noted there is a typo,
> you use tRootfolder rather than sRootfolder in your example above
>
> I _think_ start is available all the way down to xp, but I can't check to
> make sure.
>
>
> On Wed, Feb 22, 2017 at 8:06 PM, Sannyasin Brahmanathaswami via
> use-livecode  wrote:
>
>> this is what I have so far…
>>
>> command openWorkingFolderInFinder pFolderFile
>> set the itemdel to "/"
>> put pFolderFile into sRootFolder
>> delete item -1 of sRootFolder
>> switch platform()
>> case "MacOS"
>> put ("open " & quote & sRootFolder & quote) into tShell
>> break
>> case "Win32"
>> put ("explorer.exe /n/root," & tRootfolder) into tShell
>> break
>> end switch
>> get shell(tShell)
>> end openWorkingFolderInFinder
>>
>> Can anyone test if this opens a folder on Windows?
>>
>> tks
>>
>>
>> On 2/22/17, 4:59 PM, "use-livecode on behalf of Sannyasin
>> Brahmanathaswami via use-livecode" > on behalf of use-livecode@lists.runrev.com> wrote:
>>
>> OK  I studied the doc here:
>>
>> https://support.microsoft.com/en-us/help/130510/command-line
>> -switches-for-windows-explorer
>>
>> and actually the use cases are more often to open a folder
>>
>> but I don't have windows to test
>>
>> does this work to open a folder window on Win32?
>>
>> get shell (”explorer.exe /n,/root,c:\windows\system32\m
>> y-project-folder")
>>
>>
>> BR
>>
>>
>>
>> On 2/22/17, 1:54 AM, "use-livecode on behalf of Roger Eller via
>> use-livecode" > use-livecode@lists.runrev.com> wrote:
>>
>> get shell (”explorer.exe /select,c:\windows\system32\se
>> lected_file.txt")
>>
>> Source:
>> http://stackoverflow.com/questions/29970897/cmd-file-tasks-
>> open-directory-and-select-file
>>
>> ~Roger
>>
>>
>>
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Reveal in Find on Windows

2017-02-22 Thread Mike Bonner via use-livecode
I can't test it on mac, but 2 things. First, if your path is a folder but
doesn't have the trailing / you'll end up in the wrong place so you might
consider doing a check:
if there is a file sRootFolder then delete item -1 of sRootFolder

Then for the windows segment use "start":

put ("start " & sRootFolder) into tShell  -- also noted there is a typo,
you use tRootfolder rather than sRootfolder in your example above

I _think_ start is available all the way down to xp, but I can't check to
make sure.


On Wed, Feb 22, 2017 at 8:06 PM, Sannyasin Brahmanathaswami via
use-livecode  wrote:

> this is what I have so far…
>
> command openWorkingFolderInFinder pFolderFile
> set the itemdel to "/"
> put pFolderFile into sRootFolder
> delete item -1 of sRootFolder
> switch platform()
> case "MacOS"
> put ("open " & quote & sRootFolder & quote) into tShell
> break
> case "Win32"
> put ("explorer.exe /n/root," & tRootfolder) into tShell
> break
> end switch
> get shell(tShell)
> end openWorkingFolderInFinder
>
> Can anyone test if this opens a folder on Windows?
>
> tks
>
>
> On 2/22/17, 4:59 PM, "use-livecode on behalf of Sannyasin Brahmanathaswami
> via use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> OK  I studied the doc here:
>
> https://support.microsoft.com/en-us/help/130510/command-
> line-switches-for-windows-explorer
>
> and actually the use cases are more often to open a folder
>
> but I don't have windows to test
>
> does this work to open a folder window on Win32?
>
> get shell (”explorer.exe /n,/root,c:\windows\system32\
> my-project-folder")
>
>
> BR
>
>
>
> On 2/22/17, 1:54 AM, "use-livecode on behalf of Roger Eller via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> get shell (”explorer.exe /select,c:\windows\system32\
> selected_file.txt")
>
> Source:
> http://stackoverflow.com/questions/29970897/cmd-file-
> tasks-open-directory-and-select-file
>
> ~Roger
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Reveal in Find on Windows

2017-02-22 Thread Sannyasin Brahmanathaswami via use-livecode
this is what I have so far…

command openWorkingFolderInFinder pFolderFile
set the itemdel to "/"
put pFolderFile into sRootFolder
delete item -1 of sRootFolder
switch platform()
case "MacOS"
put ("open " & quote & sRootFolder & quote) into tShell
break
case "Win32"
put ("explorer.exe /n/root," & tRootfolder) into tShell
break   
end switch
get shell(tShell)
end openWorkingFolderInFinder

Can anyone test if this opens a folder on Windows?

tks


On 2/22/17, 4:59 PM, "use-livecode on behalf of Sannyasin Brahmanathaswami via 
use-livecode"  wrote:

OK  I studied the doc here:  


https://support.microsoft.com/en-us/help/130510/command-line-switches-for-windows-explorer

and actually the use cases are more often to open a folder

but I don't have windows to test

does this work to open a folder window on Win32?

get shell (”explorer.exe /n,/root,c:\windows\system32\my-project-folder")


BR



On 2/22/17, 1:54 AM, "use-livecode on behalf of Roger Eller via 
use-livecode"  wrote:

get shell (”explorer.exe /select,c:\windows\system32\selected_file.txt")

Source:

http://stackoverflow.com/questions/29970897/cmd-file-tasks-open-directory-and-select-file

~Roger



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Reveal in Find on Windows

2017-02-22 Thread Sannyasin Brahmanathaswami via use-livecode
OK  I studied the doc here:  

https://support.microsoft.com/en-us/help/130510/command-line-switches-for-windows-explorer

and actually the use cases are more often to open a folder

but I don't have windows to test

does this work to open a folder window on Win32?

get shell (”explorer.exe /n,/root,c:\windows\system32\my-project-folder")


BR


 

On 2/22/17, 1:54 AM, "use-livecode on behalf of Roger Eller via use-livecode" 
 wrote:

get shell (”explorer.exe /select,c:\windows\system32\selected_file.txt")

Source:

http://stackoverflow.com/questions/29970897/cmd-file-tasks-open-directory-and-select-file

~Roger

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Reveal in Find on Windows

2017-02-22 Thread Sannyasin Brahmanathaswami via use-livecode
Thanks Roger!  

 

On 2/22/17, 1:54 AM, "use-livecode on behalf of Roger Eller via use-livecode" 
 wrote:

get shell (”explorer.exe /select,c:\windows\system32\selected_file.txt")

Source:

http://stackoverflow.com/questions/29970897/cmd-file-tasks-open-directory-and-select-file

~Roger



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Reveal in Find on Windows

2017-02-22 Thread Roger Eller via use-livecode
get shell (”explorer.exe /select,c:\windows\system32\selected_file.txt")

Source:
http://stackoverflow.com/questions/29970897/cmd-file-tasks-open-directory-and-select-file

~Roger

On Feb 21, 2017 10:43 PM, "Sannyasin Brahmanathaswami via use-livecode" <
use-livecode@lists.runrev.com> wrote:

for in house production tools I use an apples script or shell script to
reveal a file in the finder

how do we do this on windows?

BR

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reveal in Find on Windows

2017-02-21 Thread Sannyasin Brahmanathaswami via use-livecode
for in house production tools I use an apples script or shell script to reveal 
a file in the finder

how do we do this on windows?

BR

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode