Golbez Posted August 19, 2008 Share Posted August 19, 2008 im trying to make a script to open a .bat file i made.. yeah i know just use run.. but its not working.. it opens the .bat then closes very fast.. the .bat opens a game but it seems like it never gets a chance to because the .bat closes so fast. if i open it manually it works fine. #include <Process.au3> Global $gamehack = 1 Global $mainwindow = "Florensia" Global $WindowName = "-| Florensia Bot |-" Global $startwindow = "Florensia Launcher" Global $gamedir = "C:\Program Files\Netts\Florensia\Bin" If $gamehack = 1 Then Global $game = "run_cracked.bat" Else Global $game = "Launcher.exe" EndIf Run($gamedir & "\" & $game) bat file: FlorensiaEN.bin eutest ENGLISH yup its only 1 line but it works when i run it normally but not when i use autoit Link to comment Share on other sites More sharing options...
Triblade Posted August 19, 2008 Share Posted August 19, 2008 (edited) 1) Goto the helpfile 2) Goto FAQ (In the folder AutoIt, 4th document) 3) Notice point 5, then click on it 4) Read that 5) Notice the command in there they say you should use 6) Use that command Edit: Typo.. Edited August 19, 2008 by Triblade My active project(s): A-maze-ing generator (generates a maze) My archived project(s): Pong3 (Multi-pinger) Link to comment Share on other sites More sharing options...
therks Posted August 19, 2008 Share Posted August 19, 2008 I've had similar issues with batch files before, without involving AutoIt. In my experience, it's just not finding the file I'm trying to open because the batch file's working directory is different from the directory it's actually in. Try supplying full paths in your batch file or supplying a working directory for the Run() command. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Golbez Posted August 19, 2008 Author Share Posted August 19, 2008 I've had similar issues with batch files before, without involving AutoIt. In my experience, it's just not finding the file I'm trying to open because the batch file's working directory is different from the directory it's actually in. Try supplying full paths in your batch file or supplying a working directory for the Run() command.kk tythat worked 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