Moto Hell - The Motorola Modding Community
November 23, 2024, 01:56:29 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: The forum is no longer active and registration is disabled; however you can still fetch everything as guest.
 
   Home   Help Facebook Search Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: I start to write scripts in bash. Nothing works.  (Read 5582 times)
Negor
Guest
« on: November 01, 2008, 03:35:55 pm »

I've read some howto's and want to write sowe script on bash. And preferably that run in phone. Try to run script
Quote
         #!/ezxlocal/download/mystuff/ns/bash
           OPTIONS="Hello Quit"
           select opt in $OPTIONS; do
               if [ "$opt" = "Quit" ]; then
                echo done
                exit
               elif [ "$opt" = "Hello" ]; then
                echo Hello World
               else
                clear
                echo bad option
               fi
           done
But nothing happen. If i use telnet it's work. I olso try to run another script which develop for E2 but it not work from phone too. If i run it from telnet in the console says "showRadio:: command not found". Could somebodyexplain me how to create menus that can work from phone, if it possible
Logged
keaglez
Indonesian Motolover
PHD modder
***

Karma: 61
Offline Offline

Posts: 2562


http://jeffri.net


View Profile WWW
« Reply #1 on: November 01, 2008, 04:24:30 pm »

I've read some howto's and want to write sowe script on bash. And preferably that run in phone. Try to run script
Quote
         #!/ezxlocal/download/mystuff/ns/bash
           OPTIONS="Hello Quit"
           select opt in $OPTIONS; do
               if [ "$opt" = "Quit" ]; then
                echo done
                exit
               elif [ "$opt" = "Hello" ]; then
                echo Hello World
               else
                clear
                echo bad option
               fi
           done
But nothing happen. If i use telnet it's work. I olso try to run another script which develop for E2 but it not work from phone too. If i run it from telnet in the console says "showRadio:: command not found". Could somebodyexplain me how to create menus that can work from phone, if it possible
I donno if i can help, but probably....

You need to get show* binaries to your phone first, visit arctu website www.aktaeon.com...

You can use showList to show menu list (it can be a subtitute for showRadio if you want to port E2 script)

Maybe a simple script like this will work:
Code:
#!/ezxlocal/download/mystuff/ns/bash
export PATH=/ezxlocal/download/mystuff/ns:$PATH # copy all the show* binaries to this path
showList -t "Hello world!" -c "This is hello world script!" "Hello" "Quit"
if [ $? == 1 ]
then
  showQ "Hello" "Hello world!" 2;
elif [ $? == 2 ]
then
  exit 0
fi

hope it helps Smiley
Logged

Best regards,
Jeffri H.

Negor
Guest
« Reply #2 on: November 01, 2008, 04:35:48 pm »

Nope... your example not run from phone... I have show binaries module, but how it can help me?
Logged
keaglez
Indonesian Motolover
PHD modder
***

Karma: 61
Offline Offline

Posts: 2562


http://jeffri.net


View Profile WWW
« Reply #3 on: November 01, 2008, 04:53:59 pm »

and the error? Smiley show binaries is responsible to show GUI in your phone...
Logged

Best regards,
Jeffri H.

Negor
Guest
« Reply #4 on: November 01, 2008, 05:20:10 pm »

Cool))) It's alive) Ok, now i go to sleep but tomorow i continue to write scripts)
« Last Edit: November 01, 2008, 05:31:51 pm by Negor » Logged
Exploited
Administrator
Ultimate modder
*****

Karma: 109
Offline Offline

Posts: 5153



View Profile WWW
« Reply #5 on: November 01, 2008, 11:42:54 pm »

I hope you will share them Tongue
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Design By Forum Hosting
Powered by SMF 1.1.21 | SMF © 2015, Simple Machines