115 posts
Posted 19 April 2015 - 05:13 PM
There is a glitch in my code…and I can not fix it. It is an Explorer App. And when I click on a file, it says "No Such Program", except for if I haven't clicked on a folder yet. This is the code:
http://pastebin.com/M47EVgyWTake that code and use it, click on a folder, like rom. Then click on a file. and you get "No such Program".
I don't know what the reason is. But it seems to happen, if there was a fix, that'd be great!
1140 posts
Location
Kaunas, Lithuania
Posted 19 April 2015 - 05:16 PM
Have you tried to look at the code yourself and debug it?
shell.run(directory.."/"..Exlist[i].Name) <-- here
115 posts
Posted 19 April 2015 - 05:16 PM
Yes, I did.
Oh… :(/>
Man, I didn't see a typo. I feel like an idiot. But It still says "No such program"
Edited on 19 April 2015 - 03:17 PM
1140 posts
Location
Kaunas, Lithuania
Posted 19 April 2015 - 05:17 PM
And what was the value of 'Exlist.Name'?
115 posts
Posted 19 April 2015 - 05:18 PM
And what was the value of 'Exlist.Name'?
It was accually list
.Name, that was a typo. But, it's the files name. like "Startup"
1140 posts
Location
Kaunas, Lithuania
Posted 19 April 2015 - 05:24 PM
Have you checked the output of:
print( directory.."/"..list[i].Name )
Edited on 19 April 2015 - 03:24 PM
115 posts
Posted 19 April 2015 - 05:25 PM
Have you checked the output of:
print( directory.."/"..list[i].Name )
No, but I've done: print(list
.Name)
EDIT:
I clicked Programs.
and I got:
rom/programs
and: Why is google a user on here?
Edited on 19 April 2015 - 03:28 PM
115 posts
Posted 19 April 2015 - 05:33 PM
Uh, can you guys help pls.
1080 posts
Location
In the Matrix
Posted 19 April 2015 - 06:27 PM
If you used print(list.Name) and it printed out rom/programs, then the reason you're getting no such file is that directory is probably rom as well, so you're printing out rom/rom/programs
115 posts
Posted 19 April 2015 - 06:32 PM
If you used print(list.Name) and it printed out rom/programs, then the reason you're getting no such file is that directory is probably rom as well, so you're printing out rom/rom/programs
I used print(directory.."/"..list
.Name) and got "rom/programs"
1080 posts
Location
In the Matrix
Posted 19 April 2015 - 06:41 PM
And you're trying to shell.run rom/programs?
Edit, no i'm a derp
Edit2: What line is this print on?
Edited on 19 April 2015 - 04:48 PM
3057 posts
Location
United States of America
Posted 19 April 2015 - 07:35 PM
It's on line 128 of the pastebin.
I'd recommend printing the directory too.
1080 posts
Location
In the Matrix
Posted 19 April 2015 - 07:47 PM
It's on line 128 of the pastebin.
I'd recommend printing the directory too.
He hasn't updated the pastebin from what he's given us. That pastebin is his first try and it was pasted on a guest account.
115 posts
Posted 19 April 2015 - 08:10 PM
Edited on 19 April 2015 - 06:13 PM
957 posts
Location
Web Development
Posted 19 April 2015 - 08:11 PM
and: Why is google a user on here?
If I had to guess, I'd say its so that google can search the forums for results