marshallprank Posted March 30, 2011 Share Posted March 30, 2011 Hi, i have the command: $rc = _RunDos("start " & @ScriptDir & '"\Template\abc2.gts"') Itis not working because my ScriptDir is C:\New folder --> the name contains space. How can i solve it? Regards Link to comment Share on other sites More sharing options...
jvanegmond Posted March 30, 2011 Share Posted March 30, 2011 Hi, i have the command: $rc = _RunDos("start " & @ScriptDir & '"\Template\abc2.gts"') Itis not working because my ScriptDir is C:\New folder --> the name contains space. How can i solve it? Regards Take a look at the problem outside of AutoIt context. How would you solve to run: start C:\New Folder\Template\abc2.gts Yes, you would enclose it in quotes: start "C:\New Folder\Template\abc2.gts" Then you can use the solution in AutoIt: $rc = _RunDos("start """ & @ScriptDir & "\Template\abc2.gts""") github.com/jvanegmond Link to comment Share on other sites More sharing options...
hannes08 Posted March 30, 2011 Share Posted March 30, 2011 Hi marshallprank, why not use ShellExecute() instead? Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
marshallprank Posted March 30, 2011 Author Share Posted March 30, 2011 hi @Manadar: it is not working :-(. when i give this Code, i get the DOS-Windows. @Hannes123: With Shellexecute you can not use this extension .gts :-) Link to comment Share on other sites More sharing options...
DarkestHour Posted March 30, 2011 Share Posted March 30, 2011 @Hannes123: With Shellexecute you can not use this extension .gts :-)You can most definitely call an extension .gtsShellExecute uses the Program Associations in windows, i would recommend setting it up with that, then use shellexecute to just run the file, Windows should handle it from there. Out of curiosity, what is the .gts file for? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 30, 2011 Moderators Share Posted March 30, 2011 marshallprank, I thought you had solved this yesterday? Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
marshallprank Posted March 31, 2011 Author Share Posted March 31, 2011 Hi all no i still have the problem. .gts is an extension for a private tool. Link to comment Share on other sites More sharing options...
hannes08 Posted March 31, 2011 Share Posted March 31, 2011 Hi allno i still have the problem. .gts is an extension for a private tool.Well probably if you can start it via DOS start command you should be able to start it via ShellExecute(). What happens if you double-click the file? Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
marshallprank Posted March 31, 2011 Author Share Posted March 31, 2011 the problem is the blanck in the directoryName @Script. Link to comment Share on other sites More sharing options...
whim Posted March 31, 2011 Share Posted March 31, 2011 Make sure you surround your paths with double quotes.Check Help File -> Using AutoIt -> Language Reference -> Variables, where you'll findhow to include them in your strings:Strings are enclosed in double-quotes like "this". If you want a string to actually contain a double-quote use it twice like: "here is a ""double-quote"" - ok?"You can also use single-quotes like 'this' and 'here is a ' 'single-quote' ' - ok?'You can mix quote types to make for easier working and to avoid having to double-up your quotes to get what you want. For example if you want to use a lot of double-quotes in your strings then you should use single-quotes for declaring them: 'This "sentence" contains "lots" of "double-quotes" does it not?'is much simpler than: "This ""sentence"" contains ""lots"" of ""double-quotes"" does it not?"When evaluated, strings can have Env variables or Var variables substitution according to Opt() function definition. Link to comment Share on other sites More sharing options...
marshallprank Posted March 31, 2011 Author Share Posted March 31, 2011 ok thanks Link to comment Share on other sites More sharing options...
hannes08 Posted March 31, 2011 Share Posted March 31, 2011 Make sure you surround your paths with double quotes. Check Help File -> Using AutoIt -> Language Reference -> Variables, where you'll find how to include them in your strings: Then you can use the solution in AutoIt: $rc = _RunDos("start """ & @ScriptDir & "\Template\abc2.gts""") Well, Manadar happened to mention this earlier, right? Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now