I have built a simple game that looks in a folder of photos, randomly picks one and shows it to you with 4 name buttons. Its a great tool for us to learn peoples names and faces. I have however a need to get this game mobile but the thing with USB sticks is they don't always receive the same drive letter with different PC's.
Is there a way to check the file location of the app.exe when it opens and set the default directory to that location?
set the defaultfolder to USB drive
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
set the defaultfolder to USB drive
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: set the defaultfolder to USB drive
And on the Mac you don't even have "drive letters"!
You can always check "the filename of this stack" and strip out everything you don't need.
However on a Mac you need to add "/Volumes/" before that name of the USB Stick:
/Volumes/MyStick
You can always check "the filename of this stack" and strip out everything you don't need.
Code: Select all
...
set itemdel to "/"
## Windows
answer "Drive letter of this USB Stick:" && item 1 of the filename of this stack
## On a Mac:
answer "This volume is named:" & item 3 of the filename of this stack
...
/Volumes/MyStick
Re: set the defaultfolder to USB drive
Thank you, I will give that a shot. Also if anyone feels that this would be a useful tool Its very simple and took only a few hours to write back when I had no clue as to what I was doing with livecode, but I am more than wiling to share it with anyone so that you don't have to.
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: set the defaultfolder to USB drive
Have you tried accessing a USB drive from a mobile device? The last time I tried it you need special hardware adapters and software, at least on Android. I'm not sure how iOS handles it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com