caschy Posted March 7, 2007 Share Posted March 7, 2007 Hi all, first: I took my first steps with AutoIt So, i will learn - but it's hard if you don't know where to start first. I've searching around a few hours - but i didn't find anything, that will help me. I wanna create my own launcher to use a portable Version of Firefox. I have a folder called "Firefox" Inside this folder is my profile-folder called "myprofile". If i call a batch will, this will work: @echo off cd firefox set MOZ_NO_REMOTE=1 start firefox.exe -profile "myprofile" set MOZ_NO_REMOTE=0 So, how to get this with AutoIt to work? Link to comment Share on other sites More sharing options...
lolp1 Posted March 7, 2007 Share Posted March 7, 2007 From the help file: Run ( "filename" [, "workingdir" [, flag[, standard_i/o_flag]]] ) Parameters filename The name of the executable (EXE, BAT, COM, or PIF) to run. workingdir [optional]The working directory. flag [optional] The "show" flag of the executed program: @SW_HIDE = Hidden window @SW_MINIMIZE = Minimized window @SW_MAXIMIZE = Maximized window standard_i/o_flag [optional] Provide a meaningful handle to one or more STD I/O streams of the child process. 1 ($STDIN_CHILD) = Provide a handle to the child's STDIN stream 2 ($STDOUT_CHILD) = Provide a handle to the child's STDOUT stream 4 ($STDERR_CHILD) = Provide a handle to the child's STDERR stream Link to comment Share on other sites More sharing options...
caschy Posted March 7, 2007 Author Share Posted March 7, 2007 From the help file: Run ( "filename" [, "workingdir" [, flag[, standard_i/o_flag]]] ) Parameters Run( "C:\Users\caschy\Desktop\Firefox\firefox.exe" -profile "myprofile" ) Doesnt work. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 7, 2007 Moderators Share Posted March 7, 2007 (edited) Run( "C:\Users\caschy\Desktop\Firefox\firefox.exe" -profile "myprofile" ) Doesnt work.You have to have "some" understanding of how to use some of the functions, such as syntax and operators. I have no idea if this is right... but you can try this:Run('"C:\Users\caschy\Desktop\Firefox\firefox.exe" -profile myprofile')You may also like to look at ShellExecute. Edited March 7, 2007 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
unearth Posted March 8, 2007 Share Posted March 8, 2007 If i call a batch will, this will work: @echo off cd firefox set MOZ_NO_REMOTE=1 start firefox.exe -profile "myprofile" set MOZ_NO_REMOTE=0 So, how to get this with AutoIt to work? How about this one? Run(@ComSpec & " /c " & 'cd firefox && set MOZ_NO_REMOTE=1 && start firefox.exe -profile "myprofile && set MOZ_NO_REMOTE=0', "", @SW_HIDE) By the way, I don´t think you´ll need the "set MOZ_NO_REMOTE=0". It´s obsolete, if you ask me. But I guess it won´t do any harm, so it´s up to you. Link to comment Share on other sites More sharing options...
McGod Posted March 8, 2007 Share Posted March 8, 2007 Run( 'C:\Users\caschy\Desktop\Firefox\firefox.exe -profile "myprofile"' ) Try that. [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
caschy Posted March 12, 2007 Author Share Posted March 12, 2007 Run( 'C:\Users\caschy\Desktop\Firefox\firefox.exe -profile "myprofile"' )Try that.None of them above will work.. 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