i have the executable files, now how to create the GUI

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

maverickalex
Posts: 108
Joined: Sun Mar 15, 2009 11:51 pm

Post by maverickalex » Mon Mar 23, 2009 11:07 pm

i figured out the crashes anyway.
I was selecting shared from the folderlist, when in reality THAt folder is produced as a result of the fgfs construct tool. it was there from my previous use with the command line.

The only prob i have is the xdistfld not showing the value.

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Tue Mar 24, 2009 8:40 am

Code: Select all

put "xdistfld" into txdistfld
seems to be the wrong line, it's putting the literal "xdistfld" into the variable, not the contents of the field as it should be

Code: Select all

put field "xdistfld" into txdistfld
HTH!

maverickalex
Posts: 108
Joined: Sun Mar 15, 2009 11:51 pm

Post by maverickalex » Tue Mar 24, 2009 10:17 am

:shock:
i couldn't see that for looking........

Thanks, that's working a treat now.

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Tue Mar 24, 2009 11:03 am

I swear some lines of code play leapfrog when you're looking at a script and trying to figure out what's wrong. They can't always do it the same way for different eyes though, so it's always handy to get someone else to look. :)

maverickalex
Posts: 108
Joined: Sun Mar 15, 2009 11:51 pm

Post by maverickalex » Wed Mar 25, 2009 3:26 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
Image

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 
What i need at the end of the command line is the name of the shapefile. with the first character changed to Capitals.

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.)
i have this script

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 mouseUp
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

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Post by mwieder » Wed Mar 25, 2009 6:52 pm

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

ranjana
Posts: 2
Joined: Fri Apr 24, 2009 7:45 am

Code to generate .hgt files from .btg files

Post by ranjana » Fri Apr 24, 2009 10:56 am

I am in need of the code or steps which converts .btg file to .hgt file....Please reply as soon as possible.....Thank you

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Fri Apr 24, 2009 11:37 am

Sorry, this is a Revolution forum, not a Flightgear forum. I don't think anyone here has the slightest idea what the tools are. We've just been helping Alex wrap up the tools in a Revolution gui to make it simpler to run. You'd be better off asking in a Flightgear / Flight simulator related site.

ranjana
Posts: 2
Joined: Fri Apr 24, 2009 7:45 am

Thank you

Post by ranjana » Sat Apr 25, 2009 10:38 am

Thank you so much

Post Reply