i have the executable files, now how to create the GUI
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 108
- Joined: Sun Mar 15, 2009 11:51 pm
Ok i have run into a problem that i didnt expect.
I have done two of the tools now and both work.
However they will only work when getting the data from one folder.
What i mean by that is, lets say for example.
The n10w070.hgt.zip file is in e:\Terragear\Tools
i can select it, put the output path in and extract the contents of it perfectly.
both tools work fine like that.
If i happened to move n10w070.hgt.zip to c:\Terragear\work and try the same process, the tool doesnt work.
I put the file back into E:\Terragear\Tools and it works again.
I used the standalone features to create the standalone application.
But i'm a bit baffled by this..
Alex
I have done two of the tools now and both work.
However they will only work when getting the data from one folder.
What i mean by that is, lets say for example.
The n10w070.hgt.zip file is in e:\Terragear\Tools
i can select it, put the output path in and extract the contents of it perfectly.
both tools work fine like that.
If i happened to move n10w070.hgt.zip to c:\Terragear\work and try the same process, the tool doesnt work.
I put the file back into E:\Terragear\Tools and it works again.
I used the standalone features to create the standalone application.
But i'm a bit baffled by this..
Alex
-
- Posts: 108
- Joined: Sun Mar 15, 2009 11:51 pm
-
- Posts: 344
- Joined: Tue Feb 24, 2009 6:14 pm
- Contact:
If you bring up the messagebox and type
you'll see several lines of useful things, but a period isn't one of them. Seems like it should be, but you'll have to use "." (a dot surrounded by quotes) instead.
Code: Select all
put the constantnames
-
- Posts: 344
- Joined: Tue Feb 24, 2009 6:14 pm
- Contact:
-
- Posts: 344
- Joined: Tue Feb 24, 2009 6:14 pm
- Contact:
-
- Posts: 108
- Joined: Sun Mar 15, 2009 11:51 pm
***solved****
It had nothing to do with paths etc.
basically there is an unzippping facility within the folder that the tools are kept. If you dont unzip the file before using the tools, then they need to be in the same folder as the tool, so that the tool can unzip them first.
If you pre-unzip them they can be anywhere.
It,s amazing what a few hours sleep can do.
It had nothing to do with paths etc.
basically there is an unzippping facility within the folder that the tools are kept. If you dont unzip the file before using the tools, then they need to be in the same folder as the tool, so that the tool can unzip them first.
If you pre-unzip them they can be anywhere.

It,s amazing what a few hours sleep can do.
-
- Posts: 108
- Joined: Sun Mar 15, 2009 11:51 pm
If i have a text field that i want to include if there is something in it or if it is empty to skip it.
can i use something like.
i know else and if are involved!
basically the next tool has a lot of options, i want it to check the field if it has any text to include it in the final options, if not to skip but not leave a blank space.
can i use something like.
Code: Select all
if tfield is not empty then
put it in "foo"
else
basically the next tool has a lot of options, i want it to check the field if it has any text to include it in the final options, if not to skip but not leave a blank space.
something like, certainly:
An "end if" is always required, "else" is only required if there is an alternative action to be taken. "end if" on its own implies "else do nothing"
On the other hand, if tField is actually empty, then putting it into "foo" will result in "foo" being empty too, so it wouldn't have caused a space to be generated.
Code: Select all
if tField is not empty then
put tField into <foo>
--<foo> is whatever container, rather than a quoted literal, btw
end if
On the other hand, if tField is actually empty, then putting it into "foo" will result in "foo" being empty too, so it wouldn't have caused a space to be generated.
Last edited by SparkOut on Thu Mar 19, 2009 12:49 pm, edited 1 time in total.
-
- Posts: 108
- Joined: Sun Mar 15, 2009 11:51 pm
No, it won't automatically skip the field, but the result should be the same.
If tFfoo is a variable, then until I put something into it it is empty.
So if I
The answer dialog displays "This linehas no gap" because tFoo's contents are empty.
If I have a field "fldFoo" that is empty, then if Ithen because field "fldFoo" was empty then tFoo is still empty (or is now empty, even if it had some data in it before). Rev still went through the motions of putting the field contents into the variable, it just happens that there was nothing in the source, so there's still nothing in the destination. So the answer dialog will be "This linestill has no gap".
If field "fldFoo" happens to have a space in it, then it is not empty - it contains data - just something that is not typically a visible item when displayed in a field on screen.
If tFfoo is a variable, then until I put something into it it is empty.
So if I
Code: Select all
answer "This line" & tFoo & "has no gap"
If I have a field "fldFoo" that is empty, then if I
Code: Select all
put field "fldFoo" into tFoo
answer "This line" & tFoo & "still has no gap"
If field "fldFoo" happens to have a space in it, then it is not empty - it contains data - just something that is not typically a visible item when displayed in a field on screen.
-
- Posts: 108
- Joined: Sun Mar 15, 2009 11:51 pm
-
- Posts: 108
- Joined: Sun Mar 15, 2009 11:51 pm
does this look about right?
I'm somewhere close i think. the tools not running, the command box comes up and makes the suggested usage (gives the order that the options are put in)
(quoted from the commandline)
they look like they are being selected in the right order in the script.
GUI looks like this

