Using t commands in other ash file

Lorenzo

New Member
Joined
Sep 11, 2015
Messages
6
Reaction score
0
Country
Italy
Hello everyone!

The question is...
Can I use the t commands in another file that is not autoexec.ash?

I put a test.ash file in tmp with this code inside:

sleep 3
t app appmode photo
sleep 2
t app photo_size 12W
sleep 2
t app button shutter PR

But when I exec it give me this message:

/tmp # ash test.ash
ash test_lo.ash
test_lo.ash: line 2: t: not found
test_lo.ash: line 4: t: not found
test_lo.ash: line 6: t: not found
 
You can use any filename as you want and execute it from camera console.
Im pretty sure you doesnt have UNIX EOL formatting in your test.ash script.

Edit your file with notepad++ for example and in edit menu you have to choose UNIX eol. Save and launch, should be good.
 
Thank you for reply!
I tried copying an ash file from a project on git and putting in my code.
I tried create a ash file directly on camera in tmp folder with this command:
echo $'sleep 5\nt app key shutter\n' > test_lo.ash

But the "t" command is not found...
 
Thank you for reply!
I tried copying an ash file from a project on git and putting in my code.
I tried create a ash file directly on camera in tmp folder with this command:
echo $'sleep 5\nt app key shutter\n' > test_lo.ash

But the "t" command is not found...

Every time when you edit the file it will change EOL sow downloading from git and editing will not work.
Below I uploaded file with proper format with code from your first post.
 

Attachments

  • autoexec.zip
    184 bytes · Views: 10
thanks a lot for reply and file!
I tried again, putting the file in tmp and running the command ./autoexec-3.ash
but continues to tell me that does not find the command "t".
I do not understand why putting it in the root of the sd card works and launched from the command line no.
I would like to run it when I need through another sh script.
 
There are two operating systems on the camera. One is Linux and one is uItron. The commands in autoexec.ash are run in the uItron OS. When you telnet into the camera you are telnetting into the Linux OS. It doesn't have access to those commands.
 
Thank you for the information!
Can you point me to the uItron documentation?
I need to check if a file on sd card exists in uItron script and not with lu_util command.
 
Sorry, I don't know anything about the uItron OS.
 
Back
Top