Sign in to follow this  
Followers 0
Recce

[Solved] Translate a Complex dos command into AutoIT language?

13 posts in this topic




#include <Process.au3>
$COMMAND = '"C:\Pfps\MPU\KML2SHP&GPX\gpsbabel" -w -r -i kml -f "C:\Pfps\MPU\KML2SHP&GPX\Input KML\Google Earth Kml - Overskriv denne fil.kml" -x transform,rte=trk,del=y -o gpx -F "C:\Pfps\MPU\KML2SHP&GPX\temp.gpx"'
_RunDOS($COMMAND)


When the words fail... music speaks

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Here is the complex code form the working batch file:

"C:\Pfps\MPU\KML2SHP&GPX\gpsbabel" -w -r -i kml -f "C:\Pfps\MPU\KML2SHP&GPX\Input KML\Google Earth Kml - Overskriv denne fil.kml" -x transform,rte=trk,del=y -o gpx -F "C:\Pfps\MPU\KML2SHP&GPX\temp.gpx"

Here is what I have tried with no luck:

#include <Process.au3>
_RunDOS("""C:\Pfps\MPU\KML2SHP&GPX\gpsbabel"" -w -r -i kml -f ""C:\Pfps\MPU\KML2SHP&GPX\Input KML\Google Earth Kml - Overskriv denne fil.kml"" -x transform,rte=trk,del=y -o gpx -F ""C:\Pfps\MPU\KML2SHP&GPX\temp.gpx""")oÝ÷ Ù«­¢+ÙIÕ¹]¥Ð¡
½µMÁµÀìÅÕ½Ðì½ÅÕ½ÐìµÀìÌäìÅÕ½ÐìÅÕ½ÐìÌäìµÀìÅÕ½ÐíèÀäÈíAÁÌÀäÈí5ATÀäÈí-50ÉM!@µÀíA`ÀäÈíÁÍ°¹áÅÕ½ÐìµÀìÌäìÅÕ½ÐìÅÕ½ÐìµÜµÈµ¤­µ°µÅÕ½ÐíèÀäÈíAÁÌÀäÈí5ATÀäÈí-50ÉM!@µÀíA`ÀäÈí%¹ÁÕÐ-50ÀäÈí½½±ÉÑ -µ°´=ÙÉͭɥع¹¥°¹­µ°ÅÕ½ÐìµàÑɹͽɴ±ÉÑõÑɬ±°õäµ¼ÁàµÅÕ½ÐíèÀäÈíAÁÌÀäÈí5ATÀäÈí-50ÉM!@µÀíA`ÀäÈíѵÀ¹ÁàÅÕ½ÐìÅÕ½ÐìÌäì°ÅÕ½ÐìÅÕ½Ðì°M]}!%

And before you ask. I did use the help file and Search :P

Please help a :unsure:

Edited by Recce

Share this post


Link to post
Share on other sites

Thank you Andreik for you (extreme fast) response

What you do man? Why create another thread?

http://www.autoitscript.com/forum/index.ph...st&p=649555

Sorry I meant to post in "General Help and Support "

#include <Process.au3>
$COMMAND = '"C:\Pfps\MPU\KML2SHP&GPX\gpsbabel" -w -r -i kml -f "C:\Pfps\MPU\KML2SHP&GPX\Input KML\Google Earth Kml - Overskriv denne fil.kml" -x transform,rte=trk,del=y -o gpx -F "C:\Pfps\MPU\KML2SHP&GPX\temp.gpx"'
_RunDOS($COMMAND)
New to me!

But not working on this DOS command. Sorry.

Share this post


Link to post
Share on other sites

What you do man? Why create another thread?

http://www.autoitscript.com/forum/index.ph...st&p=649555

Probably because he put in in the wrong forum (example scripts)

[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Share this post


Link to post
Share on other sites

Thank you Andreik for you (extreme fast) response

Sorry I meant to post in "General Help and Support "

New to me!

But not working on this DOS command. Sorry.

Check if your syntax is correct

When the words fail... music speaks

Share this post


Link to post
Share on other sites

This should work

RunWait(@ComSpec & ' /c ' & '"C:\Pfps\MPU\KML2SHP&GPX\gpsbabel.exe" -w -r -i kml -f "C:\Pfps\MPU\KML2SHP&GPX\Input KML\Google Earth Kml - Overskriv denne fil.kml" -x transform,rte=trk,del=y -o gpx -F "C:\Pfps\MPU\KML2SHP&GPX\temp.gpx"','', @SW_HIDE)oÝ÷ Øç¢ÚîØb²÷«²*'²ajܨ¹Æ§±ç°«mêk¡¹^+ºÚ"µÍ[ØZ]
ÛÛTÜXÈ  [È ÌÎNÈÚÈ ÌÎNÈ [È ÌÎNÉ][ÝÐÎÌLÔÉÌLÓTIÌLÒÓSÒ [ÑÔ   ÌLÙÜØX[^I][ÝÈ]ÈZHÛ[Y    ][ÝÐÎÌLÔÉÌLÓTIÌLÒÓSÒ    [ÑÔ   ÌLÒ[]ÓS  ÌLÑÛÛÙÛHXÛ[HÝÚÜ][H[Û[    ][ÝÈ^[ÙÜKO]Ë[^H[ÈÜQ  ][ÝÐÎÌLÔÉÌLÓTIÌLÒÓSÒ    [ÑÔ   ÌLÝ[Ü    ][ÝÉÌÎNË   ÌÎNÉÌÎNËÕ×ÔÒÕÊ

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Share this post


Link to post
Share on other sites

Not really helpful..but curious....What is it that you are trying to do with gpsbabel?

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

try this it should work.

#include <Process.au3>
_RunDOS("C:\Pfps\MPU\KML2SHP&GPX\gpsbabel -w -r -i kml -f " & "C:\Pfps\MPU\KML2SHP&GPX\Input KML\Google Earth Kml - Overskriv denne fil.kml " & "-x transform,rte=trk,del=y -o gpx -F " & "C:\Pfps\MPU\KML2SHP&GPX\temp.gpx")

RunWait(@ComSpec & " /c " & '""' & "C:\Pfps\MPU\KML2SHP&GPX\gpsbabel -w -r -i kml -f " & "C:\Pfps\MPU\KML2SHP&GPX\Input KML\Google Earth Kml - Overskriv denne fil.kml " & "-x transform,rte=trk,del=y -o gpx -F " & "C:\Pfps\MPU\KML2SHP&GPX\temp.gpx" , "", @SW_HIDE)
Edited by unixu

Share this post


Link to post
Share on other sites

#include <Process.au3>
_RunDOS("C:\Pfps\MPU\KML2SHP&GPX\gpsbabel -w -r -i kml -f " & "C:\Pfps\MPU\KML2SHP&GPX\Input KML\Google Earth Kml - Overskriv denne fil.kml " & "-x transform,rte=trk,del=y -o gpx -F " & "C:\Pfps\MPU\KML2SHP&GPX\temp.gpx")

RunWait(@ComSpec & " /c " & '""' & "C:\Pfps\MPU\KML2SHP&GPX\gpsbabel -w -r -i kml -f " & "C:\Pfps\MPU\KML2SHP&GPX\Input KML\Google Earth Kml - Overskriv denne fil.kml " & "-x transform,rte=trk,del=y -o gpx -F " & "C:\Pfps\MPU\KML2SHP&GPX\temp.gpx" , "", @SW_HIDE)

Share this post


Link to post
Share on other sites

I needed to remove the " from:

"C:\Pfps\MPU\KML2GPX\gpsbabel.exe"

It gives no sense to me but now it works!

Thank you all for you patients!

JasonLA:

I am in the process of transforming a drawing from Google Earth into a GPS track or route.

Share this post


Link to post
Share on other sites

You can do it using only an AutoIt script. See examples scripts section. Today.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0