Opening a folder in Windows

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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 »

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: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark »

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 »

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: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark »

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 »

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 »

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 »

Yep - that worked perfectly! Thanks again!
Post Reply