I'm somewhere close i think. the tools not running, the command box comes up and makes the suggested usage (gives the order that the options are put in)
(quoted from the commandline)
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\alex>e:\terragear\genapts.exe
Usage e:\terragear\genapts.exe --input=<apt_file> --work=<work_dir> [ --start-id
=abcd ] [ --nudge=n ] [--min-lon=<deg>] [--max-lon=<deg>] [--min-lat=<deg>] [--m
ax-lat=<deg>] [ --airport=abcd ] [--tile=<tile>] [--chunk=<chunk>]
they look like they are being selected in the right order in the script.
Code: Select all
on mouseUp
local tShellCommand
put field "aptdatfld" into taptdatfld
put field "workdirfld" into tworkdirfld
if field "startidfld" is not empty then
put "startidfld" into tstartidfld
end if
if field "nudgefld" is not empty then
put "nudgefld" into tnudgefld
end if
if field "minlonfld" is not empty then
put "minlonfld" into tminlonfld
end if
if field "maxlonfld" is not empty then
put "maxlonfld" into tmaxlonfld
end if
if field "minlatfld" is not empty then
put field "minlatfld" into tminlatfld
end if
if field "maxlatfld" is not empty then
put field "maxlatfld" into tmaxlatfld
end if
if field "icaofld" is not empty then
put "icaofld" into ticaofld
end if
if field "chunkfld" is not empty then
put "chunkfld" into tchunkfld
end if
--put space & quote & quote into tShellCommand
--the above line puts an empty pair of quotes to be the
--first parameter passed to the shell command which is
--necessary to act as the dummy console window "title"
--if setHideConsoleWindows is true
--so you will need to uncomment the line when you do that.
put space & "genapts" & space after tShellCommand
put space & taptdatfld & space after tShellCommand
put space & tworkdirfld after tShellCommand
put space & tstartidfld after tshellcommand
put space & tnudgefld after tshellcommand
put space & tminlonfld after tshellcommand
put space & tmaxlonfld after tshellcommand
put space & tminlatfld after tshellcommand
put space & tmaxlatfld after tshellcommand
put space & ticaofld after tshellcommand
put space & tchunkfld after tshellcommand
answer "About to:" && quote & "start" & tShellCommand & quote
get shell ("start" & tShellCommand)
end mouseUp

Looks like you have to specify the switches longhand for this app.
It's expecting the "--input=" to be included along with the parameter itself.
Try etc. etc.
It's expecting the "--input=" to be included along with the parameter itself.
Try
Code: Select all
put "--input=" & field "aptdatfld" into taptdatfld
put "--work=" & field "field "workdirfld" into tworkdirfld