Shortcut Scripting Help


pedesh

Still Fresh
Joined
Jun 10, 2006
Messages
3
Can anyone tell me how to do what this guy did?
My SD-card tree is as follows:

Apps (shortcuts to apps)
Emulators (shortcuts to emus)
Games (shortcuts to games
Interpreters (shortcuts to interpreters)
data (actual programs the above link to)
--apps
--emulators
--games
--interpreters
roms
cpuspeed.gpe

Which is perfect and completely clutterless for me. Aside from initial lots of script making, it's no trouble.
how do you make the scripts?
 
Here are some examples; ones I use for my set-up:

DrMDx:

Code:
#!/bin/sh

/mnt/sd/cpu_speed 1 2 200 0.6
cd /mnt/sd/DrMD/
./DrMDx.gpe
sync

cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu

Atari800:

Code:
#!/bin/sh
/mnt/sd/cpu_speed 1 2 200 0.6
/mnt/sd/atari800.gpe
sync

cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu

The Minigame Project:

Code:
#!/bin/sh

cd /mnt/sd/
./cpu_speed.gpe 1 2 200 0.6

cd /mnt/sd/minigame
cd runtime
./fxi ../data/mp.dcb -nosplash -s266
sync
cd /usr/gp2x
exec /usr/gp2x/gp2xmenu

... I stick these scripts in a folder called "Apps & Emus", name each one 'Whatever_the_emu's_name_is.gpe" and lauch said emu from there. (note: the line "cpu_speed.gpe 1 2 200 0.6" launches the over-clocker/lcd tweaker app first, then the emulator.)

I'm sure others with a more eloquent grasp on the English language can explain it better, and I just ran out of time ... gotta play around with the Hu6280 beta :)
 
sry but im gonna need this even more simple as i still cant make it work

i just get a black screen when i try any of the scripts

:(
 
sry but im gonna need this even more simple as i still cant make it work

i just get a black screen when i try any of the scripts

:(
try running it from telnet, or terminal to see whats going on.
or point the script output to a file.
that's not going to help him because he doesn't even know what he is doing so I'm sure he doesn't know how to do that

if you set yours up just like that:
for DrMDx if it's in it's own folder:
Code:
#!/bin/sh

/mnt/sd/cpu_speed 1 2 200 0.6
cd /mnt/sd/data/emulators/DrMDx/
./DrMDx.gpe
sync

cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu

(the file you create will be placed in the Emulators folder)

I'll explain them now:
the "#!/bin/sh" is just needed

the "/mnt/sd/cpu_speed 1 2 200 0.6" runs the cpu_speed utility for over clocking, this part of the script runs it from the root, the 200 is the MHz and 0.6 is the gamma, I forget what the 1 and 2 are for, and you can change the 200 to like 266, 280 ect, and change the 0.6 if your screen is too bright still

the cd command changes to a folder, in this case it's the folder in the root of your SD (/mnt/sd = your root folder) Emulators/DrMDx

the next line it has "./" which is a short cut for current folder you are in so ./DrMDx.gpe runs the file DrMDx.gpe (if you have the new beta it might be DrMDv5b2.gpe

then the
"sync

cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu"
is just needed for a reason I'm not sure of

I think I explained that well...


if that didn't help look at this topic http://www.gp32x.de/board/index.php?s=&sh...ndpost&p=391277
 
Last edited by a moderator:
well if he would have read some readme's he would definitly have known how to redirect output from a script/program to a file...

just make a script that runs your original script,

and put this in it: "./<your script name here> > output.txt"
as simple as that, and most of the time you get some usefull messages like file not found or somthing so you know some of your paths are not correct.

and the "sync
cd /usr/gp2x/
exec /usr/gp2x/gp2xmenu"
is for writing the buffer to the sd card and then getting back to the gp2x menu once you exit the application.
 
Thx for all the help guys :)

Turns out all I was doing wrong from the start was not changing the line endings to unix in programmers notepad :huh:

That would be Tools > Line Endings > Unix (LF) for anyone reading this for help B)

Right now to get down to some serious scripting :lol:
 
Thx for all the help guys :)

Turns out all I was doing wrong from the start was not changing the line endings to unix in programmers notepad :huh:

That would be Tools > Line Endings > Unix (LF) for anyone reading this for help B)

Right now to get down to some serious scripting :lol:

Thank YOU, for posting how you got it worked out ... B)
 
Last edited by a moderator:
Back
Top