Jump to content
Sign in to follow this  
methusalich

step 2 failure

Recommended Posts

methusalich

I am completely new at this (or anything like this) and am trying to teach myself autoit using the help files.

the problem is this. I can open a notepad window with: Run("notepad.exe") the problem happens when i try to replace "notepad.exe" with the .exe file that i am trying to automate for. the location of the .exe is c:\program files\game company\game\kicker.exe but, when I put Run("c:\program files\game company folder\game folder\kicker.exe") and run the script, nothing happens.

I know the file path is correct, and its only one line of code that only fails when i change the path ... I am getting frustrated, can anyone help? Why won't it work?

on another note, does anyone know of a really good tutorial? (by really good I mean something that a total idiot could use to become an autoit guru)

Share this post


Link to post
Share on other sites
PsaltyDS

I am completely new at this (or anything like this) and am trying to teach myself autoit using the help files.

the problem is this. I can open a notepad window with: Run("notepad.exe") the problem happens when i try to replace "notepad.exe" with the .exe file that i am trying to automate for. the location of the .exe is c:\program files\game company\game\kicker.exe but, when I put Run("c:\program files\game company folder\game folder\kicker.exe") and run the script, nothing happens.

I know the file path is correct, and its only one line of code that only fails when i change the path ... I am getting frustrated, can anyone help? Why won't it work?

on another note, does anyone know of a really good tutorial? (by really good I mean something that a total idiot could use to become an autoit guru)

Welcome to AutoIt! :)

Try the AutoIt 1-2-3 tutorial linked in my sig.

As for your Run() function, try providing the working directory parameter:

$sDir = "c:\program files\game company folder\game folder"
$sEXE = $sDir & "\kicker.exe"
Run($sEXE, $sDir)

:lmao:


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

Share this post


Link to post
Share on other sites
methusalich

Welcome to AutoIt! :)

Try the AutoIt 1-2-3 tutorial linked in my sig.

As for your Run() function, try providing the working directory parameter:

$sDir = "c:\program files\game company folder\game folder"
$sEXE = $sDir & "\kicker.exe"
Run($sEXE, $sDir)

:lmao:

WOW! that was a fast response! ... i'll try it (although i don't fully understand it lol)

Share this post


Link to post
Share on other sites
methusalich

WOW! that was a fast response! ... i'll try it (although i don't fully understand it lol)

That worked!!

I don't understand why it worked ... but I'm sure i will eventually ..... thank you so much for your help!!

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.