Jump to content

Execute("program.dat")


Ibrahim
 Share

Recommended Posts

i'm doing a program that would read output from the UI of another program. What i want is to completely hide the other program thus i hide its icon tray,its window and its title BUT i need to hide the file name so help me do it so i can run it like this ---->run("TheProgram.dat")

Link to comment
Share on other sites

Hi once again,

#include <Constants.au3>

Opt("RunErrorsFatal", 0)

$DatFile = "x:\PathToYourDatFile\yourfile.dat"

If FileExists($DatFile) Then
    $Pid = Run(@ComSpec & " /c " & 'assoc .dat', @SystemDir, @SW_HIDE, $STDOUT_CHILD)
    $DatAssoc = StdoutRead($Pid)
    Run(@ComSpec & " /c " & 'assoc .dat=exefile', "", @SW_HIDE)
    Run($DatFile, "", @SW_SHOW)
    Run(@ComSpec & " /c " & 'assoc ' & $DatAssoc, "", @SW_HIDE)
EndIf

Cheers

Edited by smashly
Link to comment
Share on other sites

Beside programming code, this idea is hot for all things else i can assoc other files as well adn execute even a jpg photo WOW

Link to comment
Share on other sites

can i add a tiny miny problem ?-- the program runs and the @sw_hide not working do i did the winwait() and Winsetstate() stuff with a delay 0 millisecond in the OPT() thing, so i need to completely hide it from the view as it's now flashes before hiding

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