Opening a folder in Windows

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
edgore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 197
Joined: Wed Jun 14, 2006 8:40 pm

Opening a folder in Windows

Post by edgore » Thu Apr 24, 2008 9:19 pm

Hey there,

Just got 2.9 and in the bit about using Active scripting there is an example Applescript that will casue the finder to display a folder window. I would like to do exactly the same thing in windows using active script, but have not been able to find anything on the internets about the active script commands that would do this.

Anyone have any ideas?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5132
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Apr 24, 2008 11:38 pm

Edgore,

get shell("start" && quote & quote && quote & "the path to your folder" & quote)

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

edgore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 197
Joined: Wed Jun 14, 2006 8:40 pm

Post by edgore » Fri Apr 25, 2008 10:49 pm

Looks like I am still having some issues. I used the script you suggesteed, but I get an error back form windows saying that it can't find the folder.

The script I used was:

get shell("start" && quote & quote && quote & the defaultFolder&"/"&chNum&"/" & quote)

- I tried it both with and without the trailing slash

The actual folder path (copied right out of explorer) is:
\\DocControl.change.shinra.com\changes\Changes_Open\ch1111111
(It's a network share that is not mapped to a drive - Revolution had no trouble creating the folder without a drive mapping)

The error message from windows is:

Windows cannot find "\\DocControl.change.shinra.com\changes\Changes_Open\ch1111111". Make sure you typed the name correcty. and then try again. To search for a file, click the start button, and then click search"

I'm guessing that the problem has to do with the drive not being mapped to a letter, but in the environemnt this will be deployed I cannot count on consistant drive mapping for this drive.

Thanks for your help with this - I really appreciate it.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5132
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Fri Apr 25, 2008 11:01 pm

Hi edgore,

You go ta few slashes wrong there.

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

edgore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 197
Joined: Wed Jun 14, 2006 8:40 pm

Post by edgore » Fri Apr 25, 2008 11:20 pm

I don't follow - assume I am very, very dense.

edgore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 197
Joined: Wed Jun 14, 2006 8:40 pm

Post by edgore » Fri Apr 25, 2008 11:29 pm

Oh, duh. Because this is going out to the os directly Rev's auto fiddling of slashes to the correct format for the platform is not happening and I need to do it myself! Thanks!

edgore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 197
Joined: Wed Jun 14, 2006 8:40 pm

Post by edgore » Fri Apr 25, 2008 11:32 pm

Yep - that worked perfectly! Thanks again!

Post Reply

Return to “Windows”