Street Posted March 19, 2005 Posted March 19, 2005 The problem im finding is that the divx player application stats with unrecognized format. Here is what i mean. Applications need to be launched in a dos like environment. EG: Divx_Player.exe "No White spaces" The problem is that Divx has a application name with a white space EG: Divx Player.exe So im trying to make a GUI with a Button to open DivX when pressed im lost as to how to try and get the script to ignore the white space. Can someone help out here please. Here is my Run structure Run("q:\DivX\DivX Player\DivX Player.exe") I know i can change the name of the file to get rid of the white space. Problem with that is Windows will loose some of its ability to recognize how to open some files with Divx then.
Street Posted March 19, 2005 Author Posted March 19, 2005 Very odd ive been working and fooling around with this and all of a sudden it started to open up correctly no code change to the command path. Very odd. Well thx for takeing a look at my post anyways in a attempt to try to help me out.
eJan Posted March 19, 2005 Posted March 19, 2005 Try this way: Quote $divx = FileGetShortName("C:\Program Files\DivX\DivX Player\DivX Player.exe")Run($divx)FileGetShortName= Returns the 8.3 short path+name of the path+name passed.
therks Posted March 19, 2005 Posted March 19, 2005 (edited) Orrrr.Run('"C:\Program Files\DivX\DivX Player\DivX Player.exe"')Notice the ' (apostrophe) on either end of the string. This tells the string that you want it to contain " marks instead of seeing them as the delimiter to the string.You can also double the quotation marks.IE: Both of these examples work fine:$string = "He said, ""Hello."" Then I exploded." $string = 'He said, "Hello." Then I exploded.'They both return:He said, "Hello." Then I exploded.Edit: This is handy for when you want to pass arguments that might contain a space.Like:Run('"C:\Program Files\DivX\DivX Player\DivX Player.exe" "C:\Documents and Settings\User\My Documents\My Videos\Transformers - The Movie.mpeg"')Or should that be .avi... eh, whatever. Edited March 19, 2005 by Saunders My AutoIt Stuff | My Github
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