Jump to content

problem with run...


 Share

Recommended Posts

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

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 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

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.

Link to comment
Share on other sites

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 ty

that worked ;)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...