Jump to content

Getting Run() Error


Recommended Posts

When i go to Start, Run and type in the console that pops up:

D:\Talk.au3 "Hello"

It runs my talk script when then says Hello. Works fine.

But when i start to use this in a different script saying

Run('D:\Talk.au3 "Hello"')

This gives a error.

D:\Run.au3 (1) : ==> Unable to execute the external program.:

Run('D:\Talk.au3 "Hello"')

Ehh?? :)

Edited by Manadar
Link to comment
Share on other sites

  • Moderators

Haha oops, i forgot that you just can't 'Run' Au3 files. I'll just compile it and use it them.

Sorry for the SPAM!!!

Hmm... How about:
$AutoitEXE = @ProgramFilesDir & '\AutoIt3\AutoIt3.exe'
$FileToRun = @DesktopDir & "\Hello.au3"
Run($AutoitEXE & ' "' & $FileToRun & '"'))

Edit:

Typo

Edit2:

Another way to do it:

$AuotitEXE = @AutoItExe & ' /AutoIt3ExecuteScript '
$FileToRun = @DesktopDir & "\Hello.au3"
Run($AuotitEXE & '"' & $FileToRun & '"')
Edited 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

Hmm... How about:

$AutoitEXE = @ProgramFilesDir & '\AutoIt3\AutoIt3.exe'
$FileToRun = @DesktopDir & "\Hello.au3"
Run($AutoitEXE & ' "' & $FileToRun & '"'))

Edit:

Typo

Thanks i know. But compiling is less effort for me.

[Edit]

has anyone ever seen a speach-object that doesn't require for a file to be made?

I recon since many people read this thread my question will do well in here..

Edited by Manadar
Link to comment
Share on other sites

  • Moderators

Thanks i know. But compiling is less effort for me.

[Edit]

has anyone ever seen a speach-object that doesn't require for a file to be made?

I recon since many people read this thread my question will do well in here..

Well if you knew, then why did you say you couldn't do it? I gave another alternative also.

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

  • Moderators

And i thank you for it. But you still cannot just Run or Execute a Au3 file. You háve to run Exe or Bat (i think that's it).

Lmao.... did you try any of them?

If you opened a text file... are you only opening a text file, or are you opening Notepad.exe too? I don't understand what you want I guess, because how your question was worded, what I gave you does exactly that.

The last example I gave you is the best, because you can compile it and run it on any computer even without having to have the AutoIt.exe installed, and it will still run a script.

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

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