Jump to content
Sign in to follow this  
Eigensheep

Running a script from within a script

Recommended Posts

Eigensheep

Hi, I've tried most things but I can't seem to get the concept to work. I've basically got a GUI with a button and an input and when you hit the button, I would like the script path to run. I tried:

$fn = @ComSpec & ' /c "' & @ScriptDir & '\autoit3.exe" /ErrorStdOut "' & $_FILENAME & '"'

RunWait($fn)

(The $_FILENAME is a valid script path, and autoit3.exe is in the script directory...) But the cmd gives an error. What am I doing wrong? Thanks!

Share this post


Link to post
Share on other sites
Valuater

from Autoit Wrappers

; Run any au3 file from your program
; Author Valuater

$file_loc = @ScriptDir & "\Test.au3"

If @Compiled = 1 Then
    $file_exe = FileGetShortName(@AutoItExe & ' /AutoIt3ExecuteScript "' & $file_loc & '"')
    Run($file_exe)
Else
    $file_au3 = FileGetShortName($file_loc)
    Run(@AutoItExe & " " & $file_au3, "", @SW_HIDE)
EndIf

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
Eigensheep

I see... Thank you!!! It helps a lot! :D

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.