i have the executable files, now how to create the GUI
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
- 
				maverickalex
- Posts: 108
- Joined: Sun Mar 15, 2009 11:51 pm
Code: Select all
put "xdistfld" into txdistfldCode: Select all
put field "xdistfld" into txdistfld- 
				maverickalex
- Posts: 108
- Joined: Sun Mar 15, 2009 11:51 pm
- 
				maverickalex
- Posts: 108
- Joined: Sun Mar 15, 2009 11:51 pm
I have run into a problem with my GUI that prevents one of the tools working properly.
looking back, i think i new there may have been a problem.
In one of my tools

There is a shapefile menu
at the moment i bring the command line togther by selecting the folders and options required etc. which works fine.
I can hilite the required shapefile in the list.
the command line requires the .shp removing which is does fine.
The user creates a folder called "Road" or "Sand" whichever matches the shapefile.
Currently what i get is this
What i need at the end of the command line is the name of the shapefile. with the first character changed to Capitals.
ie
i have this script
so to clarify i need to add repeat whatever comes after the "_" and change the first character to a capital letter
which is where i'm at currently.
I think adding the extra part is a bit past my current knowledge base.
Thanks
			
			
									
									
						looking back, i think i new there may have been a problem.
In one of my tools

There is a shapefile menu
at the moment i bring the command line togther by selecting the folders and options required etc. which works fine.
I can hilite the required shapefile in the list.
the command line requires the .shp removing which is does fine.
The user creates a folder called "Road" or "Sand" whichever matches the shapefile.
Currently what i get is this
Code: Select all
shape-decode --line-width 10 --continue-on-errors --max-segment 1000 Shapefiles\v0_sand Work\v0_sand ie
Code: Select all
shape-decode --line-width 10 --continue-on-errors --max-segment 1000 Shapefiles\v0_sand Work\v0_sand Sand (added the last Sand, which could be Stream, Urban, Road etc.)Code: Select all
on mouseUp 
   local tShellCommand 
   if field "linewidthfld" is not empty then
   put "--line-width" & space & field "linewidthfld" into tlinewidthfld
      end if
   if field "pointwidthfld" is not empty then
      put "--point-width" & field "pointwidthfld" into tpointwidthfld
   end if
   if field "maxsegfld" is not empty then
      put "--max-segment" & space & field "maxsegfld" into tmaxsegfld
      end if
      if field "startrecfld" is not empty then
         put "--start-record" & field "startrecfld" into tstartrecfld
         end if
   if field "areafld" is not empty then
      put field "areafld" into tareafld
   end if
   if field "shapefilefolderfld" is not empty then
      put field "shapefilefolderfld" into tshapefilefolderfld
   end if
   if field "shapefilefld" is not empty then
      put field "shapefilefld" into tshapefilefld
   end if
   put line (the hilitedline of field "shapefilefld") of field "shapefilefld" into tshapefilefld
   replace ".shp" with empty in tshapefilefld
   if field"workfolderfld" is not empty then
      put field "workfolderfld" into tworkfolderfld
   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 & "shape-decode" & space after tShellCommand 
put space & tlinewidthfld & space after tShellCommand 
put space & tpointwidthfld & space after tshellcommand
put "--continue-on-errors" after tshellcommand
put space & tmaxsegfld after tShellCommand 
put space & tstartrecfld after tshellcommand
put space & tshapefilefolderfld after tshellcommand
put "\" & tshapefilefld after tshellcommand
put space & tworkfolderfld after tshellcommand
put space & tareafld after tshellcommand 
--answer "About to:" && quote & "start" & tShellCommand & quote 
get shell ("start" & tShellCommand) 
end mouseUpwhich is where i'm at currently.
I think adding the extra part is a bit past my current knowledge base.
Thanks
Code: Select all
set the itemdelimiter to "_"
put item -1 of tshellcommand into tFileName
put upper(char 1 of tFileName) into char 1 of tFileName
put space & tFileName after tshellcommand
Code to generate .hgt files from .btg files
I am in need of the code or steps which converts .btg file to .hgt file....Please reply as soon as possible.....Thank you
			
			
									
									
						 
 
