.AUTO File Tips and Tricks

SASHIMI Installer. Post any questions, comments, requests regarding SASHIMI here.

.AUTO File Tips and Tricks

Postby bengalih » Tue May 26, 2009 5:21 pm

So...

Many people have issues properly creating .AUTO files. This is one of the major questions for help that gets asked around here. I understand too that it doesn't help that I have had to change the .AUTO file syntax a few times as SASHIMI has developed (it was necessary!).

Anyway, in this thread I will attempt to put up example .AUTO files. This in not meant to be a repository, but rather some examples that should help you understand how to create your own.

The basic syntax for .AUTO files is in the documentation, so please read up on that first.

I hope this helps!

If you have an application that you need help creating an .AUTO file for, please submit the name, as well as a public download link. I will try to make a few examples based on user requests and hopefully add to everyone's knowledge to create these for yourself.
User avatar
bengalih
Site Admin
 
Posts: 405
Joined: Fri Oct 10, 2008 6:01 pm

Re: .AUTO File Tips and Tricks

Postby bengalih » Tue May 26, 2009 5:51 pm

EXAMPLE #1 - Resco Audio Recorder - Multilingual

For our first example I am going to start us out with a real tough one! It looks easy but is deceptively difficult for such a simple task. This problem was submitted by user ippoglosso and deals with automating the install of Resco Audio Recorder for an Italian install. You can get the multilingual copy here if you would like to play along.

The below shows the screen which must be automated for the .cab file. This screen comes up after the standard install location screen:

Image

Now what is interesting about this screen is that although it is the active/top screen, it will not respond to any key presses. This is pretty bad coding from Resco, as it requires you to actually click on the screen. Usually, you can toggle to various boxes (like the language or the OK button) using things like the arrow or tab keys. But, unfortunately that doesn't work here and requires us to actually tap on the screen somewhere on the list of languages.

Image

Once we have clicked on the list of languages, it drops down as you see above. Since we want to choose the Italian language we want to move 3 down the list from the default of English. Luckily, here the down arrows work, so I can press down 3 times.

Image

Now we see Italian highlighted. I can now hit the enter key (CR) to select Italian.

Image

Now once that is selected, I need to click ok to continue the install.

So, let's summarize what needs to be done in order to automate this procedure:

1 - Click on the box of languages
2 - Press down 3 times
3 - Press Enter
4 - Click OK

Now that we know the commands we need to send, we have to automate them in our .AUTO file.

Let's start with the top section of our .AUTO file:

Code: Select all
[AutoFile]
InstallLocation = 0
WindowTitle = "Select Language"


This is pretty straightforward and described in the SASHIMI documentation. We define that we want this cab installed to device memory ("0") and we define the name of the window that pops up that we want to automate. In this case the name of the window is "Select Language" which is pretty evident from the screen shots above.

The hard part now is coming up with the right script commands. Below are the commands that are needed to replicate our 4 steps above:

Code: Select all
[ScriptCommands]
1 = MouseClick("Select Language",100,45)
2 = SendDown
3 = SendDown
4 = SendDown
5 = SendCR
6 = SendOK


I will explain what each line does:

1 - Simulates a mouse click on the "Select Language" window at coordinates 100,45 (of the window itself). To find these coordinates I needed to take a screen shot and open it up in paint to determine the coordinates (see pic below). Any set of coordinates will work as long as it is somewhere within the drop down box.

Image

2 - Sends the down key to select the next language on the list.

3 - Same as above

4 - Same as above - this is the last time we need to press down to get Italian selected.

5 - Sends enter/carriage return to select the highlighted language

6 - Sends OK to continue with our selection.

So, the completed .AUTO file should look like this:

Code: Select all
[AutoFile]
InstallLocation = 0
WindowTitle = "Select Language"

[ScriptCommands]
1 = MouseClick("Select Language",100,45)
2 = SendDown
3 = SendDown
4 = SendDown
5 = SendCR
6 = SendOK


However, if you use this .AUTO file it may not work for you...it didn't for me! Why not? Well sometimes the .AUTO file commands process a little too quickly for what we need and the device doesn't register all of the commands. One trick to use to help out here is to place a small pause after each command to give the device a change to catch up. Below I have recreated the .AUTO file with a 250ms (quarter of a second) pause between each line:

Code: Select all
[AutoFile]
InstallLocation = 0
WindowTitle = "Select Language"

[ScriptCommands]
01 = Sleep(250)
02 = MouseClick("Select Language",100,45)
03 = Sleep(250)
04 = SendDown
05 = Sleep(250)
06 = SendDown
07 = Sleep(250)
08 = SendDown
09 = Sleep(250)
10 = SendCR
11 = Sleep(250)
12 = SendOK


This .AUTO file will give the device enough time to process the commands and will successfully install the application with our selected Italian language.

* Also note that when you have more than 9 script commands in your .AUTO file you should label them as I have above (01,02,03,...) instead of just 1,2,3 this is because of a sorting issue with Mortscript.

So this was a tough one to automate mostly because of the mouse click issue and also because of the timing issue (fixed with the "sleep" statements)!

For more information on any of the commands I have used (and additional commands) refer to the Mortscript documentation here.
User avatar
bengalih
Site Admin
 
Posts: 405
Joined: Fri Oct 10, 2008 6:01 pm

Re: .AUTO File Tips and Tricks

Postby bengalih » Tue May 26, 2009 5:52 pm

EXAMPLE #2 - Reserved
User avatar
bengalih
Site Admin
 
Posts: 405
Joined: Fri Oct 10, 2008 6:01 pm

Re: .AUTO File Tips and Tricks

Postby bengalih » Tue May 26, 2009 5:52 pm

EXAMPLE #3 - Reserved
User avatar
bengalih
Site Admin
 
Posts: 405
Joined: Fri Oct 10, 2008 6:01 pm

Re: .AUTO File Tips and Tricks

Postby bengalih » Tue May 26, 2009 5:53 pm

EXAMPLE #4 - Reserved
User avatar
bengalih
Site Admin
 
Posts: 405
Joined: Fri Oct 10, 2008 6:01 pm

Re: .AUTO File Tips and Tricks

Postby bengalih » Tue May 26, 2009 5:53 pm

EXAMPLE #5 - Reserved
User avatar
bengalih
Site Admin
 
Posts: 405
Joined: Fri Oct 10, 2008 6:01 pm

Re: .AUTO File Tips and Tricks

Postby bengalih » Tue May 26, 2009 5:53 pm

EXAMPLE #6 - Reserved
User avatar
bengalih
Site Admin
 
Posts: 405
Joined: Fri Oct 10, 2008 6:01 pm

Re: .AUTO File Tips and Tricks

Postby bengalih » Tue May 26, 2009 5:53 pm

EXAMPLE #7 - Reserved
User avatar
bengalih
Site Admin
 
Posts: 405
Joined: Fri Oct 10, 2008 6:01 pm

Re: .AUTO File Tips and Tricks

Postby bengalih » Tue May 26, 2009 5:53 pm

EXAMPLE #8 - Reserved
User avatar
bengalih
Site Admin
 
Posts: 405
Joined: Fri Oct 10, 2008 6:01 pm

Re: .AUTO File Tips and Tricks

Postby bengalih » Tue May 26, 2009 5:53 pm

EXAMPLE #9 - Reserved
User avatar
bengalih
Site Admin
 
Posts: 405
Joined: Fri Oct 10, 2008 6:01 pm

Next

Return to SASHIMI

Who is online

Users browsing this forum: No registered users and 1 guest