Slythfox Posted May 21, 2007 Share Posted May 21, 2007 Okay, so I have this: RunWait(@ScriptDir & "/bin/php/php.exe script.php") It displays a window real quickly (not enough time to read it). If I put php.exe, script.php, etc in the same directory as the autoit script, the script works (exact code above). I've tried creating a script in a bat to run the command which doesn't work in autoit. I've also tried _RunDos() and ShellExecute(), both of which have the same issue. I don't want to have php.exe and everything in the main directory, as it is disorganized for the programmer, and confusing for the user. How is this fixable? Link to comment Share on other sites More sharing options...
Zedna Posted May 21, 2007 Share Posted May 21, 2007 instead of "/" use "\" Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 21, 2007 Share Posted May 21, 2007 Add your working dir parameter, per the help file on RunWait(): RunWait(@ScriptDir & "/bin/php/php.exe script.php", "/bin/php") Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 21, 2007 Share Posted May 21, 2007 instead of "/" use "\" Windows is actually pretty tolerant of forward slashes mixed in to paths. Try some CD commands from a DOS shell. It works. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Lemmens Peter Posted May 21, 2007 Share Posted May 21, 2007 Hi, Maybe if php.exe and script.php are not in the same directory, you need to add the full path of both. (eg if script.php is in a new created dir called "PHPScriptsDir") RunWait(@ScriptDir & "\bin\php\php.exe " & @ScriptDir & "\PHPScriptsDir\script.php") Good luck, Peter Link to comment Share on other sites More sharing options...
Slythfox Posted May 21, 2007 Author Share Posted May 21, 2007 (edited) Hi, Maybe if php.exe and script.php are not in the same directory, you need to add the full path of both. (eg if script.php is in a new created dir called "PHPScriptsDir") RunWait(@ScriptDir & "\bin\php\php.exe " & @ScriptDir & "\PHPScriptsDir\script.php") Good luck, PeterI've done that too. Doesn't work. I got this to work: RunWait(@ScriptDir & "/bin/php/php.exe base64_encode.php", @ScriptDir & "/bin/php/") Thanks a bunch! I was always confused what that second attribute did. EDIT: Wait, How do I get the window to hide. It almost seems as if the php script doesn't run when I add " ,@SW_HIDE" EDIT2: NVM, I think it's just GUI lag. (The PHP script outputs a lot!) Edited May 21, 2007 by Slythfox Link to comment Share on other sites More sharing options...
Zedna Posted May 21, 2007 Share Posted May 21, 2007 original RunWait(@ScriptDir & "/bin/php/php.exe base64_encode.php", @ScriptDir & "/bin/php/")oÝ÷ Ú'Òr¸©´8«ríj)ì²z̨ºk¬µÉh±è¶®¢×¬Â§¥«,x)j¶¦zÚÞ±«¢+ÙIÕ¹]¥Ð ÌäìÅÕ½ÐìÌäìµÀìMÉ¥ÁѥȵÀìÌäì½¥¸½Á¡À½Á¡À¹áÅÕ½ÐìÍØÑ}¹½¹Á¡ÀÌäì°MÉ¥ÁѥȵÀìÅÕ½Ðì½¥¸½Á¡À¼ÅÕ½Ðì¤ Resources UDF ResourcesEx UDF AutoIt Forum Search 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